Discord-Bot icon indicating copy to clipboard operation
Discord-Bot copied to clipboard

How can I make a /setprefix Command?

Open Felitendo opened this issue 1 year ago • 2 comments

How can I make a Command /setprefix [PREFIX] wich sets the Prefix to "." or "!" or "?"?

Felitendo avatar Sep 26 '23 19:09 Felitendo

The application commands / doesn't load

dreamsndnenmemd avatar Sep 28 '23 02:09 dreamsndnenmemd

this code only supports slash commands, to use a prefix you'll have to make a new if condition in src/events/messageCreate.js and also make a seperate folder for prefix commands (and ofc change the interaction to message, for example: interaction.reply to message.reply)

to make the /setprefix command you'll need to make a new model preferably called guild.js in src/database/models and then add guild id and prefix in it and find the server and its prefix from the databse to change it

UnknownX0001 avatar Oct 04 '23 14:10 UnknownX0001