#development

1 messages Ā· Page 1290 of 1

opal plank
#

more info

#

and i use forever to keep my processes alive

#

overall, much better

lethal sonnet
#

u made the Font end ??

pale vessel
#

one more live channel please

#

that's grafana

lethal sonnet
#

front*

opal plank
#

yes

lethal sonnet
#

WHAT

compact oriole
#

ehh I don't see the need to do my own stuff

opal plank
#

one more live channel lmao

#

holdup

compact oriole
#

I can add custom metrics to pm2

autumn aspen
#

@earnest phoenix check DM

opal plank
pale vessel
opal plank
#

trust me

#

i hate it

lethal sonnet
#

@opal plank dude it is verry noice

opal plank
#

its pulling the lang from my ip

lethal sonnet
#

but u dont have to

#

:))

pale vessel
#

slave 😳

opal plank
#

browser english, pc english, everything in englih

#

and grafana pulls lang based on ip

#

fucking hate it

pale vessel
#

it's pretty stupid if you ask me

opal plank
#

ikr!

lethal sonnet
#

i think i will make my bot to multilang

pale vessel
#

literally has no reason to

opal plank
#

there isnt even an option to disable it

#

also, for you asking what the slave is

lethal sonnet
#

but i have alots to save in database

opal plank
#

thats my new testing toy

lethal sonnet
#

@opal plank u know jest ??

opal plank
#

going for 40k channels on twitch

pale vessel
opal plank
#

im starting to use jest

compact oriole
#

well using Grafana isn't doing "your own" :P

lethal sonnet
#

Omg

compact oriole
#

but it is good

opal plank
#

havent done anything fancy though

#

it kinda is though

lethal sonnet
#

@opal plank but nice those diagram

compact oriole
#

doing your own means doing everything

opal plank
#

you need to get a metrics server running and a ton of shit in the back

#

grafana just pĆŗlls data and displays it

compact oriole
#

yea

#

pm2 for me is the same

opal plank
#

its just a display

compact oriole
#

I use the custom metrics

opal plank
#

i can just as easily log into pg admin and see stuff change as well in txt format

#

since all data is dumped both into logs and the metrics

compact oriole
#

pg admin :P

lethal sonnet
#

im done guys, i will change my website to dash board website

opal plank
compact oriole
#

I've used it a bit and I prefer mongodb compass (I know it's different databases)

autumn aspen
#
const Discord = require("discord.js");
const ms = require("ms");

module.exports.config = {
    name: "slowmode", 
    aliases: []
}
    
module.exports.run = async (client, message, args) => {
  if (!message.member.permissions.any(["ADMINISTRATOR", "MANAGE_CHANNELS"])) {
    return message.channel.send(":x: **You don\'t have permission to run this command!** :x:");
  }
  
  let channel = message.mentions.channels.first(),
      time = args.slice(1).join(" ");
  
  if (!channel) time = args.join(" "), channel = message.channel;
  
  
  if (message.flags[0] === "off") {
    channel.setRateLimitPerUser(0);
    return message.channel.send(`<#${channel.id}> slowmode has been deactivated.`);
  }
  
  if (!time) return message.channel.send({embed: {color: "RED", description: "Please includes the time format."}});
  
  let convert = ms(time); 
  let toSecond = Math.floor(convert / 1000); 
  
  if (!toSecond || toSecond == undefined) return message.channel.send("Please insert the valid time format!");
  
  if (toSecond > 21600) return message.channel.send("Timer should be less than or equal to 6 hours.");
  else if (toSecond < 1) return message.channel.send("Timer should be more than or equal to 1 second.");
  
  await channel.setRateLimitPerUser(toSecond);
  return message.channel.send({embed: {color: "RED", description: `<#${channel.id}> has been slowing down for **${ms(ms(time), {long: true})}**.`}});
}

@pale vessel look for the code that turn it off what is the command /slowmode off or what?

compact oriole
#

pg admin just feels odd sometimes

#

use a paste bin (hastebin etc)

#

and don't spam the mf chat

opal plank
#

postgres is gasm

pale vessel
#

message.flags?

compact oriole
#

postgres is epic

#

pg admin owoShrug

opal plank
#

its shighly advanced if you know what you are doing

autumn aspen
#

message.flags?
@pale vessel can I change it?

#

or smh

cobalt spruce
#

i was wondering how i add async in execute?
execute(message, args) {

        const msg = await message.channel.send("Pinging...");
opal plank
#

even im struggling with some rather advanced sql queries

pale vessel
#

what is that supposed to be

#

where did you get that code

compact oriole
#

and I use a sql query to make the tables

opal plank
#

im starting with koa

#

doing everything from scratch

#

opted for not using boilerplates

#

to learn it well

autumn aspen
#

what is that supposed to be
@pale vessel my friend tiped that but idk how to deactiveat the code??

compact oriole
#

like I don't use it as an endpoint

pale vessel
#

try changing message.flags[0] to args[0]

compact oriole
#

I just use it as a good api/wrapper for postgres

autumn aspen
#

try changing message.flags[0] to message.args[0]
@pale vessel why args[0]???

#

tf

cobalt spruce
#

@opal plank can u help?
how i add async in execute?
execute(message, args) {

        const msg = await message.channel.send("Pinging...");
opal plank
#

@cobalt spruce busy

cobalt spruce
#

sad

lethal sonnet
#

async execute()

opal plank
#

@compact oriole i'll take a look but it doesnt look like its gonna be too useful for me

lethal sonnet
#

simple

opal plank
#

i already got a lib to handle queries

compact oriole
#

ye, it is good for me who doesn't know sql queries

lethal sonnet
#

@cobalt spruce do
async execute()

compact oriole
#

but gotta go cya

opal plank
#

hmmm it does show tooling and docs

pale vessel
#

you seem to not know what your args look like

opal plank
#

cya

lethal sonnet
#

nye

#

bye

pale vessel
#

i suggest debugging

#

log your args and see

#

@autumn aspen

opal plank
#

what?

#

bruh

lethal sonnet
#

i never use Vscode debugger

opal plank
#

nono

#

async function() {}

#

thats it

#

args can be undefined

#

cuz they arent using it

#

@cobalt spruce

#

ts will screech at you for overloads but js lets you do just that mess

leaden flame
#

how to make commands

opal plank
#

reading the docs

leaden flame
#

use java script

#

i am new

pale vessel
lethal sonnet
autumn aspen
#

lmao we got 2 new sense yesterday

lethal sonnet
#

good examples

hushed axle
#

Can someone help me how to make a dashboard StareCat

opal plank
fallen dock
#

GEYYXQ
Cmon Among Us\

autumn aspen
#

Can someone help me how to make a dashboard :StareCat:
@hushed axle u need to code one 🤔

pale vessel
#

go somewhere else

opal plank
fallen dock
#

sorry

leaden flame
#

i no use this

opal plank
#

what you du use?

lethal sonnet
#

Can someone help me how to make a dashboard :StareCat:
@hushed axle save everything in Database and just simple change change database with nodejs wensite

leaden flame
hushed axle
#

What language do I use to code the dashboard

pale vessel
opal plank
#

dont use glitch

leaden flame
#

can u check my coding pls

#

i make

pale vessel
#

bismillah

opal plank
#

pls tell me he didnt just do that

leaden flame
#

pls check

lethal sonnet
#

What language do I use to code the dashboard
@hushed axle use HTML :))

autumn aspen
#

What language do I use to code the dashboard
@hushed axle dude its discord.js

leaden flame
#

what i use

#

?

autumn aspen
#

otherwise google it

lethal sonnet
#

HTML

clever dust
#

What language do I use to code the dashboard
@hushed axle html, css, javascript

leaden flame
#

what i use to devolp bot

#

html no work

opal plank
#

@leaden flame DELETE THAT

#

refresh your token, right now

hushed axle
#

Confuse :((

lethal sonnet
#

html no work
@leaden flame LMAOOO

opal plank
leaden flame
#

done

opal plank
pale vessel
opal plank
#

refresh your token dude

pale vessel
#

didn't even use .env

willow marlin
#

lool

opal plank
#

@leaden flame delete token in the portal and make a new one

leaden flame
#

@opal plank why i refresh

#

it is not my bot token

opal plank
#

cuz i can log into your bot and go spam 'i like fortnite'

toxic raptor
#

How does one forget that simple thing like a token

faint prism
#

How does one forget that simple thing like a token
@toxic raptor yeah I memorized mine

autumn aspen
toxic raptor
#

@faint prism ahaha i got mine as a tattoo cuz im 5head /s

pale vessel
#

use your args

lethal sonnet
#

yeah I memorized mine
LoL

#

token is the most easiest things to remember

opal plank
#

imagine not writing your bot token in a piece of paper

#

plebs

pale vessel
#

it's weird that you defined your args inside the command

#

do you not have a handler for that?

autumn aspen
#

do you not have a handler for that?
@pale vessel tf ofcourse I have

#

yes wanna try?

pale vessel
#

nope

#

and why

leaden flame
#

what is good to edit our bot

pale vessel
#

vsc, sublime

lethal sonnet
#

sublime is good cuz it doesnt eat ram

#

but does have built in consolw

#

:((

earnest phoenix
#

which is the easiest programming language to learn?

lethal sonnet
#

which is the easiest programming language to learn?
@earnest phoenix HTML

pale vessel
#

i use npp + windows terminal xd

lethal sonnet
#

wait

#

html is a programming language

#

is not*

opal plank
#

@leaden flame Dude, im serious

#

reset your token

#

why havent you done so already?

lethal sonnet
#

@opal plank use Discord bot client to login into his Bot

leaden flame
#

@opal plank it is not my token

opal plank
leaden flame
#

it is my fucking bitch friend token

opal plank
#

then why the fuck you using someone's token?

lethal sonnet
#

team...

opal plank
#

i literally went to check if you already reset it or not

#

and you havent

leaden flame
#

@opal plank ok

lethal sonnet
#

they are in team. . .

opal plank
#

ask your 'bitch friend token' to go regenerate it

leaden flame
#

@opal plank i will saw bitch to regenrate

opal plank
#

im tempted to go post it in a private channel just to have clyde revoke it tbh

leaden flame
#

he done

opal plank
#

imma check again in 5 minutes

lethal sonnet
#

what he died ??

opal plank
leaden flame
#

what i use for make own bot use coding

#

what is good to devolp our bot

opal plank
#

VS code

lethal sonnet
#

Imagine using Microsoft visual studio to make djs bots

leaden flame
#

how to use

opal plank
#

imagine not using Microsoft Word to code bots

earnest phoenix
#

Notepad++ @leaden flame

lethal sonnet
#

LMAO

leaden flame
#

yes

#

i have downloaded

earnest phoenix
opal plank
#

dont use notepad++

autumn aspen
#

@earnest phoenix how do I turn it off gotdammit

#

lol

opal plank
#

use Vsc Code

#

they are trolling

earnest phoenix
#

Use notepad++

lethal sonnet
#

Notepad suck

opal plank
#

DONT

earnest phoenix
#

I’m not trolling

opal plank
#

use notepadd++

earnest phoenix
#

I literally use it

opal plank
#

then you are stupid

#

sorry to say it

earnest phoenix
#

U r stupider

lethal sonnet
#

bu it is true

autumn aspen
#

^^

opal plank
#

notepad++ is shit for coding

#

no ide

leaden flame
#

@earnest phoenix did u make ur bot use note pad

earnest phoenix
#

Yes.

opal plank
willow marlin
#

nah use word

#

ms word

leaden flame
#

@opal plank gimme link of vsc code

earnest phoenix
#

Just use notepad

autumn aspen
#

I use word documents for coding

opal plank
#

literally 5 people telling him NOT to use notepad++ and he goes to listen to them

earnest phoenix
#

@earnest phoenix you're not funny

opal plank
earnest phoenix
#

What am I doing @earnest phoenix

#

???

#

trolling

lethal sonnet
#

remove the embeddd

#

smh

earnest phoenix
#

How am i trolling

#

I literally use

#

Np++

#

Literally

opal plank
#

@lethal sonnet no, i wanna make that bs notepad++ as far away from new users coming here rn as possible

autumn aspen
#

Literally
@earnest phoenix pls ĀØstop

earnest phoenix
#

IM NOT TRO

#

Oh

#

Ur fucking with me

autumn aspen
#

trolling
@earnest phoenix man can u help me lol

opal plank
#

look at the link and then see how shit notepad++ is

autumn aspen
#

can I send a hb

opal plank
autumn aspen
lethal sonnet
#

@lethal sonnet no, i wanna make that bs notepad++ as far away from new users coming here rn as possible
@opal plank well notepad is good cuz we have to write everything by our hand, so we can understand JS much better

opal plank
leaden flame
opal plank
#

windows 7

lethal sonnet
#

lol

earnest phoenix
#

He sent u a virus

opal plank
#

no wonder

earnest phoenix
#

Use notepad ++

autumn aspen
#

lmaoooo

opal plank
#

im blocking manny

autumn aspen
#

windows 7

opal plank
#

done with the trolls today

earnest phoenix
#

Please don’t @opal plank

autumn aspen
#

im blocking manny
@opal plank me 2

leaden flame
#

@earnest phoenix how i code use notepad++

opal plank
earnest phoenix
#

@autumn aspen constantly pinging me for help will get you nothing

opal plank
#

much better chat

earnest phoenix
#

Endph...

opal plank
#

anyway

autumn aspen
#

anyway
@opal plank yeah much better

opal plank
#

@leaden flame your windows is super oudated my dude, windows 7 doesnt have supporrt anymore

#

thats why your browser is saying that

lethal sonnet
#

lol

earnest phoenix
#

Just edit a file with notepad++ that’s it @leaden flame

leaden flame
#

idk

earnest phoenix
opal plank
earnest phoenix
#

D:

#

manny and endph

autumn aspen
#

manny and endph
@earnest phoenix no brooo!

opal plank
#

im fed up with trolls already

leaden flame
#

@earnest phoenix but how i coddeing and upload bot

earnest phoenix
#

Blocked for using notepad++.....

#

Kinda messed up....

#

D:
@earnest phoenix don't scream we told you several times to stop

opal plank
#

never have i had to block this many people from a single server

lethal sonnet
#

whats better Microaoft edge or Internet explore ??

opal plank
#

Chrome/firefox

lethal sonnet
#

or they both are trash

opal plank
#

though edge is better if you strictly comparing the two

earnest phoenix
#

@leaden flame Just use windows cmd

opal plank
#

though i'd go for chrome, personally

leaden flame
#

how

#

what is windos cmd

lethal sonnet
#

well Internet explore is the best tool to download Chrome

earnest phoenix
#

...

lethal sonnet
#

:))

autumn aspen
#

@earnest phoenix don't scream we told you several times to stop
@earnest phoenix dude pls unblock me man sorry I am

earnest phoenix
#

@earnest phoenix no you were trolling by telling other beginners to use Notepad++ even though it sucks and is NOT RECOMMENDED for programming

leaden flame
#

?

#

🤣

earnest phoenix
#

@earnest phoenix no you were trolling by telling other beginners to use Notepad++ even though it sucks and is NOT RECOMMENDED for programming
@earnest phoenix HOws that trolling

#

I literally use np++

#

bro

#

rules are rules

lethal sonnet
#

@earnest phoenix ok shutuo

#

ur fricking wierd

earnest phoenix
#

It’s what I’ve used since the beginning of time

#

WHAT AM I DOING

opal plank
#

recommending someone to use notepadd++ is the same as telling a person with no legs to get around drunk in a monocycle

#

it wont end well at all

earnest phoenix
#

rules are rules
@earnest phoenix it’s a rule?

#

@earnest phoenix please tell manny to stop trolling

lethal sonnet
#

ok @earnest phoenix u can use what ever unwant

#

u want

earnest phoenix
#

Thank you @lethal sonnet

#

but don't give bad advice to others

#

I’m not even trolling either 😐

opal plank
#

just dont recommend new people your shit preferences, if possible

earnest phoenix
#

How’s it bad advice

opal plank
#

they dont need to tryhard like you

lethal sonnet
#

stop cuz this is going verry far away

earnest phoenix
#

also endph you're unblocked

#

stop cuz this is going verry far away
@lethal sonnet i already pinged a modum too

lethal sonnet
#

we are not talking editor any more

willow marlin
#

recommending someone to use notepadd++ is the same as telling a person with no legs to get around drunk in a monocycle
was it not a joke

earnest phoenix
#

@mint thicket another pingo

lethal sonnet
#

DUDE STOP

earnest phoenix
#

LEAVE TO MODUMS

#

they dont need to tryhard like you
@opal plank it’s what I’ve been using since i was a beginner

#

So

#

šŸ¤·šŸ½ā€ā™‚ļø

lethal sonnet
#

smh

#

im dine

earnest phoenix
#

bye

lethal sonnet
#

done

earnest phoenix
#

Bye 4xept

opal plank
#

how is it NOT bad advice?
no tooling, no wiki, no debugger, extensions are annoying to install, very few language syntax support, its not MEANT for coding, while you CAN code

#

its just shit, thats it

earnest phoenix
#

dude

opal plank
#

it has its uses

earnest phoenix
#

modums

#

@drowsy crag

#

Ok

#

how many more pings until a modum looks at this

#

I don’t see why ur making such a big deal out of it

#

imma head out

#

Like

#

You could’ve dropped it 10 minutes ago

#

Actually

leaden flame
earnest phoenix
#

I’m done

#

Bye

lethal sonnet
#

just let manny and erwin fighting

opal plank
#

i got better stuff to do with my time tbh

#

just trying to show notepad++ isnt a good tool for coding at all

lethal sonnet
#

then Stop JUST IGNORE HIN

earnest phoenix
#

then Stop JUST IGNORE HIN
@lethal sonnet

opal plank
#

4xemt

lethal sonnet
#

oops

opal plank
#

the point is for sid

earnest phoenix
#

@.Moderators

lethal sonnet
#

i thought u gone

earnest phoenix
#

I came back.

lethal sonnet
#

:))

opal plank
#

i couldnt care less that they like using n++

earnest phoenix
#

erwin I'm temp blocking you

lethal sonnet
#

lol

earnest phoenix
#

@leaden flame what did u use to code that

#

?

lethal sonnet
#

alots blocks in a day

#

xD

opal plank
#

go ahead, im out anyway, not here for drama, just trying to coach a new dev to use proper developing tools

earnest phoenix
#

MEGALUL The hell has happened here

#

Idk

lethal sonnet
#

@earnest phoenix fighting

earnest phoenix
#

Ewrin making a big deal out of nothing really

lethal sonnet
#

notepadd against vscode

#

manny vs erwin

pale vessel
#

i don't hate any ide or anything but i use npp

#

because

leaden flame
opal plank
#

very good, welcome to the civilized bit of development

leaden flame
#

thnks

#

done

#

open

#

what i do

hushed axle
#

StareCat can anyone help me why my bot can’t mention everyone

opal plank
#

file => open folder

#

then pick the folder your bot is in

leaden flame
#

how

#

did u have any video

opal plank
#

top left

pale vessel
#

no legit

#

i just don't have a reason to change editor

leaden flame
#

@opal plank how to i pick my bot folder

opal plank
#

file => open folder

#

top left

#

i assume you already have a folder for your bot somewhere

#

if you dont, just create one

leaden flame
earnest phoenix
#

@pale vessel stop before he blocks you for using np++

pale vessel
#

dude

#

i don't care

earnest phoenix
pale vessel
#

it just works for me what the hell am i supposed to do

earnest phoenix
pale vessel
#

i don't need some advanced debugging stuff

leaden flame
opal plank
#

@leaden flame good, follow this guide now

leaden flame
#

ok

earnest phoenix
#

now you have to update from windows caveman edition too mmLol

#

thanks

opal plank
earnest phoenix
#

discord formatting the best

leaden flame
#

what

restive furnace
#

neovim better than vim better than np++

leaden flame
#

const Discord = require('discord.js');
const client = new Discord.Client();

client.once('ready', () => {
console.log('Ready!');
});

client.login('your-token-goes-here');

#

i paste this on index
const Discord = require('discord.js');
const client = new Discord.Client();

client.once('ready', () => {
console.log('Ready!');
});

client.login('your-token-goes-here');

#

@opal plank

opal plank
#

follow the guide

#

read it

leaden flame
#

ok

opal plank
#

it explains everything you need

leaden flame
#

he dont explain what i make .js .json .md .slinted

opal plank
#

it does

leaden flame
#

where

opal plank
#

right here

#

like i said

#

real the WHOLE guide

#

follow it

#

and yuou'll have a working bot in the end

#

a decent one at that

leaden flame
#

pl

#

ok

#

can we put custom status of our bot?

opal plank
#

follow

#

the

#

guide

pale vessel
stray heron
#

türk varmı

leaden flame
opal plank
#

fuck its 5am

#

i gotta ditch

leaden flame
opal plank
pale vessel
#

perfect timing, don't you think?

opal plank
#

bruh its 5am

#

i sent them the docs

#

if they read it, they'll be fine

earnest phoenix
#

@leaden flame lmfao

pale vessel
#

as in you don't have to deal with this bs

leaden flame
#

🤣

earnest phoenix
#

you're executing code inside a JSON file

opal plank
#

as im im too tired to deal with this bs, yes

earnest phoenix
#

as im im too tired to deal with this bs, yes
@opal plank I'm not

opal plank
#

its holding hands at this point

pale vessel
#

oh god

#

you're right

opal plank
#

then by all means help them

pale vessel
#

jeez that's rough

leaden flame
opal plank
#

gnit

pale vessel
#

gn

opal plank
leaden flame
#

?

#

good night

#

:bye:

opal plank
#

AAAAAAHHHHHHHHHH

#

you still did NOT RESET UR TOKEN

#

ffs!

#

go reset that shit

leaden flame
#

it is not mine

pale vessel
#

encomy xd

leaden flame
#

i did no restart the token

opal plank
#

then tell whoever the owner is to change it cuz you messed up and leaked it

leaden flame
#

it is bitch my friend

earnest phoenix
#

@leaden flame JSON files are for storing stuff. You have to use smth like JavaScript to read data from JSON then do stuff to it. But you're literally running code inside the JSON file KEKW

leaden flame
#

😭

#

i mad

earnest phoenix
#

they're a help vampire

#

yes they are

opal plank
#

shiv is here

#

put some order here plis

earnest phoenix
#

that's why I'm not just telling them what to do

opal plank
earnest phoenix
#

I'm just badly explaining how JSON works

leaden flame
earnest phoenix
#

help vampires are beyond saving

leaden flame
#

can i make package json and work?

earnest phoenix
#

@leaden flame no no no

opal plank
#

amazing how someoen can leak the token TWICE

leaden flame
#

idk

earnest phoenix
compact oriole
#

amazing how someoen can leak the token TWICE
TWICE?

leaden flame
opal plank
#

back to trying to sleep

leaden flame
#

🤣

restive furnace
misty sigil
#

amazing how someoen can leak the token TWICE
@opal plank aww I missed 2 token leaks?

earnest phoenix
#

Usual day on dbl

misty sigil
#

Ok fair enough

restive furnace
#

im getting ignored but ok

earnest phoenix
#

:Sad:
@misty sigil is that your actual face

misty sigil
#

no

subtle arch
#

I wonder is there any good solution to fill user cache without guild member and guild presence intent? I only store user IDs in database and requesting per single user can lead to API spam

restive furnace
#

lib?

#

djs => guild.members.fetch()
eris => guild.fetchMembers()

dpy => guild.fetch_members()

iirc

eternal osprey
#

hey guys

#

how do i stop my setinterval command?

#

it just keeps intervalling

misty sigil
#

1 way. shut down the app

#

2nd way. assign it to a variable and stop it using clearInterval

pale vessel
#

@twilit rapids

eternal osprey
#

@misty sigil i have tried it so many times

twilit rapids
#

ty

eternal osprey
#
     })
  
      
      let interval1 = setInterval(() => {
        generateEmbedFromFeed(args, (embed) => {
          messageToEdit.edit(embed)
        })
      }, 5000)
    }
    if (message.content.startsWith(prefix + 'stop')) {
    clearInterval(interval1)

  }
}```
#

this just doesn't work

misty sigil
#

scopes?

pale vessel
#

you need to store that interval somewhere persistent

#

you can't access it anymore after every command

#

so you can't clear old ones

#

that code just clears the created interval

subtle arch
#

djs => guild.members.fetch()
eris => guild.fetchMembers()

dpy => guild.fetch_members()

iirc
Is that basically downloading all users in server which will need "guild members" intent?

pale vessel
#

yes

eternal osprey
#

hey guys

pale vessel
#

you don't get them upon starting up either

eternal osprey
#

i just used the !stop command

pale vessel
#

only some members that are in VCs

eternal osprey
#

it worked. But it returns this: embed.setDescription(${status.text});
^

TypeError: Cannot read property 'text' of undefined

pale vessel
#

status is undefined

eternal osprey
#

yeah because i put !stop

#

which stops the interval

#

so it won't have a status to update anymore.

pale vessel
#

you're creating the interval on every command

eternal osprey
#

on every !feed command

pale vessel
#

it will only stop the one you just created

#

it won't stop previous ones

eternal osprey
#

how would i stop everything

#

the whole setinterval shit.

pale vessel
#

store it somewhere else in the memory

#

outside the function basically

eternal osprey
#

wait what

#

how

#

give me an example please

pale vessel
#

anyway, it's better to use database for your use case

autumn aspen
#

is it possible to share a file in VSC?

honest perch
#

upload it to github?

#

and use git

pale vessel
#

there's the live sharing feature

honest perch
#

unless you have a vsc server i dont think that is available

autumn aspen
cinder patio
#

There can't be multiple global objects in JSON, put all of the objects in an array

autumn aspen
#

There can't be multiple global objects in JSON, put all of the objects in an array
@cinder patio how

#

where

#

also

earnest phoenix
#
[
// Objects
]```
cinder patio
#

By putting all of the objects inside an array... you should know this stuff

autumn aspen
#

thx

#

By putting all of the objects inside an array... you should know this stuff
@cinder patio oh yeah I tryed it I got and pb

carmine summit
#

why can't i link to PM2??

void vale
#

Who knows php and iis?

autumn aspen
#

lmao should I do a hentai command šŸ˜›

earnest phoenix
#

@autumn aspen you should read the rules

autumn aspen
#

@autumn aspen you should read the rules
@earnest phoenix chillax I wouldnt anyways

void vale
#
<div>
<?php page_content(); ?>
</div> 
function page_content()
{
    $path = getcwd() . '/' . config('content_path') .  $_SERVER['REQUEST_URI'] . '.phtml';
    echo file_get_contents($path);
}

Doesn't work on iis
Does anyone know how to configure iis to make this code work?

earnest phoenix
#

owo

abstract coyote
#

Hello!
I have a small issue with my bot. I am trying to make it delete the message if a staff member is pinged, so I cam up with this.

    const pinged = message.mentions.members.first();
    if(message.content.includes(pinged)){
        if (pinged.roles.cache.has('761622351489138769')){
            message.delete({interval: 0})
            const embed = new Discord.MessageEmbed()
                .setThumbnail(message.author.displayAvatarURL({format: "png"}))
                .setTimestamp()
                .setTitle(`You cannot ping our staff members, ${message.author.username}!`)
                .setDescription(`If you wish to contact us, make a ticket in our ticket channel!`)
                .setColor(config.primcolor)
            message.author.send(embed);
        } else return;
    } else return;```.

However, it does not delete the message nor private messages the author. I am sure there is a simple fix to my problem and if you find the time, could you help me with it?

Best regards c:
stray heron
#

.sa

abstract coyote
#

hm?

earnest phoenix
#

@abstract coyote why are you passing an object into message.delete()

abstract coyote
#

uhhh cause I am not too smart :c

balmy ether
#

opponent is rattata but in pics it comes pidgey some times.

grave smelt
#

I declared the const "ping" at the beginning of the code, but in the switch when I use it it says: "Cannot access 'ping' before initialization" what can i do?

earnest phoenix
#

@abstract coyote maybe the object's the reason why it's not working

#

lemme see the docs brb

abstract coyote
#

okay!

misty sigil
#

@balmy ether where are you getting your image from?

abstract coyote
#

I gotta go for a few mins ill read through if you sent anything :c

#

c:

#

thanks for the helP!

worthy pine
#

how do i

misty sigil
#

how do you?

earnest phoenix
#

@abstract coyote interval is not a valid property that should be passed in the object

balmy ether
earnest phoenix
#

it's timeout

misty sigil
#

@balmy ether that could be a problem with the API

balmy ether
#

hmm, iyazo dev said that the codes are correct @misty sigil , maybe ur right.

earnest phoenix
#

@abstract coyote try renaming interval to timeout

balmy ether
#

so what shall i do now?

earnest phoenix
#

because there is no property called interval in the docs for Message#delete(options)

#

but the one you're trying to use is timeout

grave smelt
#

I declared the const "ping" at the beginning of the code, but in the switch when I use it it says: "Cannot access 'ping' before initialization" what can i do?

earnest phoenix
#

@grave smelt can you send the code?

pale vessel
#

you're trying to access ping before defining it

#

just like the error says 4Head

grave smelt
#
//I don't send the interlude because it's not needed
switch(args[0]){
    case 'server':

        if(!args[1]) { return message.channel.send('Devi inserire un ip.') }
 
        ping(args[1], 25565, (error, reponse) =>{
            if(error) throw error 
            const ServerEmbed = new MessageEmbed().setTitle('Server Status')
            .addField('Server IP', reponse.host)
            .addField('Server Version', reponse.version)
            .addField('Online Players', reponse.onlinePlayers)
            .addField('Max Players', reponse.maxPlayers)
            message.channel.send(ServerEmbed)
        })
    break ```
pale vessel
#

show the whole file

grave smelt
#

ok

eternal osprey
#

hey

#

would this work:js if(message.author.id === 388583457779089412){

misty sigil
#

no

#

"388583457779089412" would tho

grave smelt
eternal osprey
#

ah okay

#
 if(message.author.id === "388583457779089412"){```like this
misty sigil
#

yes

earnest phoenix
#

@eternal osprey snowflakes aka IDs are too big for javascript to handle them as normal numbers so they're ALWAYS used as strings

eternal osprey
#

owh okay! Thanks!

carmine summit
#

how can I make my bot, When DMed, forward the message to a specific channel in a guild?

misty sigil
#

check if the message is a dm

pale vessel
#

it's fine for comparisons

carmine summit
#
client.guilds.cache.get('699877474925936680').channels.cache.get('761793171654705163').send()
```no work
eternal osprey
#

if (message.type === 'dm'){

}

pale vessel
#

channel.type

misty sigil
#

message.channel.type

carmine summit
#

yeah I know

eternal osprey
#

channel,.type sorry*

carmine summit
#

it works

misty sigil
#

it's fine for comparisons
@pale vessel its === so would it?

eternal osprey
#

what?

pale vessel
#

use ==

eternal osprey
#

why would === not work

pale vessel
#

since it checks for the type

eternal osprey
#

but it has to compare right

autumn aspen
#
client.on("messageUpdate", async message => {
    const editchannel = message.guild.channels.cache.find(ch => ch.name === "general")
    if (!editchannel) return

    const embed = new Discord.MessageEmbed()
        .setAuthor(`${message.author.tag}`, message.author.avatarURL())
        .setDescription(`Message edited in ${message.channel}`)
        .addField("Old Message", message, true)
        .addField("New Message", newmessage, true)
        .setTimestamp(message.createdAt)
        .setFooter(`User ID: ${message.author.id}`)

    editchannel.send(embed)
})

How can I check new message?

pale vessel
#

ids are always in strings so you would need to use quotes if you use ===

autumn aspen
#

ids are always in strings so you would need to use quotes if you use ===
@pale vessel wdym

carmine summit
#

uhh... I don't have a filter that if its DM it wont go through

eternal osprey
#

yeah matthew already told me

#

if(message.author.id === "388583457779089412"){

autumn aspen
#

@eternal osprey check this code pls```js
client.on("messageUpdate", async message => {
const editchannel = message.guild.channels.cache.find(ch => ch.name === "general")
if (!editchannel) return

const embed = new Discord.MessageEmbed()
    .setAuthor(`${message.author.tag}`, message.author.avatarURL())
    .setDescription(`Message edited in ${message.channel}`)
    .addField("Old Message", message, true)
    .addField("New Message", newmessage, true)
    .setTimestamp(message.createdAt)
    .setFooter(`User ID: ${message.author.id}`)

editchannel.send(embed)

})

eternal osprey
#

justjs if message.channe.type !== 'dm'{

#

return}

carmine summit
#

it ssays that it cannot read property 'first' of null

#

o wait

autumn aspen
#

I want to see the new message

pale vessel
#

messageUpdate gives old message and new message

autumn aspen
#

so what am I gonna do

pale vessel
#

you didn't define newmessage

autumn aspen
#

oh ok

pale vessel
#

add newmessage after message

#

async (message, newmessage)

#

don't just put the message object

#

you can only do that inside template literals (``) since it would .toString() it, which gives the content

autumn aspen
#

you probably meant to put message.content
@pale vessel if I send the hb can u edit it for me

pale vessel
#

nope

autumn aspen
#

bc I dont understand

pale vessel
#

sorry

boreal iron
#

Morning

autumn aspen
#

sorry
@pale vessel oh thx

#

worked now lol

pale vessel
#

Morning
@boreal iron morning, developer

solemn jolt
#

What's this error?

pale vessel
#

you have 11 message listeners

#

are you using a bew listener for each command?

solemn jolt
#

YupšŸ˜…

pale vessel
#

you should only use one listener for all commands

solemn jolt
#

Ok

#

@pale vessel thank you

pale vessel
#

šŸ‘

earnest phoenix
#

or u can increase it by using event

exotic prawn
#

hi

pale vessel
#

don't put a bandaid to it

#

actually fix the issue

earnest phoenix
#

bruh what tutorials are these people following to have 11 message listeners

boreal iron
#

Which activity status type is Luca using? ā€žWatching...ā€œ ?
Status types for bots are only ā€žPlaying - Listening - Streamingā€œ

#

Luca might be a cheater bot

cobalt spruce
#

how i transfer this to V12

         .addField("• Users", `${client.users.size.toLocaleString()}`, true)
         .addField("• Servers", `${client.guilds.size.toLocaleString()}`, true)
         .addField("• Channels ", `${client.channels.size.toLocaleString()}`, true)
#

@boreal iron

boreal iron
#

Dude I told u like a hundred times imma not working with the DiscordJS library and dunno it’s syntax

#

I can help u fixing JS issues

cobalt spruce
#

ok

#

;-;

misty sigil
#

@cobalt spruce .cache.size

cobalt spruce
#

``` .addField("• Users", ${client.users.cache.size.toLocaleString()}, true)
^

TypeError: Cannot read property 'cache' of undefined
at C:\Users\Islam\Desktop\Discord Bot\commands\botinfo.js:34:47
at Timeout._onTimeout (C:\Users\Islam\Desktop\Discord Bot\node_modules\cpu-stat\index.js:84:14)
at listOnTimeout (internal/timers.js:549:17)
at processTimers (internal/timers.js:492:7)```

#

@misty sigil wtf

misty sigil
#

Which activity status type is Luca using? ā€žWatching...ā€œ ?
Status types for bots are only ā€žPlaying - Listening - Streamingā€œ
@boreal iron https://discord.js.org/#/docs/main/stable/class/ClientUser?scrollTo=setActivity

cobalt spruce
#

why it cant read cache

#

?

balmy ether
#

how to get status like Dank memer its a video like.

earnest phoenix
#

I have a template which uses sql and its in php how can I host it for free?

compact oriole
#

Never host free

#

Use a cheap vps :P

#

Like Contabo

#

Or Hetzner

earnest phoenix
#

how to get status like Dank memer its a video like.
@balmy ether Set ur activity for 'WATCHING'

balmy ether
#

someone asking in dm that if we make bot by bdfd and bot ghost will it be online 24/7 and will all commands work , idk too.

compact oriole
#

Or GalaxyGate

earnest phoenix
#

aws VPS?

compact oriole
#

@balmy ether you asked already

#

Aws is overpriced to hell

cobalt spruce
#
         .addField("• Users", `${client.users.cache.size.toLocaleString()}`, true)
                                              ^

TypeError: Cannot read property 'cache' of undefined
    at C:\Users\Islam\Desktop\Discord Bot\commands\botinfo.js:34:47
    at Timeout._onTimeout (C:\Users\Islam\Desktop\Discord Bot\node_modules\cpu-stat\index.js:84:14)
    at listOnTimeout (internal/timers.js:549:17)
    at processTimers (internal/timers.js:492:7)```
WTF
earnest phoenix
#

I get aws free

#

OO

cobalt spruce
#

can any one explaine

#

@earnest phoenix how?

compact oriole
#

Well, at least aws vps is a vps

#

And it is serviceable

earnest phoenix
#

github

cobalt spruce
#
         .addField("• Users", `${client.users.cache.size.toLocaleString()}`, true)
                                              ^

TypeError: Cannot read property 'cache' of undefined
    at C:\Users\Islam\Desktop\Discord Bot\commands\botinfo.js:34:47
    at Timeout._onTimeout (C:\Users\Islam\Desktop\Discord Bot\node_modules\cpu-stat\index.js:84:14)
    at listOnTimeout (internal/timers.js:549:17)
    at processTimers (internal/timers.js:492:7)```
WTF

@compact oriole

#

can u explaine what is going on

earnest phoenix
#

cache is undefined

#

LOL

#

'cache' of undefined

cobalt spruce
#

HOW TO FIX

honest perch
#

by defining client.users

earnest phoenix
#

^^

#

XD

cobalt spruce
#

it is client.users

#

wtf

earnest phoenix
#

I am not good

#

XD

#

but I am a idot dev

#

XD

compact oriole
#

NO

#

Don't ping me to help you

#

I only help when I want

#

Or when I find it interesting

#

Or I know the person

autumn aspen
earnest phoenix
#

@cobalt spruce
~```
You’re getting this error because the guild object you fetch doesn’t have a roles property. So something probably went wrong getting the data with let guild = await message.guild.members.fetch(); or the data isn’t what you thought it would be.

I recommend you write the value of guild out to the console with console.log or by whatever means Discord gives you to log debug messages

leaden flame
#

i using visual code to make bot

#

but i dump

#

idk coding

#

🤣

autumn aspen
#

i using visual code to make bot
@leaden flame well no shit

misty sigil
#

then learn first

autumn aspen
#

^^

leaden flame
#

how

honest perch
#

@misty sigil jetbrains is epic

autumn aspen
#

OMG

earnest phoenix
#

codemy

slender thistle
#

Why not start with simple projects like learning basics of your programming language? @leaden flame

grave smelt
#

I declared the const "ping" at the beginning of the code, but in the switch when I use it it says: "Cannot access 'ping' before initialization" what can i do? (the code: https://hasteb.in/golalinu.coffeescript)

leaden flame
#

@slender thistle i know only html python

#

no java script

autumn aspen
#

Anyone that can check my hb and see whats wrong?

earnest phoenix
#

I want cpanel for free

slender thistle
#

@leaden flame Do you want to learn JavaScript or make a Discord bot in Python?

earnest phoenix
#

I want to learn making bots with JS

#

I dont want to read as well

#

What should I do

#

I like videos

honest perch
#

no

#

learn js

slender thistle
#

First learn JS, best way is through documentations

earnest phoenix
#

ooo

#

What is wrong?

boreal iron
cobalt spruce
#

@boreal iron man the types are

#

WATCHING , PLAYING , STREAMMING

#

and LISTENING

quartz kindle
#

@boreal iron It's intentional right now because users cannot set a watching status, so you shouldn't receive one from anyone.

#

they removed it from the docs on purpose, but it still exists, its type number 3

boreal iron
#

Ah alright, thanks

earnest phoenix
#

Does this server have a github page?

boreal iron
#

lol id 3 is missing, obviously... should have tried it myself

pale vessel
#

probably won't last long though

cinder patio
#

github page for what?

pale vessel
quartz kindle
#

discord ios? so you get the mobile status? lmao

slender thistle
pale vessel
#

yes 5head

earnest phoenix
#

XD

pale vessel
#

i don't really use it, just for testing purposes

#

making a good lib is still hard for me

quartz kindle
#

mine is abandoned lmao

pale vessel
#

what's it called?

quartz kindle
#

idk

#

didnt give it a finished name

earnest phoenix
#

npm i idk

#

XD

quartz kindle
#

xD

pale vessel
#

npm i discord.tim

quartz kindle
#

was gonna call it something like discord nano or whatever

earnest phoenix
#

Js or ts

quartz kindle
#

js

#

fuck ts

pale vessel
#

discord vim \😳

earnest phoenix
#

On github?

#

npm i baby-discord

quartz kindle
#

its not on github

slender thistle
#

discano

pale vessel
#

discordeno

earnest phoenix
#

npm i Tim-baby-discord

#

XD

#

Discordjs-but-i-wont-eat-your-ram

#

šŸ˜‚

pale vessel
#

also-called-discord.js-light

earnest phoenix
#

there is discord light right?

#

imagine-using-discordjs

quartz kindle
#

lmao

earnest phoenix
#

g2a gives free refunds a lot

#

XD

quartz kindle
#

i have a bunch of unfinished stuff that i havent worked on in months

#

sad to look at

earnest phoenix
#

oo

boreal iron
#

Well life has different plans... always

quartz kindle
#

i havent worked on my most important things in like 6 months

#

xD

boreal iron
#

Midlife crisis or just no time? 😊

earnest phoenix
#

i havent worked on my most important things in like 6 months
@quartz kindle Getting a girl?

#

XD

#

JK

boreal iron
#

Whoops forgot to mention that

quartz kindle
#

nah, that one has been shelved for 6 years

compact oriole
#

For me 16 years

earnest phoenix
#

I am only 16 yrs

#

XD

opaque seal
#

What's your opinion on python guys?

earnest phoenix
#

Its good

#

leading language

#

and I am compelled to study it for 2yrs for sure

#

XD

#

šŸ‡

opaque seal
#

what?

earnest phoenix
#

my opinion

#

XD

quartz kindle
#

i have never done anything with python, but im not a fan of the indentation system

opaque seal
#

what do you even study in 2 yeasrs of the same language

#

i have never done anything with python, but im not a fan of the indentation system
that seems bad yeah

earnest phoenix
#

In school

#

Grade 11 and 12

opaque seal
#

You do 2 years of python?

#

uhm,

earnest phoenix
#

yea

opaque seal
#

that seems like a waste

earnest phoenix
#

including some database and software making as well

slender thistle
#

3 years of using python

opaque seal
#

I mean, using it is a thing, but studying it is another

slender thistle
#

Convenient for small scripts if you get used to dynamic typing

#

A hellton of libraries to help you do calculations also

fluid basin
#

I love my list comprehensions and one-liners KEKW

misty sigil
#

i wanna make a dsl webhook package but it'll be shit

slender thistle
#

Like you have matplotlib, numpy, sympy, great support for Tensorflow

#

I'm working on adding a DSL webhook to dblpy but the current webhook system will be reworked

#

Because we really needed that hecking WebhookManager

opaque seal
#

Is it already there in dblapi.js?

misty sigil
#

i dont think so

opaque seal
#

I mean, you simply pass in the webhook auth and port in the constructor, isn't that already good enough?

quartz kindle
#

dblapi,js already has webhooks yes

#

but not for servers

misty sigil
#

it has webhooks but for bots

quartz kindle
#

onƧly for bots

opaque seal
#

ah right

autumn aspen
#
let m = await message.channel.send("**Wait...**").then(m => {

                m.edit(embed)
                m.edit(" ")
                m.react("āŒ").then(m => {
                message.awaitReactions((reaction, user) => user.id == message.author.id && (reaction.emoji.name == 'āŒ'),
                { max: 1 }).then(collected => {
                if (collected.first().emoji.name == 'āŒ') {
                m.delete()
                }
            })
        })
    })
                
            
}   

I want to delete the embed by reacting to the x (author only) but it doesnt work and no errors?

compact oriole
#

I built my own server with fastify for webhooks

#

as webhooks are just post/get requests

opaque seal
#

what's fastify?

quartz kindle
#

why are you still editing it twice

compact oriole
#

fastify > expressjs

#

it is a server lib

opaque seal
#

never heard of it, should take a look

compact oriole
#

it is super good for simple stuff and typescript

#

sadly 0http has no types :(

autumn aspen
#

why are you still editing it twice
@quartz kindle bc it doesnt delete the word so u must do that

quartz kindle
#

i tried fastify some time ago, didnt like it xd

violet mesa
#

discord.py
how do i make something do the same thing all the time (i want the amount of servers the bot is in to always change to correct)

compact oriole
#

I would use 0http if it had types :P

autumn aspen
#

@quartz kindle and why does it not delete when Im try to react to the x

#

?

opaque seal
#

want to delete the embed by reacting to the x (author only) but it doesnt work and no errors?
Use console.log to debug and check the values you get

slender thistle
#

discord.py
how do i make something do the same thing all the time (i want the amount of servers the bot is in to always change to correct)

Uhm... use len(bot.guilds)?

#

Unless you disable the guilds intent, you'll have guilds cached properly for the most part

opaque seal
#

with a scheduler too if you wanna update it every x minutes

quartz kindle
#

@autumn aspen ah i understand now what you're talking about.... you have to pass null content to it, something like this ```js
m.edit({
content:null,
embed
})

#

you are waiting for reactions on the author's message, not the message the bot sent

grave smelt
#

how can i create a file with the bot's logs inside?

opaque seal
#

js?

grave smelt
#

yes

opaque seal
#

I think fs is able to write json files

#

iirc

#

what are bot logs exactly?

grave smelt
#

example: messages from both the bot and users, including errors

gentle lynx
#

is it possible to covert String to JSON? for example,

let JSON = {"name": "glassy", "lastName": "killer"}

and convert the variable JSON to an object

quartz kindle
#

thats already an object

gentle lynx
#

ah wait

#

its in mysql

quartz kindle
#

also, dont name a variable JSON, because its a reserved name

gentle lynx
#

and when i get sword it returns as a String

quartz kindle
#

obj = JSON.parse(string)

gentle lynx
#

šŸ‘

#

thanks

slender thistle
#

Hey Tim, you got any articles on async programming?

quartz kindle
#

idk i dont read much articles lul

violet mesa
#

@slender thistle what does that mean

Uhm... use len(bot.guilds)?
@slender thistle

#

im stoopid

boreal iron
#

God damn I’m not even able to complete my sentence... @quartz kindle stop being faster than me

violet mesa
#

woops

slender thistle
#

šŸ˜‚ eh well there goes my data I guess

violet mesa
#

double ping

quartz kindle
#

Lol

slender thistle
#

It only mentions once per message anyway

thin turret
#

Shivaco? More like ... free shivacadoo

slender thistle
#

you triedā„¢ļø

marble juniper
#

Shivacowo

#

@digital ibex no u

slender thistle
#

@violet mesa literally what it says. Size of client.guilds depends on how many guilds the bot is in. Unless Discord doesn't send events related to them

#

@digital ibex I strongly suggest you delete that and never say that in this server again

#

jokes or not

digital ibex
#

ok

boreal iron
#

Shouldn’t GUILD_CREATE been send anyways?

slender thistle
#

Yeah, unless Discord breaks

#

Or you forget the guilds intent

boreal iron
#

Nah thought even without the right intent for it

#

nvm it's GUILD_PRESENCES

violet mesa
#

yea but how do i use it

pale vessel
#

i hate discord for not allowing bots to fetch a member's presence without the guild presences intent

#

they allowed us to fetch a member without the guild members intent

#

why not presences too smh

violet mesa
#

yea but how do i use it
@slender thistle

muted garnet
#

helo

slender thistle
#

wdym how to use it

boreal iron
#

using what? len(bot.guilds)

slender thistle
#

Just access the property

pale vessel
#

JUST 4heed

gentle lynx
#

@quartz kindle hey, so lets say that i convert the String to JSON, I edit the JSON object, how can i re-convert it to a String?

pale vessel
#

JSON.stringify(object)

boreal iron
#

JSON.stringify as I tried to explain before Tim "stole" my anwser

quartz kindle
#

Lol

gentle lynx
#

oh hahah

#

thanks :P

opaque seal
#

If I wanna publish a Discord Bot on GitHub and make it open source, what license should I use, I'm confused

eager nest
#

I have a websocket error on discord.js
Someone can help me?

quartz kindle
#

what do you want to allow people to do with it?

eager nest
#

"websocket was closed before the connection was established"

#

That error

opaque seal
#

what do you want to allow people to do with it?
I want them to be able to see the code and self-host the bot but obviously not act like if they made it

quartz kindle
#

probably something like GPL then

#

do you want their bot to also be open source?

opaque seal
#

uhm, what do you mean with their bot?

cobalt spruce
quartz kindle
#

@opaque seal for example, a license like AGPL states that if they want to use your code, they must make their entire project open source as well to match yours

#

the regular GPL is the same but only applies to distributed code (downloadable), not for hosted code

opaque seal
#

Uhm idk, I don't think I need them to make their code open source