Discord-Bot
Discord-Bot copied to clipboard
How can I make a /setprefix Command?
How can I make a Command /setprefix [PREFIX] wich sets the Prefix to "." or "!" or "?"?
The application commands / doesn't load
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