mirror of
https://github.com/litruv/DAdmin.git
synced 2026-07-25 03:06:11 +10:00
Initial commit
This commit is contained in:
16
commands/changeprefix.js
Normal file
16
commands/changeprefix.js
Normal file
@@ -0,0 +1,16 @@
|
||||
exports.name = "Change Prefix"
|
||||
exports.alias = ['changeprefix','prefix']
|
||||
exports.helptext = "Changes the bots prefix for the server"
|
||||
exports.permissions = ["ADMINISTRATOR"]
|
||||
exports.category = 'admin'
|
||||
exports.args = ["new-prefix"]
|
||||
exports.command = (client, msg) => {
|
||||
if (msg.suffix.length != 1) {
|
||||
msg.reply("please only use 1 character")
|
||||
return;
|
||||
}
|
||||
client.database.set_setting(msg.guild.id, "prefix", msg.suffix)
|
||||
client.cachedserversettings.filter(function (server) {
|
||||
return server.guildID == msg.guild.id;
|
||||
})[0].prefix = msg.suffix;
|
||||
}
|
||||
Reference in New Issue
Block a user