CorwinDev / Discord-Bot

Discord Bot with over 400 commands and made for large servers
MIT License
652 stars 599 forks source link

How can I make a /setprefix Command? #204

Open Felitendo opened 9 months ago

Felitendo commented 9 months ago

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

dreamsndnenmemd commented 9 months ago

The application commands / doesn't load

UnknownX0001 commented 9 months ago

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