#Slash command clear in discord.js v14

1 messages · Page 1 of 1 (latest)

uneven gulch
#

Hi, I don't have found any tutorial about the slash command: /clear in discord.js v14. Can anyone write me how do you create it? Thanks.

silent depot
#

uh u mean bulkDelete?

reef hazelBOT
uneven gulch
silent depot
#

so probably

#

depends what mean "clear chat"

uneven gulch
#

clear a text channel

#

intend this

silent depot
uneven gulch
#

I send you a screen one moment

#

this command

silent depot
#

so it's bulk delete

uneven gulch
uneven gulch
#

@silent depot how can I create the command?

#

Just go to the discordjs guide website or just google it or youtube

uneven gulch
#

look for v13?

#

and you cant find a specific command's help

#

??

uneven gulch
#

v14

#

just learn nodejs and learn discordjs docs

paper gulch
#

its relatively straightforward: on command interaction run bulkDelete on the channel with the amount specified in the command

uneven gulch
#

and go make your own

uneven gulch
#

for admins

paper gulch
#

so you don't know how to make a slash command?

uneven gulch
paper gulch
#

ok so you want to like set up permissions for the command?

uneven gulch
#

@paper gulch

paper gulch
uneven gulch
#

ok thanks

paper gulch
#

yep yep

uneven gulch
#

@paper gulch it's correct?

paper gulch
#

setDefaultMemberPermissions is part of the SlashCommandBuilder so it needs to be with where you created the command

uneven gulch
#

ah ok

#

@paper gulch how do I write in the round brackets if I want to set permission as an administator?