commands!
This commit is contained in:
parent
2b01e3dc97
commit
3f09ea7f76
4 changed files with 95 additions and 2 deletions
30
bot/commands/Configuration/userprefix.js
Normal file
30
bot/commands/Configuration/userprefix.js
Normal file
|
@ -0,0 +1,30 @@
|
|||
module.exports = class {
|
||||
constructor (name, category) {
|
||||
this.name = name,
|
||||
this.category = category,
|
||||
this.enabled = true,
|
||||
this.guildOnly = false,
|
||||
this.devOnly = false,
|
||||
this.aliases = [],
|
||||
this.userPerms = [],
|
||||
this.botPerms = [],
|
||||
this.cooldown = 10000,
|
||||
this.help = {
|
||||
description: 'Sets your own personal prefix for woomy, that works in all servers and DM\'s.',
|
||||
usage: 'userprefix` <new prefix>',
|
||||
examples: 'userprefix w! - sets your personal prefix to woomy'
|
||||
};
|
||||
}
|
||||
|
||||
async run (client, message, args, data) {
|
||||
if (!args[0]) {
|
||||
return message.channel.createMessage(
|
||||
`Your prefix for Woomy is currently: \`${data.user.prefix}\``
|
||||
);
|
||||
}
|
||||
|
||||
await client.db.updateUser(message.author.id, 'prefix', args[0]);
|
||||
|
||||
message.channel.createMessage(`Your personal prefix has been set to: \`${args[0]}\``);
|
||||
}
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue