#development

1 messages · Page 1161 of 1

stuck scaffold
opaque swift
#

i dont have any knowledge on java, i have found a "discord.js" for a bot. can someone help me add it to my server please?

golden condor
#

Wait what

opaque swift
#

i dont even know what i have 😄

#

i found it on github

earnest phoenix
#

@opaque swift I can help you invite your bot to your server

wary flame
#

You are missing dependencies for node-gyp, wait a sec I think I have a list of dependencies somewhere

opaque swift
#

i created a bot from discords web site and invited to my server, however, it is offline and kinda empty. I want to add that app to my bot and activate it on my server

earnest phoenix
opaque swift
#

can we go to dm? so we dont fill this chat with many stuff 😄

wary flame
#

You need to install gcc

#

Or other C/C++ compiler toolchain if you prefer

#

And python

opaque swift
#

First, go to discord.com/developers/applications, second, go to your application and then go to OAuth2, check BOT and then copy and paste the link that discord renegated you
@earnest phoenix where do i paste the link

wary flame
#

Browser

opaque swift
#

oh right i got it now

#

i added the bot to my server

wary flame
#

👍

opaque swift
#

now i have a file named discord.js, how do i install this to my bot?

indigo folio
#

nice

wary flame
#

You need to host your bot

#

Read trough this a bit

opaque swift
#

i did read it a few hours ago

#

but still couldnt manage to do it :c

wary flame
#

You need to run your code

opaque swift
#

can you please help me through dm please

wary flame
#

Using node

opaque swift
#

node.js?

wary flame
#

Yes

opaque swift
#

ok i opened node.js and i see something like a cmd file

wary flame
#

Youre on windows?

opaque swift
#

yes

wary flame
#

Is nodejs in your path?

opaque swift
#

i dont know

wary flame
#

Ok, open a command prompt window

#

And run node -v

opaque swift
#

v14.0.0

wary flame
#

That means it is in your path

opaque swift
#

great 😄

wary flame
#

Cd to your bot code folder

#

And run node {name of your bot code file}

opaque swift
#

do i cd on promt? or node.js

wary flame
#

Prompt

#

You can close the nodejs window since it is in your path

opaque swift
wary flame
#

Run npm install

#

Do you have a package.json?

opaque swift
#

i dont have it

wary flame
#

Did you make this code?

opaque swift
#

no i found it on github

wary flame
#

Ah

opaque swift
#

i asked the author and said he wont help me and i have to use it myself

wary flame
#

Did you download all the files?

opaque swift
#

yes

#

there is only one file and its discord.js

wary flame
#

Can you link the repo

opaque swift
#

i will send you via dm

earnest phoenix
#

hello, im using opusscript for my music system, while im playing music and there is error , and no matter what error, even one that doesnt matter, opusscript making the app to get crashed

#

anyone here have a solution ?

low phoenix
wild ore
#

V12 dscord.js nasıl indircem

earnest phoenix
#

Do i use role.id as a parameter for the id of the role?

#

okay

#

can someone help?

#

Yes

steel mountain
#

How to make a message sent with python 3.0

earnest phoenix
#

When I try to run ping command nothing happen, no error

#

How to make a message sent with python 3.0
@steel mountain ctx.send("blabla")

steel mountain
#

Python

#

Yes

#

?

earnest phoenix
#

yes

steel mountain
#

For discord bot

earnest phoenix
#

aa

#

bro

steel mountain
#

This?

earnest phoenix
#

He need to learn pyhton first

#

*python

#

mitrek can you help me now

#

no i made it

strange raven
#

is there anyone that can help me see more than cached users my bot is connected to

wary flame
#

Fetch your users, and get the size of the response, optionally disable caching the fetched users

strange raven
#

welll you see im new to coding shockedthink

wary flame
#

So?

#

Oh

#

Read the docs for client.users

#

And look at the fetch method

strange raven
#

k

floral creek
#

How do i get this emojis? 1️⃣ 2️⃣ 3️⃣ ?

strange raven
#

@wary flame now it says target guild not defind

floral creek
strange raven
#

@floral creek ?

floral creek
#

How do i get this emojis? 1️⃣ 2️⃣ 3️⃣ ?

strange raven
earnest phoenix
#

Hey, I am watching a tutorial vid on yt to turn my bot to online, he says to type node . to get it online but he says something else, pls check it here and help me https://youtu.be/j_sD9udZnCk?t=803

Code your own Discord bot! Coding a discord bot isn't hard at all! with a couple of simple lines you can get a bot up and running on your server. Make sure to stay tuned for upcoming discord coding tutorials. Discord.js makes it very easy to code your own bot without having to...

▶ Play video
strange raven
#

yes node .

earnest phoenix
#

I am from Greece and he says something about it

regal saddle
#

token leaked flurshed

earnest phoenix
#

How do i make my bot run 24/7?

#

anybody?

placid iron
#

Just don't turn it off

earnest phoenix
#

You sure? my computer will blow up

opal plank
#

if your computer blows up cuz its running, you shouldnt even turn it on then

earnest phoenix
#

Nah i mean if i will run it like a week or 2 weeks

placid iron
weak rain
#

@earnest phoenix use host

earnest phoenix
#

what hosting site you recommend me to use? @weak rain

weak rain
#

paid or free?

earnest phoenix
#

free

weak rain
#

budget?

#

oh

#

well i dont know free but u can go with Heroku

earnest phoenix
#

i dont have the money for hosting

weak rain
#

hm

earnest phoenix
#

i think i tried to go with Heroku

#

it didn't work

weak rain
#

u have to turn on resources after deploying

#

it will surely turn on

earnest phoenix
#

i'll try it

#

Thx

weak rain
#

Yeah

indigo cobalt
#

Can some1 help me with this error in the console?

#

(node:6348) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 message listeners added to [Client]. Use emitter.setMaxListeners() to increase limit

#

Ping me if possible.

earnest phoenix
#

Why when I try to start my bot by typing node . it says MODULE NOT FOUND?

#

@earnest phoenix if node . doesnt work , try to do node run index.js

#

Why it shows up and how can I fix it?

#

Still

indigo cobalt
#

Can someone help me with that? ^

small prairie
#

(node:6348) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 message listeners added to [Client]. Use emitter.setMaxListeners() to increase limit
@indigo cobalt not really an errors its kind of a warning

#

afaik

earnest phoenix
#

@earnest phoenix

small prairie
#

i probably am wrong

indigo cobalt
#

What can I do to get that warning off?

small prairie
#

i have 10000% doubt in my skills

earnest phoenix
#

internal/modules/cjs/loader.js:968
throw err;
^

Error: Cannot find module 'C:\Users\User\Desktop\Poll Bot\run'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:965:15)
at Function.Module._load (internal/modules/cjs/loader.js:841: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: []
}

indigo cobalt
#

idk Ty for the help Ig

small prairie
#

IT literally says that in the message when you can do
i never tried so i have no idea

earnest phoenix
#

This is shown every time I try to start my bot

indigo cobalt
#

IT literally says that in the message when you can do
i never tried so i have no idea
@small prairie I tryed it gives and error.

small prairie
#

client.setMaxListeners() ?

indigo cobalt
#

Yes.

small prairie
#

kEWL

indigo cobalt
#

Ill search.

earnest phoenix
#

or just dont have so many listeners are you okay

indigo cobalt
#

Ty for the help @small prairie .

earnest phoenix
#

why do you have so many listeners

indigo cobalt
#

bc I turn on and off the bot a lot of times idk

earnest phoenix
#

what???

#

how is that relevant

indigo cobalt
#

idk It only apears a lot.

earnest phoenix
#

please don't tell me you have a message listener for each command

indigo cobalt
#

Listener. Like what?

earnest phoenix
#

lol

indigo cobalt
#

Im new at this xd.

honest perch
#

how would i get lavalink stats with erelajs rewrite

quartz kindle
#

i'll show you an example

#

samu

indigo cobalt
#

Ok.

honest perch
#

i have client.manager.nodes.get("host").stats; but it returns 'stats' of undefined

quartz kindle
#
// good
client.on("message", message => {
  // check if command 1, run command 2
  // check if command 2, run command 2
  // check if command 3, run command 3
  // etc...
})

// bad, dont do this
client.on("message", message => {
  // check if command 1, run command 1
})
client.on("message", message => {
  // check if command 2, run command 2
})
client.on("message", message => {
  // check if command 3, run command 3
})
indigo cobalt
#

I have a command handler but Is almost like that.

quartz kindle
#

the warning is being caused by having too many .on("message")

indigo cobalt
#

Ah ok.

quartz kindle
#

you should only have one for each event

indigo cobalt
#

`command(client, 'help', message => {

}`

astral yoke
#
        message.channel.send(embedTranslation(json.text[0]));```
the error of ```TypeError: Cannot read property '0' of undefined```
indigo cobalt
#

you should only have one for each event
@quartz kindle Ok thank you.

quartz kindle
#

json.text is undefined

fringe axle
#

message.channel.send(embedTranslation(json.text[0]));
the error of TypeError: Cannot read property '0' of undefined
@astral yoke json.text is undefined.

astral yoke
#

ty

#
            `https://translate.yandex.net/api/v1.5/tr.json/translate?key=${yandex_API}&text=${encodeURI(
                text
            )}&lang=${langCode}`
        );
        const json = await res.json();``` that should work though?
fringe axle
#

Try and find out

astral yoke
#

thats the same code

#

im confused why its undefined

#
            `https://translate.yandex.net/api/v1.5/tr.json/translate?key=${yandex_API}&text=${encodeURI(
                text
            )}&lang=${langCode}`
        );
        const json = await res.json();
        message.channel.send(embedTranslation(json.text[0]));```
#

thats everything mostly

fringe axle
#

Do you have a json.text?

astral yoke
#

ohh

fringe axle
#

He want to find a json.text but you don‘t have that.

#

You have json and text

astral yoke
#

wouldnt he get it from res.json()?

#

because res is defined fetching the url via node-fetch package

pale vessel
#

you should debug

#

console.log(json) after assigning it

astral yoke
#

{ code: 401, message: 'API key is invalid' }

#

fuck

tardy hornet
#

someone wants code for code? i will give him a serverinfo code/ban/kick for a purge command in a case

pale vessel
#

no

quartz kindle
#

lmao

#

what if you give them code in js and they give you code in python

earnest phoenix
#

in brainfuck and let them struggle with translating it

quartz kindle
#

bd-script

earnest phoenix
#

smh

cinder sandal
#

discord.js dependicies are inaccesible rn
weird

fringe axle
#

bd-script
@quartz kindle bloblul

quartz kindle
#

wdym discord.js dependencies are inaccessible?

cinder sandal
#

look at the docs main website

#

it says that

#

but actually the are up to date

#

maybe a glitch on the website

quartz kindle
#

can you show a pic where it says that?

low shard
#

i got error ffmpeg not found

#

i download ffmpeg

#

?

#

Help ?

pale vessel
#

you download, and then you install ffmpeg

low shard
#

Yep

#

And its show

#

ffmpeg not found

midnight blaze
#

@low shard what ide are you using?

astral yoke
#

does a getinvite command where your bot makes an invite any guild its in against tos?

low shard
#

@midnight blaze like studio code ?

slender thistle
#

Yes

midnight blaze
#

@low shard then it should work w/o problem. You installed ffmpeg?

low shard
#

Yep

slender thistle
#

To be specific, if the server administration/members have not consented to having an invite created, that is a violation of Discord Developer Policy.

midnight blaze
#

@low shard show console

#

log

astral yoke
#

rt

#

ty

midnight blaze
#

what exactly does it says

low shard
#

@midnight blaze its sau

#

Say

#

ffmpeg not found.

#

@midnight blaze

midnight blaze
#

how about you make a damn screenshot

#

I want to see exactly what it is written on it

low shard
#

Im not in my pc

#

Rn

#

Wait 1 sec

#

I will screen shot

#

Ok ?

golden condor
#

Whenver I restart Ubuntu, I seem to get this error? Is it possible to fix this? I've tried to Google it and I couldn't find anything related to what I have as it works fine but always boots with this error for some reason and it's concerning. Thanks in advance

#

The system boots fine, but just shows this error on start up and then boots

#

I'm sorry if this isn't meant to go here, but I thought this was my best bet for getting a serious, relevant answer

#

(if you have an answer or a question, you can ping or DM me with it, so I see it)

golden condor
#

This isn't the same error I received, and my system also boots perfectly as if nothing was wrong so I'm confused

#

Was talking to my friend about it

faint prism
#

Ik, but it contains relevant information

low shard
#

@midnight blaze i fix it

#

btw tnx for help

golden condor
#

He said I should run
sudo update-initramfs -u

#

If the system works, open a terminal and type 'sudo update-initramfs -u'

faint prism
#

If you read the thread in that link it'll explain why he said you should run that for your issue

golden condor
#

Ok

jagged sun
#

How can I ban an user with Discord.js that I got with a mention? I'm using Discord.js 11.2.1, and I can't find a solution...

faint prism
#

A mention is just <@userId>

jagged sun
#

Yes

#

I got the user from the mention already

#

But how do I ban him?

faint prism
#

D.js has a function for Banning users in the docs

#

I think you just supply the user id (and maybe the client context?)

jagged sun
#

I just want to know the function how to ban, when I already have the map of the user I want to ban.

faint prism
#

Like I said, that function is available in the discord.js docs

jagged sun
#

Like I said, I'm using an older version and can't find anything

faint prism
pale vessel
#

you should upgrade, that version will be deprecated on october 7th

golden condor
#

Yeah

jagged sun
#

you should upgrade, that version will be deprecated on october 7th
@pale vessel Completely, or is just the API domain no longer supported?

#

And I thought this was in november...

pale vessel
#

completely

#

it's october

#

the earlier the better

jagged sun
#

But The Discord System Notification said on November 7th the domain, and on Octover 6th just the verification process..?

slender thistle
#

Restrictions will take place after either of those dates and verification will be officially enforced

#

one of the enforcements would be intents that old versions of discord.js don't support

jagged sun
#

Ok, is it a very big change to upgrade from v11 th the newest?

faint prism
#

Any major version change in libraries should be assumed as such.
Changelog should document deprecations

crisp geyser
#

Would a SELECT * FROM X WHERE XXX IS NOT NULL; mysql query every 60 seconds in a table with 300k rows considered bad performant?

tidal parrot
#

yes

faint prism
#

SELECT * is pretty taxing

#

Can you narrow the query down any by columns?

jagged sun
#

Which Discord.js library versions are already supporting the future changes of the Discord API on October 6th and November 7th?

golden condor
#

I think 11.6.something supports it

faint prism
#

In general it's a good idea to avoid: wildcards, functions, recursion, and unnecessary conditionals

golden condor
#

And all of v12

sudden geyser
#

Why avoid functions in SQL?

faint prism
#

Functions require additional computing overhead

jagged sun
#

thx

golden condor
#

Nvm

#

Only v12

sudden geyser
#

Weren't you already going to use some type (native lang) if you're using one in sql

faint prism
#

Well what I mean by that specifically is scalar-valued functions in the WHERE clause

sudden geyser
#

oh

earnest phoenix
#

Yo guys I made an npm package

faint prism
#

And that's because you can't use indexes with that approach

earnest phoenix
#

(that sucks)

tidal parrot
#

SELECT * is not the taxing part unless you're fetching shit tons of data

delicate shore
#

UMM

faint prism
#

That usage approach causes more network and I/O activity, so it affects the query performance negatively because of the more resource consumption. You should really filter it by columns you want to retrieve.

earnest phoenix
#

UMM
@delicate shore wut

crisp geyser
#

@faint prism I have a notifications column that if it is not null, it means that user has a notification pending

#

So I get * where notification is not null, and send all notifications to those users

faint prism
#

What are your column headers?

crisp geyser
#

What do you mean by headers?

faint prism
#

what is XXX in the FROM clause

crisp geyser
#

SELECT * FROM users WHERE pendingNotifications IS NOT NULL;

faint prism
#

Right so, pendingNotifications is a column. What columns are you selecting? Do you need every single one for a row in users?

stable eagle
#

Uh.., I have a problem with my bot where... for some reason it responds 9 times?!! in every command?

tight plinth
#

youre running it 9 times

#

bruh

still merlin
#

You've tried to turn your bot on 9 times

crisp geyser
#

Oh! I get what you are saying @faint prism

still merlin
#

or your using 9 apps/hostings to keep your bot online

crisp geyser
#

Yeah i'm using about 3 columns out of 10

stable eagle
#

@tight plinth no

#

Its only on once

tight plinth
#

you are definitively

stable eagle
#

I only have 1 node on

faint prism
#

Yeah i'm using about 3 columns out of 10
@crisp geyser Then an optimization would be to select COL1, COL2, COL3 From ...

tight plinth
#

2 choices: youre somehow running it 9 times OR you execute commands 9 times

stable eagle
#

Well, no. But, I get this weird thing:

crisp geyser
#

I will do that, thanks!

stable eagle
#

(node:6400) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 ready listeners added to [Client]. Use emitter.setMaxListeners() to increase limit

earnest phoenix
#

lol

faint prism
#

Memory Leak
l0l

tight plinth
#

lol

faint prism
#

(node:6400) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 ready listeners added to [Client]. Use emitter.setMaxListeners() to increase limit
@stable eagle You're definitely doing something wrong if you're introducing a memory leak

stable eagle
#

idk what I did tho

opaque eagle
#

hey guys I just need some regex help.... how can I match the spaces right after the digit (in red) but not all of the spaces between the words?

#

nvm im dumb

#

i forgot the space

stable eagle
opaque eagle
#

LOL

#

Show me your ready event

stable eagle
#

OK

opaque eagle
#

or just your entire index.js

stable eagle
opaque eagle
#

Well right away there are a bunch of things that are wrong there

#

Your entire code is inside that for loop

#

Take it out of the for loop and put it outside

#

Also your ready event is inside your message event

earnest phoenix
#

Anyone wanna see my npm package

#

Dudr

opaque eagle
#

This is how your code should look```js
// imports

for (const file of commandFiles) {
// some code
}

bot.on("ready", () => {
// some code
});

bot.on("message", msg => {
// some code
});

bot.login(/* token */);```

#

but right now, the last three parts are inside the first

astral yoke
#

why does this error Canvas.registerFont(`${process.cwd()}/assets/fonts/RobotoRegular.ttf`, "RobotoRegular") TypeError: Canvas.registerFont is not a function

opaque eagle
#

because the for loop is closed } at the very end of the files

earnest phoenix
#

Smh

#

Is Canvas defined

opaque eagle
#

@astral yoke show code

radiant patio
#

Hey,
can someone tell me how to make a temp vc bot?

astral yoke
#

that is the code

earnest phoenix
#

Are you sure you made no typo

opaque eagle
#

That file @astral yoke

earnest phoenix
#

also that's spoonfeeding

astral yoke
#

its 153 characters long if you really want it

#

ill just show that top part

opaque eagle
#

hastebin

earnest phoenix
astral yoke
#
const { createCanvas, loadImage } = require('canvas');
const { MessageAttachment } = require('discord.js');
const { get } = require('node-superfetch');
const db = require('quick.db');
const { crFormat } = require('../functions')

Canvas.registerFont(`${process.cwd()}/assets/fonts/RobotoRegular.ttf`, "RobotoRegular")
Canvas.registerFont(`${process.cwd()}/assets/fonts/courbd.ttf`, "Courier New")
Canvas.registerFont(`${process.cwd()}/assets/fonts/Impact.ttf`, "Impact")```
#

is that good for the error

opaque eagle
#
const { createCanvas, loadImage, registerFont } = require('canvas');```
delicate shore
#

wtf

opaque eagle
#

import it from there

#

and use it

astral yoke
#

ty

opaque eagle
#

np

faint prism
astral yoke
#
const { createCanvas, loadImage, registerFont } = require('canvas');
const { MessageAttachment } = require('discord.js');
const { get } = require('node-superfetch');
const db = require('quick.db');
const { crFormat } = require('../functions')

registerFont(`${process.cwd()}/assets/fonts/RobotoRegular.ttf`, "RobotoRegular")
registerFont(`${process.cwd()}/assets/fonts/courbd.ttf`, "Courier New")
registerFont(`${process.cwd()}/assets/fonts/Impact.ttf`, "Impact")``` would i do it like that @opaque eagle ?
restive furnace
#

yws

radiant patio
faint prism
#

Just ask, don't bother asking "if someone knows". ||ie Read the linked website||

radiant patio
#

´wtf. I ask if someone knows how to make a tempvc system

#

thats a normal question

faint prism
#

Maybe someone does, what's the actual question?

radiant patio
#

´how to make that system...

earnest phoenix
#

Read the site

radiant patio
#

cuz I dont know

earnest phoenix
#

Please

radiant patio
#

wtf

slender thistle
#

All of you are misunderstanding

#

They want an overall logic explanation

radiant patio
#

yes...!?

stable eagle
#

@opaque eagle Alright, I edited my index.js file to what you said, but it made the console.log log the message inside of it 9 times for some reason

earnest phoenix
#

Smh

#

Is it on

#

Or once

radiant patio
#

´so how to make a bot, that when someone enters a specific vc than it will make a personal vc for him
like that

earnest phoenix
#

hmmm

stable eagle
#

@earnest phoenix Only 1 node is on

earnest phoenix
#

Not that

#

Is it

#

smth.on() or smth.once()

stable eagle
#

nope

slender thistle
#

What does that imply, Milo?

stable eagle
#

well,

earnest phoenix
#

´so how to make a bot, that when someone enters a specific vc than it will make a personal vc for him
like that
@radiant patio maybe someone can

slender thistle
#

They asked you which one of either you use

earnest phoenix
#

Do you know how to code

radiant patio
#

but who?

#

nah not really

earnest phoenix
#

bruh

golden condor
#

@earnest phoenix it's both, but .once only executes once no matter how many times it is emitted

radiant patio
#

I know ho to code a bot yes

#

but not this

slender thistle
#

What's the library you use?

radiant patio
#

you mean like js

fluid basin
#

´so how to make a bot, that when someone enters a specific vc than it will make a personal vc for him
like that
@radiant patio you described the process quite clearly yourself, watch the event where users join a vc (voice state update), then create a vc and map the channel to the user, then move the user to the vc. After the user leaves the vc (listen to the voice state update event), check the map to find the channel of the user's vc, then delete the channel.

earnest phoenix
#

You should try to figure smth out

#

Ask us

#

We could help

#

Or just hire someone to make a bot if you don't want to code

#

But we won't spoonfeed

slender thistle
#

Ask us
(which is what they did, but you misunderstood everything they said or haven't been anywhere near helpful from the very beginning)

earnest phoenix
#

(which is what they did, but you misunderstood everything they said or haven't been anywhere near helpful from the very beginning)
(because i literally dunno how to do that)

low shard
#

hey

#

when i play song

golden condor
#

when you play song

leaden rover
#

If you're on about a bot, use FFmpeg

#

and maybe YTDL?

low shard
#

It stop him in the middle anyone know why?

solemn latch
#

Depends on the lib

golden condor
#

Are you restarting?

low shard
#

@golden condor yes

golden condor
#

That's why

leaden rover
solemn latch
#

F

low shard
#

and i use jks

golden condor
#

It stops when you restart

low shard
#

js no py

leaden rover
#

ok

low shard
#

@golden condor no

golden condor
#

The ffmpeg process is terminated

low shard
#

its stop in the middle

golden condor
#

What do you mean no

low shard
#

of the song

golden condor
#

You are restarting

low shard
#

i dont restart

golden condor
#

Therefore the stream will immediately stop

#

You just said you were?

#

What the fuck

low shard
#

wdym

#

restart

#

like restart the bot ?

#

or what

golden condor
#

Restarting your bot

low shard
#

i dont restart

golden condor
#

You just said you did

#

@golden condor yes
@low shard

low shard
#

i just restart when i upgrade my code

#

LOL

golden condor
#

Yws

#

That will stop music streams.

low shard
#

i know

#

lol

#

but when my bot online

#

and i put song

golden condor
#

What??

low shard
#

its stop the song in the middle

#

of the song

golden condor
#

Because you are restarting

low shard
#

TF

#

you are dumb ?

#

i dont restart my bot when i put song

golden condor
#

i just restart when i upgrade my code
@low shard

low shard
#

tf

#

man

#

you dumb

golden condor
#

You say

low shard
#

but i dont upgrade

#

the code

#

i just wanna listen to music

#

bro

golden condor
#

Dude can you give us

#

ANYTHING

#

to work with

placid iron
golden condor
#

You aren't providing much at all

#

Why do I ever try and help people here

stable eagle
#

https://hastebin.com/sogebodifu.cs idk is something is causing a duplicate in my index.js file, but my bot responds to everything 9 times?? And no, I don't have 9 nodes running at once, only 1.

low shard
#

sorry man

golden condor
#

Do you login to the client multiple times?

stable eagle
#

Nope

golden condor
#

Hh

placid iron
#

@stable eagle first of all please use else if SlowPensive

golden condor
#

How many message listeners do you have?

opaque eagle
#

@golden condor his entire code is inside his for loop that loads the commands

#

I told him that earlier but he won't understand

golden condor
#

Ah

winged quartz
#

Jjj

golden condor
#

Yes so you have 9 message listeners

stable eagle
#

How can I check?

low shard
#

hey
when i play song It stop him in the middle anyone know why?
i dont restart the bot

golden condor
#

Move the listener outside the loop

opaque eagle
golden condor
#

^

low shard
#

hey
when i play song It stop him in the middle anyone know why?
i dont restart the bot

golden condor
#

You

#

Aren't

#

Providing

#

Any

#

INFO

low shard
#

what i need to give

golden condor
#

Code? Error?

low shard
#

i dont get any error

#

and its big code

winter basalt
#

hastebin

low shard
#

and im not gonna share my code but my code is good

placid iron
#

I understand why stack overflow people are so to the point now

low shard
#

cause i try run it on glitch

golden condor
#

My brain aneurysms are back again

low shard
#

and its work fine

earnest phoenix
#

My brain aneurysms are back again
F

winter basalt
#

..you arent providing us with any info and expect us to help

golden condor
#

@low shard you are using glitch. Whenver you type anything in glitch, it restarts. Also glitch doesn't stablely run ffmpeg, so there is your answer.

low shard
#

@golden condor i dont use glitch

golden condor
#

Don't use glitch

earnest phoenix
#

I understand why stack overflow people are so to the point now
yeah when I posted my first stack overflow question i didn't provide as much detail and i literally forgot discord.js docs were a thing

low shard
#

i use vs

vernal sorrel
#

i need help

golden condor
#

You just said--

earnest phoenix
#

ok

low shard
#

i say

golden condor
#

cause i try run it on glitch
@low shard

low shard
#

i try to run my bot

#

on glitch

#

and its not crash

earnest phoenix
#

are you using the glitch extension?

low shard
#

in the middle

golden condor
#

Do you have ffmpeg on your pc?

vernal sorrel
#

my server i am making for my bot idk what roles to add and you guys look like you know what tp do

earnest phoenix
#

eh what

low shard
#

@golden condor yep

golden condor
#

Hm

earnest phoenix
#

my server i am making for my bot idk what roles to add and you guys look like you know what tp do
@vernal sorrel not the place to ask

vernal sorrel
#

oh ok

still merlin
#

I'm trying to make a command handler, and i've finally finished it, But I get no errors and my bot doesn't respond, Making bot in d.js, Code https://hastebin.com/jofiranopo.js

solemn latch
#

Poor guy is being redirected everywhere

#

Support told him to come here

#

Here you tell him not here

slender thistle
#

#general would be the best option within the server, but... yeah.

low shard
#

@golden condor hm ?

opaque eagle
#

If you want to make a command handler why are you mapping the arg to specific commands in the collection @still merlin

#

The whole point of a command handler is so you won't have to do what you're doing in lines 31-43

low shard
#

hey
when i play song It stop him in the middle anyone know why?
i dont restart the bot

earnest phoenix
#

youtube is kicking you off the connection

low shard
#

@earnest phoenix lol how you know ?

#

Should i will make new api key ?

earnest phoenix
#

had the problems before

#

what

#

how is the api key relevant here

#

lol

low shard
#

Idk

#

Maybe Works

earnest phoenix
#

no it will not

low shard
#

Ok

#

So how i fix that

earnest phoenix
#

the api key is not involved in you scraping the data lol

low shard
#

Cause i try run my bot on glitcj

#

And its works fine

opaque eagle
#

lol

fluid basin
#

I'm trying to make a command handler, and i've finally finished it, But I get no errors and my bot doesn't respond, Making bot in d.js, Code https://hastebin.com/jofiranopo.js
@still merlin wait wait, why are you switching args and not command? XD

opaque eagle
#

why are you switching anything at all

#

if you have a command handler

low shard
#

@earnest phoenix ?

fluid basin
#

why are you switching anything at all
yeah that makes sense as well

earnest phoenix
#

How do i add a gif in a userinfo command

fluid basin
#

@still merlin use client.commands.has and then client.commands.get

low shard
#

@earnest phoenix wdym

#

Add gif

earnest phoenix
#

Like for some people they have a pfp with a gif

#

if you're using ffmpeg you can instruct it to reconnect, otherwise you need to buffer the content and create a duplex buffer so you can both send the audio data as it's incoming and buffer it elsewhere in memory

it's complicated shit and requires knowledge which i doubt you have

also it probably works on glitch because the bandwidth is fast enough to download everything without being kicked off

a PSA too, glitch is not powerful enough to handle music bots if you're going to be streaming in over 5 guilds lol

tardy hornet
#
case 'createrole':
  message.delete()
  if (!message.guild.me.hasPermission("MANAGE_ROLES")) {
    return message.channel.send("I don't have permission to that, please give me `MANAGE_ROLES` permissions");
  }
  
  if(message.author.id != '723081690792067143' && !message.member.hasPermission('ADMINISTRATOR')){
      message.reply('you dont have the premissions to use this command!');
      return;
  }
  if(!args[1]) return message.channel.send('you need to type what the role name should be.').then((message) => {
      setTimeout(function() {
      message.delete()
    }, 3500)})
    message.guild.roles.create({
      data: {
        name: args[1],
        color: "RANDOM",
      }
    })
    message.channel.send(`role named: **${args[1]}** added! (permissions: __normal__)`)
  break;

why does it says: Cannot access 'args' before initialization

opaque eagle
#

Because you tried to access args before initializing it

low shard
#

Just take his logo you know how

#

?

earnest phoenix
#

because you cannot access something before you initialize it

low shard
#

Avatar*

opaque eagle
#

read the error 🤦‍♂️

earnest phoenix
#

No?

tardy hornet
#

read the error 🤦‍♂️
@opaque eagle then how do i install it?

opaque eagle
#

Install what

tardy hornet
#

initialize*

earnest phoenix
#

this channel is making me lose brain cells again

low shard
#

@earnest phoenix how i do it

opaque eagle
#

^

earnest phoenix
#

do research

low shard
#

@earnest phoenix you using py or js

#

?

slender thistle
#

What do you need args to be programmatically?

earnest phoenix
#

js

slender thistle
#

cry we've been over this

#

and plenty of times on top of that

earnest phoenix
#

I put this .setImage(member.user.displayAvatarURL()) but it just shows images

#

im on phone, im not going to explain to you how to pipe and buffer, you have google for that

#

duplex streaming is heavily complicated

sonic lodge
#
console.log(num); // throws error, because "num" isn't defined yet
let num = 2; // NOW num would be defined
#

program reads your code like it's a book

low shard
#

@earnest phoenix what google

opaque eagle
#

have you heard of any others

placid iron
#

Woogle

sonic lodge
#

google google, click the first result, and then you should be at google

honest perch
#

Nudle

tardy hornet
#

What do you need args to be programmatically?
@slender thistle the args[1] need to be the role name.

slender thistle
#

What do you define args as, anywhere in the code?

tardy hornet
#

i only switched him

#

switch (args[0]){

#

thats where my cases are

weak rain
#

how to make help with pages

rocky hemlock
#

react to the message -> await the reactions -> edit message to different embed based on reaction

tardy hornet
#

@slender thistle
i only switched him
switch (args[0]){
thats where my cases are

weak rain
rocky hemlock
#

thats how you do pagination

weak rain
#

but how to do this

rocky hemlock
#

what library

weak rain
#

discord.js

rocky hemlock
#

and message#react

weak rain
#

hm

rocky hemlock
#

or u could get one of those packages on npm

sick fable
#

Is it simple to create a reactionrole bot?

rocky hemlock
#

depends

sick fable
#

I am new to coding

#

That's why I am asking

rocky hemlock
#

it can be simple depending on your coding skill and what your goals of it is

sick fable
#

Oh

frigid rivet
#

someone can help me for the set welcome channel (in python) ? i use SQLite for the db

fluid basin
#

code? or errors?

frigid rivet
#

i don't see error so i think it's in the code

#

idk

queen violet
#

im prob asking too much of dbl but is anyone here familiar with avx simd instructions

earnest phoenix
#

Where is general chat?

amber fractal
#

You think anyone here knows anything about actual computer science?

solemn latch
earnest phoenix
#

Ok

queen violet
#

@amber fractal lemme cheat in my homework alone >:(

narrow tiger
#

uhh not sure if this is the right channel but do all bots have to be modular? example: you can control mee6 from a flask server/website

earnest phoenix
#

is there anyway i can force npm to NOT install certain packages even if they are required by other packages. I use levelup because leveldown wrecks my stuff for some reason and the other dependencies work fine with levelup but if i run npm install to update my package configuration the whole thing goes shenanigans trying to install leveldown

sly thorn
#

@untold juniper

small prairie
#

my bot keeps killing itself exited with code [0] via signal [SIGKILL] starting in -fork mode- online
Pm2 is restarting it tho but still

#

this is PM2's log

solemn latch
#

@earnest phoenix do you mean you have two packages that require two different versions?

earnest phoenix
#

no

small prairie
#

is there anyway i can force npm to NOT install certain packages even if they are required by other packages. I use levelup because leveldown wrecks my stuff for some reason and the other dependencies work fine with levelup but if i run npm install to update my package configuration the whole thing goes shenanigans trying to install leveldown
@earnest phoenix if its in the package's Package.json it will be installed
i think u can edit the file but never tried myself

earnest phoenix
#

i just want it to NOT install leveldown because my dependencies work fine with levelup and leveldown just wrecks npm

#

fixed

#

it was dumbass me to add it as a dependency

solemn latch
#

why not just remove it from your package?

#

or npm uninstall leveldown

tawny oasis
#

If i wanted to make a bot for an rpg, what would be the best library for it?

solemn latch
#

bot library or rpg library 🤔

#

no specifics on language

small prairie
#

or npm uninstall leveldown
@solemn latch if he upadtes the packages using npm i it would be reinstalled

#

updates*

tawny oasis
#

well i know i'm using node.js

solemn latch
#

so leveldown is a dependancy of levelup?

#

so levelup wont work without leveldown?

amber fractal
#

you cant remove dependencies from the package, that's the maintainers job

#

Some package maintainers are stupid

small prairie
#

my bot keeps killing itself exited with code [0] via signal [SIGKILL] starting in -fork mode- online
Pm2 is restarting it tho but still

earnest phoenix
#

so leveldown is a dependancy of levelup?
@solemn latch it's the reverse

#

but leveldown sucks

#

nvm i just prevented it from installing

#

it was dumbass me to add it as a dependency

solemn latch
#

ah yeah, just remove it from your package then

small prairie
#
PM2      | App [bot:0] starting in -fork mode-
PM2      | App [bot:0] online
PM2      | App [bot:0] exited with code [0] via signal [SIGKILL]
PM2      | App [bot:0] starting in -fork mode-
PM2      | App [bot:0] online
PM2      | App [bot:0] exited with code [0] via signal [SIGKILL]
PM2      | App [bot:0] starting in -fork mode-
PM2      | App [bot:0] online

Pm2 is literally spamming this in logs every 30 secs or something idk

#

This happens when a bot is restarted afaik

amber fractal
#

You're sending sigkill somehow

small prairie
#

process.exit?

amber fractal
#

process.exit(0) is sigkill I believe

small prairie
#

Ye i checked my code
its only in one place !restart command which only i have access to

#

and when i test it using node index.js

#

the server is just hanged for a moment

#

and then it prints

#

Killed

solemn latch
#

pretty sure if your process hits a ram limit(max-memory or something) it also does a sigkill

delicate shore
#

Hey

#

I wanna make a dead command for my bot

#

in which the project kills itself in case of emergency

#

so it will be something process.exit()?

small prairie
#

If its in Pm2 or any process manager process.exit wont work i think

#

or does pm2 restart process.exit(1)?

solemn latch
#

if your using a process manager the bot will auto restart

small prairie
#

ye

delicate shore
#

Oh i do

#

is there any way i can do this while having a pm

digital ibex
#

process.exit will still work

#

that doesnt change anything

delicate shore
#

Oh

#

but i just realise

digital ibex
#

process.exit = ctrl + c

solemn latch
#

?? so it wont restart

#

lol

delicate shore
#

yes

#

no restart

solemn latch
#

my pm2 restarts my processes

digital ibex
#

then await it

solemn latch
delicate shore
#

only shutdown

digital ibex
#

await process.exit(1); await client.connect();

solemn latch
#

🤔

small prairie
#

Wait how about you just <Client>.destroy()

delicate shore
#
let devs = ["587663056046391302"]; //CHANGE THIS TO YOUR ID(S)

    if (!devs.includes(msg.author.id)) {
      return true;
    } else {
      process.exit();
    }```
I did this but it restarts it
digital ibex
#

then its restarted i think, ive only tried client.disconnect not process.exit in this case

delicate shore
#

i found this on a tuotorial

#

tuotorial

#

and it works

#

but it restarts

small prairie
#

it will just restart

digital ibex
#

i think u need to provide an wxit code

small prairie
#

Ye

#

Wait how about you just <Client>.destroy()
wont this work?

digital ibex
#

but thats just creating a new line

delicate shore
#

Ok but i think

digital ibex
#

not connecting back

delicate shore
#

why the fuck will i ever need a kill command

low shard
#

hey
when i play song It stop him in the middle anyone know why?
i dont restart the bot\

small prairie
#

Also u can create another file where u can write something while doing !kill command and check that file when you client.login

solemn latch
#

depends on the lib

delicate shore
#

o

small prairie
#

hey
when i play song It stop him in the middle anyone know why?
i dont restart the bot
@low shard any error/what are you using?

low shard
#

@small prairie no errors

small prairie
#

lang/libs?

low shard
#

wdym what are you using

earnest phoenix
#

i told you why

delicate shore
#

I think about it and came to conclusion
||why the fuck will i ever need a kill command||

earnest phoenix
#

youtube cuts off the connection because you're hanging it for too long

low shard
#

@small prairie js

delicate shore
#

Idk how it came into my mind

#

anywasy

#

wish you all a Good Night

small prairie
#

i mean kill isnt a bad thing but ok

low shard
#

@small prairie you know how to fiz

#

fixa?

#

fix*

small prairie
#

Cry answered you

solemn latch
#

cry told you the issue

#

🤷‍♂️

delicate shore
#

^

#

youtube cuts off the connection because you're hanging it for too long

low shard
#

youtube cuts off the connection because you're hanging it for too long
@earnest phoenix so what i need to do

#

?

earnest phoenix
#

i also told you that

low shard
#

you can say again

delicate shore
low shard
#

i dont see it

solemn latch
#

lol

earnest phoenix
#

if you're using ffmpeg you can instruct it to reconnect, or you can buffer realtime (which is complicated)

small prairie
#

I removed some parts of my code and it isnt restarting anymore
prolly a heavy loop/an event listener which was heavy for the ram

low shard
#

if you're using ffmpeg you can instruct it to reconnect, or you can buffer realtime (which is complicated)
@earnest phoenix oliythink

small prairie
low shard
#

so if i want share my bot people cant hear good ?

#

so im fucked or what

solemn latch
#

or just tell ffmpeg to recconect

#

which seems super straightforward

#

also, just did a test with process.exit(1)
and pm2 will restart programs still using it, for anyone who was wondering.

small prairie
#

Sad

low shard
#

@earnest phoenix

topaz fjord
#

or use lavalink mmLol

solemn latch
#

lavalink is slower tho

#

🤔

honest perch
#

not much difference

solemn latch
#

probably is when dealing with a lot of streams 🤔

earnest phoenix
#

lavalink is good enough

#

however performance sucks ass

#

glitch can't handle lavalink

#

too heavy for it

honest perch
#

glitch wont handle ports

solemn latch
#

you know, i got that guys webhook working yesterday on glitch

#

🤔

weak rain
#

how do i make this command case sensitive

#

sending

#

code ..

solemn latch
#

if(command == "CaSeSensitive")

#

🤔

earnest phoenix
#

why would you make case sensitive commands anyways

summer torrent
#

command.toLowerCase()

weak rain
#
const { MessageEmbed } = require("discord.js")

module.exports = {
  name: "help",
  usage: "Introduction",
  description: "Command Info",
  alias: [''],
  category: "help",
  run: (client, message, args) => {
  let helpEmbed = new Discord.MessageEmbed()
    .setColor("RANDOM")
    .setAuthor(" ")
    .setTitle("ABOUT THE BOT")
    .addField("PREFIX", "**tr!**")
    .addField("DEVELOPER AND OWNER", "@SA〢Thunderᴬᴱ#0007")
    .addField("HELPFUN", "**Sends info about Fun Commands**")
    .addField("HELPIMAGE", "**Sends info about Image Commands**")
    .addField("HELPSPECIAL", "**Sends info about Special Commands**")
    .addField("HELPMODERATION", "**Sends info about Moderation Commands**")
    .setFooter(`Requested by ${message.author.username}`)
   message.channel.send(helpEmbed)
  }
}```
earnest phoenix
#

I just created a setprefix command but it doesn't run when i type the command

#

damn that sucks

#
const Discord = require('discord.js')
const db = require("quick.db")

module.exports = {
    name: 'setprefix',
    description: "This is a setprefix command",
    async execute(message, args) {
        let pref = db.get(`prefix.${message.guild.id}`)
        let prefix;
        if (!pref) {
            prefix = "h!"
        } else {
            prefix = pref;
        }
        if (message.content.startsWith(prefix + "prefix")) {
            if (!message.member.hasPermission("MANAGE_GUILD")) return message.channel.send("You don't have the permission to do so.")
            let data = db.get(`prefix.${message.guild.id}`)
            if (message.flags[0] === 'default') {
                await db.delete(`prefix.${message.guild.id}`)
                return message.channel.send("The server prefix has been changed to a defult one")
            }
            let symbol = args.join(" ")
            if (!symbol) return message.channel.send("Please enter the prefix you want to change")

            db.set(`prefix.${message.guild.id}`, symbol)
            return message.channel.send(`The server prefix has been changed to **${symbol}**`)

        }
    }
}
#

Here's the code ^

#

debug it

#

Hmm idk how to do it ;-;

#

try catch the command and log at every if to see if it's passing, you can also log at places which you think might be problematic

#

if you have an IDE that supports breakpoints, use breakpoints

#

okay

weak rain
#

i made a

#

code

#

but it sends 2 message

#

if matches

#

at a time

#

what should i do

#

:/

lime pumice
#

@earnest phoenix lol you're copying dbd and more

#

Straight

earnest phoenix
#

Hello, I have a music bot, and i want to make an option to play a playlist from spotify, is there an option for that? (discord.js)

solemn latch
#

afaik, Spotify doesn't provide a public API for playing music.

#

you could fetch the playlist from spotify, but not play it from spotify

earnest phoenix
#

so an api who can take the spotify playlist and make it "stream" to play it in discord.js ?

solemn latch
#

an api which doesnt exist

#

or, atleast isnt public

pale vessel
#

all bots resolve the titles and search using youtube

solemn latch
pale vessel
#

well, most, probably

dire obsidian
#

well someone who is using browser discord can help me?

solemn latch
#

i can swap to browser

dire obsidian
#

oh thanks

solemn latch
dire obsidian
#

.-.

earnest phoenix
#

dm channel ids are not the same as user ids

#

each user has their own unique dm channel id with a user they've dm'd

solemn latch
#

^

earnest phoenix
#

nobody speaks spaghetti language

#

english only in this channel

gloomy path
#

🐒

leaden rover
#

How do I make it so my bot cannot ping everyone with a play command? I have this code:

    @commands.bot_has_guild_permissions(mention_everyone=False)```
slender thistle
#

response.replace("@", "\u200b@")

leaden rover
#

Ok

void shadow
#

hey guys i need help whit search for music bot yt-search:

const yts = require("yt-search");

// Searches YouTube with the message content (this joins the arguments
// together because songs can have spaces)
const {videos} = await yts(args.slice(1).join(" "));
if (!videos.length) return message.channel.send("No songs were found!");
const song = {
title: videos[0].title,
url: videos[0].url
};

// rest of code...
If you want to support both URLs and searching, you can test if the first argument is a valid URL using ytdl.validateURL:

let song;
if (ytdl.validateURL(args[1])) {
const songInfo = await ytdl.getInfo(args[1]);
song = {
title: songInfo.title,
url: songInfo.video_url
};
} else {
const {videos} = await yts(args.slice(1).join(" "));
if (!videos.length) return message.channel.send("No songs were found!");
song = {
title: videos[0].title,
url: videos[0].url
};
}

// rest of code...

misty sigil
#

TIP: use ``` for code blocks to make your message much less annoying

void shadow
#

ok

solemn latch
#

the best tip is putting code in hastebin

void shadow
misty sigil
#

Ok so

#

did you just copy paste that?

void shadow
#

yes

#

is not my

#

...

misty sigil
#

Do you understand what it does?

void shadow
#

use yt seacrh to search song

misty sigil
#

I'm gonna tell you, it's erroring because there is uncommented text.

void shadow
#

i got from there

honest perch
#

@misty sigil our weekly usage report

void shadow
#

ohh

misty sigil
#

weekly usage

honest perch
misty sigil
#

nice

honest perch
#

35 mb ram gives itself more

solemn latch
#

you probably shouldnt copy paste code like that

honest perch
#

if it needs it

#

pretty smart

misty sigil
#

you probably shouldnt copy paste code like that
@solemn latch ^

#

pretty smart indeed

void shadow
#

ok

solemn latch
#

so, battleship is "done"

#

not done, but all the functionality for it is there.

royal portal
#

burber hates it >:(

summer torrent
misty sigil
#

what the hell

delicate shore
#

ok

#
let channel = message.channel || message.mentions.channels.first()
let channelid = channel.id;```
#

does js message.mentions.channels.first() returns channel id itself?

misty sigil
#

no

#

so shrug

delicate shore
#

O

balmy ether
#

I need the code for ban of java 12 pls can anyone help me all the commands are ready leaving this one

sudden geyser
#

what library are you using

#

and what version of it

frigid rivet
#

🤔

misty sigil
#

I need the code for ban of java 12 pls can anyone help me all the commands are ready leaving this one
@balmy ether spoonfeed

frigid rivet
#

someone can help me p.l.s

rustic nova
#

Can't do much without your full code

#

Nah i ain't helping, post it here so others can help

frigid rivet
#

Okay

rustic nova
#

I'm just pointing out that posting your code can give insights

faint prism
#

someone can help me p.l.s
@frigid rivet I need more from your query

frigid rivet
delicate shore
#
client.on("message", message=>{
if (message.content === '!channelset autoreact ${channel.ID}')
let channel = message.channel || message.mentions.channels.first()
let channelid = channel.id;
 console.log(message.channel.id)   

})```

Error 
```SyntaxError: Lexical declaration cannot appear in a single-statement context
tight plinth
#

which line

#

also your command will never work

honest perch
tight plinth
#

please use a command handler

misty sigil
#

bruh

pale vessel
#

why are you using channel before defining it

delicate shore
#

no wait

misty sigil
#

ok, so, you'd need to parse args

delicate shore
#

i sent wrong code

pale vessel
delicate shore
#

idk what the fuck did i copied

#

whose ugly code is that

#

wait

#

lemme get my code

harsh badge
#

lol

pale vessel
#

that is totally not your code

delicate shore
#

Yes i use cmd handler

tight plinth
#

send good code plz

delicate shore
#

e

#

e

#

ds'

tight plinth
#

e

delicate shore
#
const Discord = require("discord.js")

module.exports = {
    name: 'channelset',
    description: "Shit",
   async execute(message, args){

let channel = message.channel || message.mentions.channels.first()
let channelid = channel.ID;
 console.log(channelid)
   
   }}```
#

i will save it in db

#

once basic code works

tight plinth
#

what's youe error? which line?

delicate shore
#

wait

pale vessel
#

id on d.js i guess

#

prioritize message.mentions.channels.first() first over message.channel

misty sigil
#

its id on d.js

pale vessel
#

yeah it is

misty sigil
#

yes it is

faint prism
#

Make sure to adhere to your language's naming convention

delicate shore
#

ok

open flicker
pale vessel
#

add message.delete()?

open flicker
#

🤔

delicate shore
misty sigil
#

awaitReactions

pale vessel
#

yeah, awaitReactions seems better in this case but createReactionCollector also works

knotty steeple
#
client.on("message", message=>{
if (message.content === '!channelset autoreact ${channel.ID}')
let channel = message.channel || message.mentions.channels.first()
let channelid = channel.id;
 console.log(message.channel.id)   

})```

Error 
```SyntaxError: Lexical declaration cannot appear in a single-statement context

@delicate shore its because ur declaring after the one line if

#

its basically

if (message.content === '!channelset autoreact ${channel.ID}') let channel = message.channel || message.mentions.channels.first()```
delicate shore
#

@knotty steeple did u read my message?

#

after that

knotty steeple
#

yea but im just telling u

low shard
#

(node:9156) UnhandledPromiseRejectionWarning: Error: FFMPEG not found

#

i download it and its show me again this shit

royal portal
#

then download it properly

low shard
#

you have link to see how to download properly

cosmic robin
#

(`Welcome to WinterfallMC Discord ${member}`) this is outputting <@number> but no ping?

low shard
#

@royal portal

royal portal
#

yes

#

dont say you pinged me without context

delicate shore
#

I am so fuking done

cosmic robin
#

anyone help?

low shard
#

can you give me pls /

royal portal
#

anyone help?
@cosmic robin show code

delicate shore
#

Someone unbooosted my server i lost a level and now all emotes i used in my bot are messed up

#

fuck

cosmic robin
#

i sent up xixi

royal portal
#

yeah but is it

cosmic robin
#
    const Embed = new Discord.MessageEmbed()
    .setColor(0xe44f28)
    .setTitle(`Welcome to WinterfallMC Discord ${member}`)
    .setDescription('Hope you enjoy your stay, feel free to look around and ask any questions!')
    .setFooter('Discord Bot Created by Phil#0005')
    client.channels.cache.get('736322934510977109').send(Embed);``` heres all of it
knotty steeple
#

u can't ping in the title

royal portal
#

you can

#

its just doesnt ping the user

#
client.on('guildMemberAdd', member => {
    const Embed = new Discord.MessageEmbed()
    .setColor(0xe44f28)
    .setTitle(`Welcome to WinterfallMC Discord, ${member.user.username}.`)
    .setDescription('Hope you enjoy your stay, feel free to look around and ask any questions!')
    .setFooter('Discord Bot Created by Phil#0005')
    client.channels.cache.get('736322934510977109').send(Embed);
}
});
sonic lodge
#

so you can't ping in the title

cosmic robin
#

dont change it to uwu

knotty steeple
#

^

#

like

royal portal
#

well it wont give the user a notification

cosmic robin
#

nyan is superior

#

thats fine

knotty steeple
#

then it doesn't ping

royal portal
#

@cosmic robin edited

cosmic robin
#

ty

royal portal
#

does it work

cosmic robin
#

let me test

royal portal
#

yes

misty sigil
royal portal
#

ohh#

#

wait

#

@cosmic robin forgot to add }

#

check again

earnest phoenix
#

-bots

gilded plankBOT
cosmic robin
#

works tysm

royal portal
#

wait

#

did u try the new one

cosmic robin
#

i just edited wat was needed not copy and pasted lmao

royal portal
#

like

#

this one?

cosmic robin
#

i just changed member to member.user.username

earnest phoenix
#

how to check if user dm is opened or closed

#

js

amber fractal
#

you cant without attempting to dm them

earnest phoenix
#

okey

royal portal
#

i just changed member to member.user.username
@cosmic robin how do you rate your burber experience

earnest phoenix
#

sorry

#

yes i mean after i send message

knotty steeple
#

dm then catch

earnest phoenix
#

user.send("hi")

amber fractal
#

well you'll get an error if you cant

cosmic robin
#

hmm

#

7/10

earnest phoenix
#
    user.send(`hmmmm`)
    .catch(msg = `${user.tag} DM is currently closed!`)
    .then(msg = "Your message has been sent!")
#

not working

#

it keep sending your message has been sent

amber fractal
#

that's not how then and catch work

royal portal
#

well

#

then dms off

amber fractal
#

.then((msg) => do x).catch((e) => do x)

#

msg = isn't a syntax that works

earnest phoenix
#

lol not

errant perch
#

keep getting this error and these are my dependencies
"botkit-discord": "^0.1.3",
"discord.js": "^12.3.1",
"express": "^4.17.1",
"ffmpeg": "0.0.4",
"ytdl-core": "^3.2.1"

earnest phoenix
#

let msg;

amber fractal