#help

1 messages · Page 1 of 1 (latest)

rigid urchin
#

write here

#

too many guys there

#

@versed spade

versed spade
#

oh

rigid urchin
#

do you have interactionCreate

#

?

#

event

versed spade
#

where would it be?

rigid urchin
#

oh thats why it doesent work

#

you don't have an event

versed spade
#

is this the part where i feel super dumb

slender juniper
#

you need an event to receive an interaction create

rigid urchin
#

client.on('interactionCreate', async interaction => { if(interaction.isChatInputCommand()) {        const command = bot.commands.get(interaction.commandName);
        if(!command) return;

command.execute(bot, interaction)}})

slender juniper
rigid urchin
#

idk if code is perfectly correct cuz im om phone but try to fix it

rigid urchin
#

no prob ig

versed spade
#

is client.on supposed to be client.once

rigid urchin
#

no client.on

#

it's correct

versed spade
rigid urchin
#

?

slender juniper
#

that's not s client instance

#

log it

rigid urchin
#

where did you added it?

versed spade
#

wait

#

i got an error when i did the command

#

this mightve actually worked

rigid urchin
#

now go on your command file

#

and above data:

#

add

#

name: "ping",

#

there should be the command name

rigid urchin
#

yes

#

sorry my bad

#

btw it's not finished

versed spade
#

this is what it says

rigid urchin
#

yes wair

#

go on your ping

#

add above data:

#

name: "ping",

#

also go on your command handler

#

and change the push thing to this

#

also command should be a collection

#

bro what did you follow

versed spade
#

the official guide

rigid urchin
#

change const commands = [] to client.commands = new Discord.Collection()

versed spade
#

is there some like boilerplate i can use i am so bad at following this stuff 💀

rigid urchin
#

after all of that send me index.js and ping command

#

so?

versed spade
#

i'm running off and getting a boilerplate

rigid urchin
#

????

#

you don't even try???

#

i sent you everything

versed spade
#

i just did

rigid urchin
#

and send me the fuckin code

versed spade
#

when i changed it it just errored again

#

well it's gone now

rigid urchin
#

bro you dumb asf i said ti you to send code and you don't say what error you get

#

i spoonfeed you

#

at this point no more help to you

#

bruh