#development

1 messages ยท Page 845 of 1

crimson vapor
#

you couldnt do .find() in JSON

slate oyster
#

Because the literal JSON encoding is unnecessary 'cuz I can just plug in the data

#

without first accessing the files

crimson vapor
#

in mongo you can do .find() allowing for an easier way to store it

quartz kindle
#
members [
  {
    guildid:id
    members:{
      member1
      member2
    }
  }
  {
    guildid:id
    members:{
      member1
      member2
    }
  }
]

members.find({guildid:id}).members.find({memberid:id})```
#

i dont use mongo so idk if this is correct, but something like this

slate oyster
modest maple
#

badddddd

#

Loops == slow

crimson vapor
#

how do you read that

quartz kindle
#

why is it all black

#

lmao

slate oyster
#

I use eclipse instead normally

modest maple
#

messy and slow operations will kill your bots

slate oyster
#

Well
When I used JSON
I didn't know how else to query data
But I actually removed my only call to that function

#

Because once I though I needed to search all of my documents to look for a certain piece of data

earnest phoenix
#

Hello, how i can do a leaderboard for dblapi?

valid holly
slate oyster
#

My .query function is essentially find, but for my JSON

.query(doc->{
  AtomicReference<Long> time = new AtomicReference<Long> ();
  doc.getObject(obj->id.set(obj.getOrDefaultLong("time", 0)));
  return searchTime == time.get();
})

vs
.find({time: searchTime})

earnest phoenix
#

I just came from api and they sent me here

slate oyster
#

@modest maple

#

and @quartz kindle

earnest phoenix
#

:v

twin iron
#

yo, do you know the time for the bot being verifyed ? i added it yesterday and is still waiting

crimson vapor
#

2 weeks

azure tinsel
#

or longer

twin iron
#

seriously lol yoj

azure tinsel
#

srsly

twin iron
#

you not funny yojj0oy

azure tinsel
#

i had to wait like 2 weeks for mine

twin iron
#

oof

modest maple
azure tinsel
#

yep

twin iron
#

i hope you are lying sueurs

modest maple
#

nope

azure tinsel
twin iron
#

arf

modest maple
#

that took a depressing amount of time todo

#

xD

azure tinsel
#

UGH now i have to convert my functions from json reading to sqlite

slate oyster
#

@modest maple My previous system cached data when it got loaded
So it wasn't as slow for blocking

twin iron
#

but you really waited 2 weeks ?

quartz kindle
#

it can be anywhere from a couple days to over 2 weeks

#

depends on the queue size, how busy are the mods, etc

azure tinsel
#

but you really waited 2 weeks ?
@twin iron yep

twin iron
quartz kindle
#

my bots have always been around 5-7 days for me

azure tinsel
#

mood

#

lucky

modest maple
#

@slate oyster that will kill you when you get to bigger systems

slate oyster
#

Why is the emoji called clown lol
!I would call it :fakelrm:
(Discord is slow)

azure tinsel
#

json is only suitable for small bots

twin iron
slate oyster
#

Unless it's just not loading?

modest maple
#

ive worked with bots that are in a few thousand servers and using Json files EVEN IF THEY ARE CACHED cause massive delays

slate oyster
#

Oof'

#

It just loaded

twin iron
modest maple
#

thats just for the jsons being updated

quartz kindle
#

my bot got do 2500 using json lmao

azure tinsel
#

*dies*

modest maple
#

we got to 3.8k then it quite dramatically died

quartz kindle
#

but it was two big json files perma-loaded in memory, so not that bad

modest maple
#

same

azure tinsel
#

huh

modest maple
#

we still had the issue that just updating the files

twin iron
#

json is bad for store a lot of informations

modest maple
#

yh

twin iron
#

json is good for quick and little db setup

azure tinsel
#

just use a proper db

modest maple
#

even just updating the json files as long term storage would cause a long enough delay to block everything

#

and that was just one file per guild which was only about 20 lines each file

earnest phoenix
#

Uhm so I have a problem

quartz kindle
#

not if you know what you're doing

#

where does this problem come from?

earnest phoenix
#

its this Error: Cannot find module '/Users/,,,,,,/index.js'

slate oyster
#

ive worked with bots that are in a few thousand servers and using Json files EVEN IF THEY ARE CACHED cause massive delays
@modest maple

Wow

modest maple
#

Jsons will not last

quartz kindle
#

where does this error come from? @earnest phoenix

modest maple
#

and you either upgrade and replace with a DB while files are small

#

or deal with the consequences when they're bigger

slate oyster
#

I'll update to DB
using collection names like
guilds.0.users

earnest phoenix
#

throw err;
^

Error: Cannot find module '/Users/...../index.js'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:976:15)
at Function.Module._load (internal/modules/cjs/loader.js:859:27)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
at internal/main/run_main_module.js:17:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []

#

tHIS IS COMING FROM MY TERMINAL

quartz kindle
#

well, you CAN make a performant database with json, but it takes a LOT of work, that databases already did for you over the last decades

slate oyster
#

At least I'm stopped single-filing it

#

Wait

quartz kindle
#

@earnest phoenix what did you do to show that error?

earnest phoenix
#

I tride to node index.js

#

in my terminal

quartz kindle
#

well do you have an index.js file?

earnest phoenix
#

yes

quartz kindle
#

then you're in the wrong folder

azure tinsel
#

try cd (path to folder) and then node index

quartz kindle
#

which folder is your index.js file in?

earnest phoenix
#

in my mega man battle network bot folder

quartz kindle
#

then go to that folder, hold SHIFT, and right click on the folder empty space

azure tinsel
#

cd into the folder

quartz kindle
#

and click "open command prompt here"

modest maple
#

if your on windows just go into the folder go to search bar to navigate file path and type CMD and itll open already CDd in

quartz kindle
#

when you are in your terminal/cmd, you have to make sure the folder that the terminal is in, is correct

earnest phoenix
#

it wored

gray pagoda
#

@modest maple nice pfp

earnest phoenix
#

worked thank you!

quartz kindle
modest maple
#

ty

gray pagoda
#

cd {directory}

modest maple
#

tbf for changing directories easily across drives

azure tinsel
#

yeah

modest maple
#

i just go to powershell

azure tinsel
#

i prefer cmd

modest maple
#

powershell can do alot more

gray pagoda
#

Idk, I just use VS code terminal

azure tinsel
#

that's basically cmd @gray pagoda

gray pagoda
#

Powershell

azure tinsel
#

the same thing

gray pagoda
#

you see at the upper right cotner of the tab

#

I don't really care because I just do commands like mkdir or npm i

#

๐Ÿ˜„

azure tinsel
#

yeah, that's the standard windows command prompt lol

gray pagoda
#

Yes?

azure tinsel
#

yeah

elder vine
#

What kind of dbs u guys using?

gray pagoda
#

dbs = ?

elder vine
#

databases

azure tinsel
#

i'm migrating to sqlite at the moment

gray pagoda
#

I'd use MongoDB

#

Is made to handle a lot of data with low Intervals

elder vine
#

I use Mongo aswell

dreamy breach
#

I use mysql

#

And it works well for more than 1M users.

gray pagoda
#

I use mysql
@dreamy breach can you read MySQL from Node.js?

dreamy breach
#

Yep but that's not really made for that because you always need to do async function everywhere.

#

It's very useful for languages like java.

#

compiled one

gray pagoda
#

What module do I use for that?

dreamy breach
gray pagoda
#

Thx

azure tinsel
#

sqlite works well with node.js

dreamy breach
#

yep especially enmap

azure tinsel
#

mhm

dreamy breach
#

You didn't try it ?

gray pagoda
#

Any opinions?

dreamy breach
#

Looks clean, especially the front page, maybe more delimitation for the chat part to really see where you can scroll/chat.

gray pagoda
#

When you send more than 4 messages it allows you to scroll down

#

also, made entirely with WebSockets

dreamy breach
#

you're insane ๐Ÿ˜ฎ

#

I was more talking about vertical ui divider

gray pagoda
#

Yes, this COVID thing is harming me

#

๐Ÿ˜‚

dreamy breach
#

x)

gray pagoda
#

I was more talking about vertical ui divider
@dreamy breach yh, I'll try that later

normal breach
#

Sorry to interrupt, but I have a question. What is the prefix for @pliant gorge? I added the bot to my server, and I donโ€™t know what the prefix is.

mossy vine
#

it doesnt have one

normal breach
#

Well.

gray pagoda
#

@dreamy breach and last, my project creator

#

That idk how I will do

dreamy breach
#

It automatically creates a new project with default files?

slender thistle
#

@normal breach You use the site to list your server. The bot is only there to track members count and emojis.

gray pagoda
#

It automatically creates a new project with default files?
@dreamy breach baaic code, setting file, install modules etc...

normal breach
#

Oh

dreamy breach
#

wow, wp

normal breach
#

Welp, I didnโ€™t know.

#

Thanks for telling me.

gray pagoda
#

It will copy a file, open it (to install the modules) and nake the program wait for the batch to close, when It close it prints something like Module Installed then do the rest

#

However, I am still thinking how I will do It without needing to write any file because the framework doesn't allow me

dreamy breach
#

That's very interesting, which language is it?

gray pagoda
#

Is not a language itself, It's like a framework

#

Autoplay Media Studio 8

dreamy breach
#

Oh okay didn't know to be honest ^

gray pagoda
#

xD

#

idk C++, nor C#, so yh

#

but soonโ„ข

dreamy breach
#

๐Ÿ˜‰

gray pagoda
#

Do you have any cool projects I can see?

#

I am very bored :<

dreamy breach
#

I'm mainly working on discord bots right now for companies. You can always check my main project: mybrawlstats (BrawlStars tracker, website & bot) but I don't have a lot of projects like that ^

gray pagoda
#

For companies?

#

what companies?

quartz hill
#

How to move to the bottom line in Embed (addfield)? (discordjs)

dreamy breach
#

Mostly are mc based, I'm also working for solo customer.

gray pagoda
#

How to move to the bottom line in Embed (addfield)? (discordjs)
@quartz hill more context pls?

#

(Nice pfp also)

quartz hill
#

thx ๐Ÿ˜„

gray pagoda
#

So, what do you want to do?

quartz hill
#

Let me show an example.

dreamy breach
#

Oh I see

#

It's addField("title", "description", boolean)

#

Boolean is inLine

gray pagoda
#

use false

dreamy breach
#

So use false yep

quartz hill
#

ooh thx

gray pagoda
#

Then desvriotion do the text and the link

dreamy breach
#

Like: .addField("hello", "man", false)

quartz hill
#

I understand. I'm trying right now.

gray pagoda
#

Like:

sudden geyser
#

you could even just not pass anything and it'll default to false

gray pagoda
#

However he'd want to do it is fine

quartz hill
#

thx so much
its worked ๐Ÿ˜„

gray pagoda
#

np

#

๐Ÿ˜„

dreamy breach
#

๐Ÿ˜‰

gray pagoda
#

@dreamy breach want to see some code extremly complicated?

#

assets/index.js

dreamy breach
#

sure x)

gray pagoda
#

WebSockets, proxies, pass variables and functions, get mouse cordinates

#

my friend did it

#

very messed up

#

xD

dreamy breach
#

๐Ÿคฏ

gray pagoda
#

hi
@vital mango hey

#

๐Ÿคฏ
@dreamy breach or go to UserScript.txt

#

there iit recieve maxBots, current bots, requests and all that

dreamy breach
#

some random ints everywhere

gray pagoda
#

3 of them I made them

#

to merge it with the code

dreamy breach
#

the modifyCore() is brain destroyer

gray pagoda
#

xD

dreamy breach
#

.replace(/;if\((\w+)<1\.0\)/, ';if($1 < (!getOption("EXTENDED_ZOOM")))') Totally understandable.

gray pagoda
#

100%

#

If you want to ask him his discord is: slasher#8598 he speaks French, so you can understand more than wht I did

dreamy breach
#

Oh a baguette friend x)

gray pagoda
#

baguette = ??

dreamy breach
#

Too busy rn but will do for sure :p

gray pagoda
#

ree

#

if you understand 10% of the code I will give you...
epic music plays
the mega syntax power

#

which allows you to make all your code with perfect syntax and indent ๐Ÿ˜„

elder vine
#

What?

dreamy breach
#

Too much work to do rn sry, although the reward is enticing xD

gray pagoda
#

xD

#

What?
@elder vine some roleplay and messing arround

fringe creek
#

Hi

#

where i dowloand bot ?

#

can your help me ?

wicked pivot
#
client.on('voiceStateUpdate', (client, oldMember, newMember) => {
  const voiceChannels = oldMember.guild.channels.filter(c => c.type === 'voice');
  let newUserChannel = newMember.voiceChannel
    let oldUserChannel = oldMember.voiceChannel

   if(oldUserChannel === undefined && newUserChannel !== undefined) {
let count = 0;

    for (const [id, voiceChannel] of voiceChannels) count += voiceChannel.members.size;
    client.channels.get("689899436238831695").setName("En vocal : " + count)
}else if(oldUserChannel !== undefined && newUserChannel === undefined) {
  
  let count = 0;

  for (const [id, voiceChannel] of voiceChannels) count += voiceChannel.members.size;
  client.channels.get("689899436238831695").setName("En vocal : " + count)
}
});```

voiceChannel undefined
#

in v11

tight plinth
#

What you try to do

#

And where it's undefined

wicked pivot
#

for (const [id, "voiceChannel"] of voiceChannels) count += voiceChannel.members.size;

crimson vapor
#

this code is so confusing

earnest phoenix
#

Hey, how does the role.setPosition works in a create role ?
is it position: number?

crimson vapor
#

try it and see

wide wharf
#
client.on("message", message => {
^^^^^^
SyntaxError: Unexpected identifier
at new Script (vm.js:79:7)
at createScript (vm.js:251:10)
at Object.runInThisContext (vm.js:303:10)
at Module._compile (internal/modules/cjs/loader.js:656:28)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:699:10)
at Module.load (internal/modules/cjs/loader.js:598:32)
at tryModuleLoad (internal/modules/cjs/loader.js:537:12)
at Function.Module._load (internal/modules/cjs/loader.js:529:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:741:12)
at startup (internal/bootstrap/node.js:285:19)
``` **Error** ๐Ÿค”
crimson vapor
#

show your index.js

wide wharf
#

But its too long xD

#
client.on("message", message => {
    if (message.content === "mb!invite") {
    message.channel.send({embed: {
  color: 3447003,
  description: "Bot made by @wide wharf. DM for questions! \nMy invite link: https://bit.ly/mod_bot"
    }})
}});
``` @crimson vapor ^^^^
crimson vapor
#

send a pic then

#

ctrl - to zoom out

wide wharf
#

^^ there is the code ^^

tired nimbus
#

can better-sqlite3 store arrays

#

I know the point of sqlite table is to remove necessity of arrays

#

but at this point, I have better understanding and access to arrays with my current info

runic fulcrum
#

is there anyone who have ever user the guild.addMember() command and can explain to me how i should use it ? pleasee

tired nimbus
#

DoCs

runic fulcrum
#

has*

swift brook
runic fulcrum
#

i read them 5 times

tired nimbus
#

bruh

runic fulcrum
#

i can't find enough documentation

nocturne dagger
#

what library

ionic compass
#

Hello, I'm trying to get the name of a store channel, but apparently Discord.NET is returning just the ID and channel type. are store channels just not supported?

runic fulcrum
#

js

#

discordjs

cinder patio
#

@tired nimbus the best thing to do would be to use relations, and store array in a separate table. If you don't want that you can always use JSON.stringify / parse or String.join / String.split

#

Discord.js' documentation is very good

runic fulcrum
#

yeah indeed

#

i'm not saying it isn't

#

is just that i don't find in the guild.addMember command the oath2 code format

cinder patio
#

which version are you using?

runic fulcrum
#

i'm using the latest i think

#

6.13.4

cinder patio
#

I am not sure if that version of discord.js even exists

#

latest is v12

#

Anyways, I've never used addMember so I can't really help you

runic fulcrum
#

ah no

#

it is the npm version srry

copper cradle
#

@wide wharf there is something above that code breaking it, send code, and install a linter holy fuck that'd make it so much easier for you

elder garnet
#

how do i check if the guild id is ... in discordjs ?

golden condor
#

@runic fulcrum what do you what to do?

#

@elder garnet what discordjs version?

elder garnet
#

stable

#

v11

runic fulcrum
#

mhh

golden condor
#

That's not stable but ok

elder garnet
#

o h l o l

runic fulcrum
#

i want a bot to invite another bot

#

is it possible ?

golden condor
#

You use
const guild = client.guilds.get("guild id")
if(!guild) return (whatever you want)
else {}

#

@runic fulcrum I don't think so but I'll check

elder garnet
#

okay

golden condor
#

You sure your on v11?

runic fulcrum
#

mhhh ty for helping

cursive dagger
#

you can't do it via a library iirc

golden condor
#

Iirc = if I remember correctly right?

crimson vapor
#

iirc

golden condor
#

Lmao

cursive dagger
#

yes or if i recall correctly

crimson vapor
#

yeah I thought it was recall

golden condor
#

@runic fulcrum I'll check it out and if you can I will ping you

#

Same thing

runic fulcrum
#

discord faces are ugly

#

anyway ty

crimson vapor
#

wdym by discord faces?

runic fulcrum
#

emojs

crimson vapor
#

oh

#

you are on phone?

runic fulcrum
#

not

golden condor
#

I am on mobile

#

They look fine

runic fulcrum
#

is like that you can't use standard ascii emoji

crimson vapor
#

you need to disable it

#

:D

#

:)

runic fulcrum
#

srsly???

#

pls

#

tell me how

crimson vapor
#

settings somewhere

runic fulcrum
#

mhh ok

#

:0

#

ty :D

sullen salmon
#

In discord.js, how do I pass multiple arguments from client.on?

crimson vapor
#

you need to use a bind function

sullen salmon
#

Huh?

crimson vapor
#

ask someone like Tim

sullen salmon
#

But like, what do I do for guildBanAdd

crimson vapor
#

ooooo

#

just ( guild, member )

#

I think

#

you need to check the docs

runic fulcrum
sullen salmon
#

It doesn't say in the docs

runic fulcrum
#

you can now enter more than one param

#

try it

sullen salmon
#

Wait where do I add more than one param

runic fulcrum
#

,other param

crimson vapor
#

client.on("guildMemberRemove", (member) => {})

#

member is the only thing passed

sullen salmon
crimson vapor
#

no

runic fulcrum
#

like so

crimson vapor
sullen salmon
#

Oh and then I can just use them as guild and user in the function itself? Or does the "revolution" need to be there

runic fulcrum
#

yeah

sullen salmon
#

Okey thx @runic fulcrum

runic fulcrum
#

no no revolution is a var for my bot

sullen salmon
#

Aight

crimson vapor
#

oh ye thats correct

runic fulcrum
#

it works fine without XD

sullen salmon
#

Haha aight thank you guys

storm bluff
#

hello
why i can't mention emoji from discord to move it to database

    if (args[0] == "setfalseemoji") {
      let spiltEmoji = args[1].split(":");
      const emoji = message.guild.emojis.cache.find(
        emoji =>
          emoji.name === args[1] ||
          emoji.id === args[1] ||
          (spiltEmoji[1] && emoji.name == spiltEmoji[1]) ||
          (spiltEmoji[2] && emoji.id + ">" == spiltEmoji[2])
      );
      if (!emoji) return message.channel.send("Please put a emoji id");
      server.set(message.guild.id, emoji.id, "suggestions.falsereact");

      message.channel.send(
        `Successfully setup true emoji to ${message.guild.emojis.cache.get(
          emoji.id
        )}`
      );
    }```
only server couston emojis
runic fulcrum
#

your database should have the "utf8mb4" encoding or the "utf16" one

storm bluff
#

no

#

iam not

#

using json

#

i am using enmap

#

database

runic fulcrum
#

ah

#

srry, i don't know -_-'

storm bluff
#

:\

spare goblet
#

@storm bluff What error are you getting?

earnest phoenix
#

const queues = serverQueue.songs.map((song, index) => index + 1 + ". " + song.title).join("\n");
how does one make it to where it ignore the first song

storm bluff
#

@spare goblet waut

#

wait

earnest phoenix
#

i bad at math

spare goblet
#

if the index is 0 then return?

#

Or serverQueue.slice(1).map()

elder garnet
#

h0w d0 i fix this

    const blacklist = client.guilds.get("264445053596991498")
    if(!blacklist) meme();
    if(blacklist)
earnest phoenix
#

hmmmm

elder garnet
#

h e l p

spare goblet
#

@elder garnet What

elder garnet
#

okay

#

so

summer torrent
#

@storm bluff use Discord.Util.parseEmoji() for parsing custom emoji

elder garnet
#

i want to blacklist

spare goblet
#

None of that code makes sense???????

elder garnet
#

a server

#

and

#

it

#

does

#

it blacklists every server

spare goblet
#

Okay then fetch from your db and see if server ID is bled

elder garnet
#

**

spare goblet
#

And

#

Stop

#

Messaging

#

Like

#

This

#

It's

#

Really

#

Spammy

golden condor
#

How do you break a for loo[

elder garnet
#

?

#

ok

storm bluff
#

@spare goblet no errs]

spare goblet
#

return;

#

@storm bluff Then what's wrong with it

#

I don't understand

golden condor
#

How do you break a for loop

storm bluff
#

i want to make user can select emoji from discord and couston

spare goblet
#

@golden condor I already answered
Use return;

golden condor
#

But that doesn't work

spare goblet
#

Wdym doesn't work

golden condor
#
for (const video of videos) {
                try {
                    if (serverQueue.stop) return;
                    const results = await yts({ videoId: video.videoId })
                    const finalVideo = results
                    if (!finalVideo) continue;
                    await handleVideo(finalVideo, msg, voiceChannel, playlist, queue)
                } catch (e) { console.log(e) }
            }```
crimson vapor
#

can you use code blocks?

spare goblet
#

@storm bluff I'm aware. Someone suggested use Discord.Util.parseEmoji() to parse the emoji

#

You should do that.

storm bluff
#

oke

#

thanks

crimson vapor
#

thanks

spare goblet
#

It could be cuz it's in a try catch block but idk

#

Cuz the scope is different

earnest phoenix
#

@elder garnet just do this easy in where the command is located add this if(message.guild.id == "264445053596991498" ) {return;}

sullen salmon
#

How does one get a channel from an id?

spare goblet
#

@sullen salmon
Guild.channels.get(id)

#

@earnest phoenix That hardcode meownauseated

earnest phoenix
#

Pikachota but its easy

spare goblet
#

kittywot but hardcode is gross

earnest phoenix
elder garnet
#

okay thanks

crimson vapor
#

I hardcoded it in that when I vote for my bot it doesnt dm me

#

100IQ

earnest phoenix
#

@spare goblet btw thx chu for helping me heart9

spare goblet
#

np

sullen salmon
#

It says guild.channels.get is not a function @spare goblet

summer torrent
#

what is your djs version

sullen salmon
#

Latest I'm pretty sure

#

It doesn't mention the function in the docs either

spare goblet
#

@sullen salmon Guild must be defined sis

#

message.guild

#

For ex

sullen salmon
#

guild is defined

spare goblet
#

are you sure it's guild, user

#

I thought it returns member

#

One sec

sullen salmon
#

It is

spare goblet
sullen salmon
#

It gives user because the member object ceases existing

#

Because they are no longer a member if they get banned

spare goblet
#

Oh sorry it's cache

#

I think

#

:') sorry I'm on an old dev branch

#

guild.channels.cache.get()

sullen salmon
#

That worked, thx

earnest phoenix
#

oh right

#

12

#

i want to upgrade but too much work

blazing otter
#

did they get rid of guild.createChannel?

spare goblet
#

Yes

#

It's guild.channels.create()

earnest phoenix
#

yep

blazing otter
#

perfect, I see it, you're my hero

earnest phoenix
#

yep

spare goblet
#

pengusip Anytime have a good day

earnest phoenix
blazing otter
#

I'm trying to do a beginner tutorial without DM'ing them, so I think I'm going to try creating a user specific channel each time somebody joins then having it walk them through messaging, reacting, etc inside that channel

spare goblet
#

Good luck !

iron scroll
runic fulcrum
#

mhh

earnest phoenix
#
    const sayackanal2 = member.guild.channels.find('id', sayackanal)

How can I do this according to discord.js v12

runic fulcrum
#

@iron scroll if pp is locked you go in the cycle

iron scroll
#

yes

runic fulcrum
#

and then you check if his unlocked in the cycle ?

iron scroll
#

yes

#

have another value

runic fulcrum
#

mhhh

spare goblet
#

@earnest phoenix
Discord stable / V12
message.guild.channels.cache.get(sayackanal)

earnest phoenix
#

haven't you gotta wait 120 seconds before changing your bots status again on loop?

warm marsh
#

12

#

seconds

earnest phoenix
#

i thought i read something wrong 2 years ago

spare goblet
#

No it's now like 5-6s

warm marsh
#

Oh it was changed.

spare goblet
#

Discord changed it

#

But we don't recommend anything faster than 120s

#

Is annoying

summer torrent
warm marsh
#

Iara could you reset my name?

spare goblet
#

Done.

earnest phoenix
#

why is your name even tht

warm marsh
#

Thanks

spare goblet
#

Hoist prolly

pale vessel
#

because it was some hash

#

0938df03df48d30483894

warm marsh
#

My name used to be 95ec2c7d4ab594a

earnest phoenix
#

I need help

quartz kindle
#

some hash

earnest phoenix
#

again

spare goblet
#

Pls state what you need help with

#

Other than "I need help"

earnest phoenix
spare goblet
#

pengusip Ty

earnest phoenix
warm marsh
#

The error is probably self-explanatory.

pale vessel
#

yes he did i am stupid

warm marsh
#

Not even that. It's a semi colon instead of colon.

#

Yeah but that's not the only error.

pale vessel
#

his indentation is scuffed

earnest phoenix
#

what do I do?

warm marsh
#

Learn?

quartz kindle
#

case something : not ;

spare goblet
#

case 'ping';

This is wrong. Search up how switch case blocks work.

pale vessel
warm marsh
#

Also isn't using If else faster in a performance pov?

#

Or just if return

quartz kindle
#

depends

#

in his case, probably

#

is discord dying again?

warm marsh
#

Yeah it seems slow

quartz kindle
#

lul

earnest phoenix
#

Its not responding to ping

dreamy breach
#

I was asking the same to myself

warm marsh
#

Because you need to remove ! inside the case

#

due to using substring and removing it from the string

earnest phoenix
#

oh

quartz kindle
#

is this a double space?

earnest phoenix
#

yes

quartz kindle
#

that will never work

#

discord does not allow double spaces in messages

#

you will never receive a message with a double space

tight plinth
#

True

warm marsh
#

Use some regex

#

split(/\s+/)

quartz kindle
#

just use a single space

#

why even bother

tight plinth
#

Like that

warm marsh
#

But if someone uses a double or even more can ruin it?

#

Yeah you end up getting empty strings in args.

quartz kindle
#

wait since when does discord support double spaces lmao

tight plinth
#

Use single space

warm marsh
#

!help command

#

like that for example.

pale vessel
#

args[0] would be " "

warm marsh
#

Using args[1] would just get a string

#

with nothing in it or " "

tight plinth
#

s i n c e s o m e t i m e @quartz kindle

pale vessel
#

discord only trims messages

dreamy breach
#

Yep

#

So start and end of messages.

pale vessel
#

if you're using php it would be different mmLol

dreamy breach
#

:p

earnest phoenix
pale vessel
#

you should use regex

earnest phoenix
#

k

quartz kindle
#

why

#

do

#

you have

#

two logins?

#

and two clients?

earnest phoenix
#

oh shoot

pale vessel
#

two clients oof

frail ocean
#

I also recommend that you put the token either at the bottom so when you screenshot like that you can miss it out or make a config file for it; safer that way in case you were to accidently screenshot it.

quartz kindle
#

anyway either split on a single space .split(" ") or use regex like Dillon suggested: .split(/\s+/)

crimson vapor
#

when you split on single space, doesnt it just remove any spaces that are left

pale vessel
#

no

crimson vapor
#

for example, test test would be args[0] = test, args[1] = test

pale vessel
#

nope

dreamy breach
#

There is a function to remove all "" element of a list?

quartz kindle
ember bluff
#

hi
my bot on the site ??? How do I fix it stands with icon?
Is it because it is not attached to the dbl server?

quartz kindle
#

you can use .filter(Boolean) lol

ember bluff
crimson vapor
#

oh you are correct it does not

ember bluff
#

pls help

quartz kindle
#

@ember bluff yes, your bot will appear there when its approved

#

approval can take anywhere from a few days to 2 weeks

crimson vapor
#

why does it have 167 lol

ember bluff
#

already approved

quartz kindle
#

if your bot is already approved then it was kicked from here

#

search the #mod-logs for the kick reason and contact the mod who kicked it

ember bluff
#

What do you need to add?

pale vessel
#

he meant that it doesn't show if it's online or offline, just ???

ember bluff
#

not attached here for a long time

pale vessel
#

no?

quartz kindle
#

because it was kicked

#

bot was kicked from this server

ember bluff
#

had not already been added

crimson vapor
#

is it your bot?

ember bluff
#

yes

gray pagoda
#

@earnest phoenix I'd make a file for the token and prefix

ember bluff
#

linked to my other account

quartz kindle
#

was your other account banned from here?

ember bluff
#

no

quartz kindle
#

what is your bot's id?

crimson vapor
#

what is your other account, also you arent supposed to have alts in this server

earnest phoenix
#

Oh

ember bluff
#

639826292619083816

gray pagoda
#

Easier and faster

quartz kindle
crimson vapor
#

oh man I dont like when people do rainbow font

quartz kindle
#

@ember bluff

#

your bot was kicked for DMing people when they joined

ember bluff
#

oh shit

gray pagoda
#

reee

ember bluff
#

so how will it improve

#

what should I do

amber fractal
#

disable it for here

quartz kindle
#

disable/remove the DMs

crimson vapor
#

remove DMs

quartz kindle
#

then contact Timo Halofan

ember bluff
#

ฤฑ did

earnest phoenix
#

@gray pagoda where do I put it?

gray pagoda
#

Go DM

cold lion
#

I've been waiting for a long time, my bot is unverified

crimson vapor
#

how long is a long time, it takes on average 2 to 3 weeks

cold lion
#

can you see my waiting time?

crimson vapor
#

I think

#

what is the bot's ID?

quartz kindle
#

you cant see waiting times

crimson vapor
#

I want to see if it was declined

#

if your bot's name is PUMA, it was declined

quartz kindle
#

if it as declined he would get a dm from luca

#

unless he has dms disabled

crimson vapor
#

I checked the bots he added and checked modlog for the bot that was added

#

is it possible to fetch a user on one shard and send a message from another shard?

narrow kettle
#

[C] can anyone explain why when i do this:

int* p = 0;
printf("%d", p);
printf("%d", *p);

the output is only 0, i know why its 0, but why is there no place where its storing its data?

crimson vapor
#

I dont know C but I think its because you are just printing a variable without changing it

warm marsh
#

Don't you use &p in C?

narrow kettle
#

you do but, int* is a pointer

warm marsh
#
int *p = 0;
printf("%d", &p);
narrow kettle
#

its the same as

int* p = 0;
printf("%d", p);
warm marsh
#

I don't have C installed so can't really run a test

narrow kettle
#

actually no, it will give a diferent answer but it wont give the needed answer

#

ok wait lemme clear my self and repost it real quick,
can anyone explain why when i do this:

int* p = 0;
printf("%d", p);
printf("%d", *p);

the output will only print 0, why wont it print the location of 0?

lone egret
#

hey, is there any way to redirect to a thanks page i made after my bot is added to a server? i tried adding my redirect url to the redirect urls list and put it in the link like that and it seems to not work: &redirect_uri=. is it even possible?

quartz kindle
#

to use redirect_uris you need to use oauth2

warm marsh
#

@narrow kettle ```c
int *p = 0;
printf("%d", &p); // 348767944
printf("%d", p); // 0

lone egret
#

so it doesnt work with bots?

quartz kindle
#

only if you use the full oauth2 flow with bots

#

ie, the user needs to allow you to request their data

#

so you can send them to a different location after adding the bot

#

basically like a "login with discord" thing

lone egret
#

ye but i just want to redirect to a thank you page after the bot is being added,if ill ask for more perms itll be suspicious

sullen salmon
#

So I'm getting this mysterious monster of an error on running:

(node:15668) UnhandledPromiseRejectionWarning: RangeError [EMBED_FIELD_VALUE]: MessageEmbed field values may not be empty.
    at Function.normalizeField (/home/zander/Documents/discord_bots/FBI-bot/node_modules/discord.js/src/structures/MessageEmbed.js:418:23)
    at /home/zander/Documents/discord_bots/FBI-bot/node_modules/discord.js/src/structures/MessageEmbed.js:438:14
    at Array.map (<anonymous>)
    at Function.normalizeFields (/home/zander/Documents/discord_bots/FBI-bot/node_modules/discord.js/src/structures/MessageEmbed.js:437:8)
    at MessageEmbed.addFields (/home/zander/Documents/discord_bots/FBI-bot/node_modules/discord.js/src/structures/MessageEmbed.js:252:42)
    at MessageEmbed.addField (/home/zander/Documents/discord_bots/FBI-bot/node_modules/discord.js/src/structures/MessageEmbed.js:243:17)
    at Client.<anonymous> (/home/zander/Documents/discord_bots/FBI-bot/index.js:95:11)
    at Client.emit (events.js:315:20)
    at Object.module.exports [as MESSAGE_UPDATE] (/home/zander/Documents/discord_bots/FBI-bot/node_modules/discord.js/src/client/websocket/handlers/MESSAGE_UPDATE.js:14:12)
    at WebSocketManager.handlePacket (/home/zander/Documents/discord_bots/FBI-bot/node_modules/discord.js/src/client/websocket/WebSocketManager.js:386:31)
warning.js:32
(node:15668) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
lone egret
#

one of ur fields is empty or null or undefined

sullen salmon
#

That's the thing

lone egret
#

all 3 is kinda the aame

sullen salmon
#

embed.addField("Content", oldMessage.content)

#

It's no empty

lone egret
#

try to console.log it

#

just to make sure

sullen salmon
#

console.log what?

#

Sending the embed in Discord works fine btw

lone egret
#

oldMessage.content

sullen salmon
#

It's just that error that appears

lone egret
#

try to console log this : oldMessage.content

#

to see if its rlly empty

sullen salmon
#

Aight

#

Nop, it's not empty

lone egret
#

what other fields do u have

#

maybe the problem is not that specific field

quartz kindle
#

you said the error happens when running the bot?

sullen salmon
#

When running yes

quartz kindle
#

are you trying to send something that is not ready yet?

sullen salmon
#
embed = new Discord.MessageEmbed;
    embed.setTitle("Message deleted");
    embed.setColor("BLUE")
    embed.setDescription("A message by " + oldMessage.member.user.tag + " (" + oldMessage.member.id + ")" + " was deleted in " + oldMessage.channel.toString())
    embed.addField("Content", oldMessage.content)
    embed.setFooter(new Date().toLocaleString())
    channel.send(embed=embed)
#

This is in on messageDelete

quartz kindle
#

are you checking if the deleted message is cached?

sullen salmon
#

It also gives the error when it executes that line

quartz kindle
#

oldMessage only exists on cached messages

#

ie, messages created after the bot started

sullen salmon
#

Yep it's all messages after the bot started

#

The embed itself works fine too, it's just that it gives an error every time

quartz kindle
#

it gives the error but it works anyway?

sullen salmon
#

Yep

earnest phoenix
quartz kindle
#

are you sure the error is coming from there?

#

also, are you using js or python?

golden condor
#

(node:3576) UnhandledPromiseRejectionWarning: http status: 303
The playlist search function on yt-search keeps returning this, has also done so for my friend, is there any fix?

sullen salmon
#

js

quartz kindle
#

the error says you're using js, but your code looks nothing like js

golden condor
#
const playlist = await yts({ listId: url.split("list=") })```
sullen salmon
#

It is js though

quartz kindle
#

then its wrong

sullen salmon
#

How?

topaz fjord
#

Wtf is that js

quartz kindle
#

MessageEmbed()

topaz fjord
#

you're mixing js and python

quartz kindle
#

and embed=embed will just give a boolean

sullen salmon
#

I mean I'm running it in js and it works....

quartz kindle
#

its clearly not working tho?

sullen salmon
#

Everything works

#

Except that it gives an error

quartz kindle
#

i mean, channel.send(embed=embed) is the same as doing channel.send(false)

sullen salmon
#

But it still executes the code correctly

quartz kindle
#

how does that make any sense

sullen salmon
#

No....

#

channel.send(embed==embed) would be sending a boolean

#

But I'm not using double equation signs

quartz kindle
#

im blind lol

sullen salmon
#

I'm using single

quartz kindle
#

but still

sullen salmon
#

Which passes an argument

quartz kindle
#

no need for that

sullen salmon
#

How should I do it then?

quartz kindle
#

MessageEmbed still needs () tho

#

just channel.send(embed)

sullen salmon
#

MessageEmbed still needs () tho
@quartz kindle I have used it without the () in other places and there it doesn't give an error

mystic violet
#

How do you host multiple domains portforwarding with VMS?

golden condor
#

Did anyone respond to my question my i was gone

sullen salmon
#

channel.send(embed) still gives the same erro

golden condor
#

or not

sullen salmon
#

r

golden condor
#

Snoekbaars

topaz fjord
#

I'm assuming oldMessage.content is null

sullen salmon
#

No

#

It isn't null, I console logged it and it sends correctly

runic fulcrum
quartz kindle
#

then how are you sure the error is coming from there?

sullen salmon
#

There is just an error for some reason even though everything works perfectly fine

#

Because the error log says at line 95

golden condor
#

Just do this

embed = new Discord.MessageEmbed()
    .setTitle("Message deleted")
    .setColor("BLUE")
    .setDescription("A message by " + oldMessage.member.user.tag + " (" + oldMessage.member.id + ")" + " was deleted in " + oldMessage.channel.toString())
    .addField("Content", oldMessage.content)
    .setFooter(new Date().toLocaleString())
    channel.send({embed: embed})```
warm marsh
#

no

topaz fjord
#

It can't be coming from that code

warm marsh
#

new Discord.MessageEmbed()
.setTitle();

topaz fjord
#

if none of them are null

runic fulcrum
#

@sullen salmon use the guide i linked, is the most complete one

topaz fjord
#

Or use the docs?

sullen salmon
#

Line 95 is embed.addField("Before", oldMessage.content)

runic fulcrum
golden condor
#
const embed = new Discord.MessageEmbed()
    .setTitle("Message deleted")
    .setColor("BLUE")
    .setDescription("A message by " + oldMessage.member.user.tag + " (" + oldMessage.member.id + ")" + " was deleted in " + oldMessage.channel.toString())
    .addField("Content", oldMessage.content)
    .setFooter(new Date().toLocaleString())
    channel.send({embed: embed})```
topaz fjord
#

Can you guys stop sending code

golden condor
#

That's his issue

#

No brackets

topaz fjord
#

It's not

#

you haven't even read the error

golden condor
#

and messed up code

topaz fjord
#

@sullen salmon then oldMessage.content is null

#

your error says fields can't be emoty

sullen salmon
#

But it isn't null

topaz fjord
#

*empty

sullen salmon
#

It isn't null

#

I've checked

topaz fjord
#

Your error message says otherwise

golden condor
#

that happens all the time

#

With my bot

#

Yet it still works

#

So ignore it

sullen salmon
#

Yet it prints out the correct message content and send the correct message content in the embed, so it isn't null @topaz fjord

golden condor
#

if it works

#

Ignore the error

sullen salmon
#

The error is annoying that it prints out every time though, how do I like prune it or something

topaz fjord
#

Don't ignore the error

golden condor
#

My bot has this too

#

But nothing goes wrong

sullen salmon
#

What do you want me to do? It works perfectly fine how it needs to work? It's gotta be an issue in the api if everything works correctly and it gives an error

golden condor
#

Could it be when an embed is deleted

quartz kindle
#

@sullen salmon what if you do oldMessage.content || "none"

#

do the errors still happen?

golden condor
#

When I delete and embed I get that error

sullen salmon
#

Yep @quartz kindle

#

Wait

quartz kindle
#

are you declaring the embed as a global variable?

golden condor
#

Say if(oldMessage.content.length === 0) return

sullen salmon
#

Well the error is gone but now it's just sending embeds with "none" in them constan tly without me doing anything

#

Idk maybe @quartz kindle

quartz kindle
#

is your bot replying to itself?

golden condor
#

is it doing it whenever a message is deleted in any server?

sullen salmon
#

Waaaiit

mystic violet
sullen salmon
#

I think I got it

#

It considers sending an embed an edit

golden condor
#

What

quartz kindle
#

yes

sullen salmon
#

Yhea this is cringe moment

golden condor
#

What??

sullen salmon
#

I put the console log statement at the wrong place

quartz kindle
#

embeds are sent as edits

golden condor
#

O

sullen salmon
#

Ok that's gotta be the thing

golden condor
#

I got errors

sullen salmon
#

Thx for helping me

golden condor
#

With music

#

(node:3576) UnhandledPromiseRejectionWarning: http status: 303
The playlist search function on yt-search keeps returning this, has also done so for my friend, is there any fix?

runic fulcrum
#

may i ask if anyone knows how to create a invite for a guildchannel using discord.js 12.1 ?

#

i checked the docs

lucid pasture
#

hey so my bot, for some reason, isnt imputing the reply, even though im using the same outline/setup for every command/ reply

runic fulcrum
#

the reply object is probably null

lucid pasture
#

but every command im using is the exact same format in the format of
bot.on('message' , msg=>{
if (msg.content == "instert text"){
msg.reply('insert reply');
}

})

runic fulcrum
#

mhh ok

#

what is the statement that does not return ?

lucid pasture
#

and all of the others work it. dosent return any statement or tell me there is an error

runic fulcrum
#

yeah

fleet chasm
#

brainwalker do you mean creating an invite for something like a text channel

runic fulcrum
#

yes

late hill
#

Are you saying that you're adding a listener for each command

feral fiber
#

@lucid pasture use === instead of ==

lucid pasture
#

ok

#

ill try that :)

fleet chasm
runic fulcrum
#

saw that

#

how do i access the object guildchannel ?

#

i didn't find anywhere

fleet chasm
#

what channel are you looking for, the channel where the command was executed?

lucid pasture
#

@feral fiber it still didnt work

runic fulcrum
#

i just want to make an invite for he guild

elder garnet
#
iff(msg.guild.id == "") {return;}
              ^
TypeError: Cannot read property 'id' of null

how do i fix dat

#

i have an value in

#

but i hid it

fleet chasm
#

just get a channel and use that method on it

feral fiber
#

Two f?

runic fulcrum
#

yeah

elder garnet
#

in the code its 1

runic fulcrum
#

but channel has no method create invite

feral fiber
#

Guild is undefined

runic fulcrum
#

the object "guildchannel" has

elder garnet
#

msg.guild is defined tho?

fleet chasm
#

look for a text channel

elder garnet
#

ok

late hill
#

it's null

fleet chasm
#

guildchannel is just a channel in the guild, like a text channel or a news channel

late hill
#

Likely because the message wasn't sent in a guild

runic fulcrum
#

oh

#

your right

#

textchannel has it

elder garnet
#

oh

runic fulcrum
#

ty really

#

<3

fleet chasm
runic fulcrum
#

:o

#

crap mb

lucid pasture
#

@feral fiber can i dm you what im working with

elder garnet
#

how do i check if the msg is a DM

fleet chasm
#

msg.guild

elder garnet
#

if(msg.guild == "DM")

#

?

earnest phoenix
#

if (msg.channel.type == "dm")

elder garnet
#

ok

#

ty

fleet chasm
#

if(!msg.guild)
use the ! operator to check if its not a guild

late hill
elder garnet
#

ok

earnest phoenix
#

@fleet chasm same thing?

fleet chasm
#

yeah, but the use of ! is a bit more compact i guess

earnest phoenix
#

how do I get a bot to mention random users?

oak cliff
#

u dont cause thats rude

valid holly
#

Keeping member object inside template literals will still mention the user.

#

Just randomize the members collection

#

And send.

earnest phoenix
#

I wanted to mention some users like WrongBotLol or DokiBot

valid holly
#

You can use JS's Math methods to randomize the collection of members and output.

#

Thinking your bot is in JS.

#

What lang do you use hun ?

earnest phoenix
#

Me?

valid holly
#

Yes.

earnest phoenix
#

I use Visual Studio Code sir

valid holly
#

Language not text editor.

earnest phoenix
#

english

valid holly
#

Programming language...

umbral radish
#

I has question how do i get the amount of servers my bot is in to show on the website

earnest phoenix
#

python

fleet chasm
#

askin what is your language

umbral radish
#

node.js

valid holly
#

Well client.guilds.cache.size will return the number of guilds your client is in.

#

Assuming you updated to v 12

#

If below remove cache.

umbral radish
#

okey

#

ty

valid holly
#

@earnest phoenix sorry I'm not too confident with python neither the lib, but method is the same.

earnest phoenix
#

Oh

valid holly
#

Get the members, randomize and output.

earnest phoenix
#

But how does commands work anyways

valid holly
#

Pretty vague what you asked, can you explain ?

earnest phoenix
#

Like I need commands to use

#

like for instance

#

my mega man bot prefix id Md!

valid holly
#

Allright.

#

Not really sure what you're trying to achieve, is it either adding commands to your bot or your bot to reply to a command with it's prefix ?

earnest phoenix
#

both but mainly the second one

#

It won't reply to ping hhhhh

valid holly
#

Haven't had experience with mongo, it's drop dead atm, few people use it, sorry.

quartz hill
#

[
<1 empty item>,
BinaryRow {
cid: '109419',
ownerid: '205649450222354433',
modtime: 2019-06-25T14:05:59.000Z
}
]
char.length Returns the length of it 2
Is there a way to get rid of deleted items? nodejs

earnest phoenix
#

I use !md ping but it doesn't work

warm marsh
#

@earnest phoenix does running !mdping work?

earnest phoenix
#

hmm let me try

warm marsh
#

Try?

earnest phoenix
#

Its not working

modest maple
#

@earnest phoenix You should be able to

warm marsh
#

Send code

earnest phoenix
#

ok

elder vine
#

Yes, you can use it on Glitch.

#

Remember to connect: mongoose.connect

copper cradle
earnest phoenix
#

here

warm marsh
#

Would of been nicer in hastebin

elder vine
#

What is error Aayala?

#

Sure.

earnest phoenix
#

I can't get it to say pong

#

i did ping

elder vine
#

d.js right?

copper cradle
#

just try it and see it isn't that hard

warm marsh
#

Why use both switch and if

elder vine
#

You know discord.js.org has a ping already in its example. Take a look there.

#

no.

copper cradle
#

yes

elder vine
#

Talked to aayala

copper cradle
#

mongoose

#

google it and read its docs

elder vine
#

Have you declared the mongoose module?

copper cradle
#

they don't have it installed

#

yet

elder vine
#

npm install mongoose

#

Use: const mongoose = require("mongoose");

copper cradle
#

mongoose is just for you to interact with the database

#

and it's a npm module

elder vine
#

then mongoose.connect(CONNECT_STRING, { useNewUrlParser: true, useUnifiedTopology: true });

copper cradle
#

yes

elder vine
#

If you need more help, I have a video on setting up mongodb with a discord.js bot.

copper cradle
#

marketing 100

elder vine
#

Yes.

copper cradle
#

YES IT WORKS

#

np mate

warm marsh
#

@earnest phoenix What is your prefix?

earnest phoenix
#

!mb

warm marsh
#

Okay.

elder vine
#

What's the error Aayala?

earnest phoenix
#

i'm trying my best here lol

warm marsh
#

I don't see much wrong with the code tbh

earnest phoenix
#

It won't respond with pong

elder vine
#

Does it say Ready?

earnest phoenix
#

yes

#

i'm using terminal to host it

elder vine
#

alright.

#

Yes.

warm marsh
#

@earnest phoenix you don't need to have the commandTrigger variable .

earnest phoenix
#

I deleted it

warm marsh
#

Also you can shorten most of that event.

earnest phoenix
elder vine
#

Most likely the switch statement

warm marsh
elder vine
#

use

#

you can try use if statement

#

or just jump right to a cmd handler

warm marsh
#

A switch statement and if statement are still considered a command handler

earnest phoenix
#

I don't understand now

warm marsh
#

Read the file.

#

Learn how it works, go from there.

earnest phoenix
#

Where do I put new commands in the same file?

warm marsh
#

You can do.

elder vine
#

new case

earnest phoenix
#

ok

warm marsh
#

above the default

earnest phoenix
#

also I have an issue with the ping

warm marsh
#
switch(command) {
  case 'ping':
    break;
  case 'anothercommand':
    break;
  // etc...
  default:
    break;
}```
#

What?

earnest phoenix
#

I'll show you

warm marsh
#

I thought it was !mb

elder vine
#

mb!ping

#

no space

warm marsh
#

Doesn't matter if there is a space.

#

It works both ways.

#

If the code that is used was the one I provided.

earnest phoenix
#

still not working

#

Ima use a different comman

#

d

warm marsh
#

I got a better idea.

#
client.on('message', () => console.log('message received'));```
earnest phoenix
#

Where do I put it?

summer torrent
#

main file

warm marsh
#

As a replacement for your other one.

earnest phoenix
#

config?

warm marsh
#

No.

earnest phoenix
#

oh

warm marsh
#

no

#

replace the entire message event with that one

#
client.on('message', message => {
  // code
}); 

// to
client.on('message', console.log);
earnest phoenix
#

I add it

warm marsh
#

Send a message then check console

#

When bot is online

keen fern
#

Why my bot's token regenerates auto? when I refresh the page the token becomes different

#

pls help

quartz kindle
#

that is normal

keen fern
#

how to disable it?
i have to change the token everytime?

quartz kindle
#

no