Added some stuff, changed how usererrs are called
This commit is contained in:
parent
9fd2c873ca
commit
b36a746bb4
8 changed files with 149 additions and 21 deletions
34
commands/myprefix.js
Normal file
34
commands/myprefix.js
Normal file
|
@ -0,0 +1,34 @@
|
|||
exports.conf = {
|
||||
enabled: true,
|
||||
guildOnly: false,
|
||||
aliases: [],
|
||||
permLevel: 'User',
|
||||
requiredPerms: [],
|
||||
cooldown: 2000 // miliseconds
|
||||
}
|
||||
|
||||
exports.help = {
|
||||
name: 'myprefix',
|
||||
category: 'Settings',
|
||||
description: 'Shows or changes the prefix Woomy uses for you.',
|
||||
usage: '`myprefix` <prefix | "reset">',
|
||||
parameters: ''
|
||||
}
|
||||
|
||||
exports.run = async (client, message, args, level, data) => {
|
||||
const prefix = args.join(' ')
|
||||
|
||||
if (!prefix) {
|
||||
return message.channel.send(`Your current prefix is: \`${data.user.prefix}\``)
|
||||
}
|
||||
|
||||
if (prefix.toLowerCase() === 'reset') {
|
||||
await client.updateUser(message.author, { prefix: client.config.defaultPrefix })
|
||||
|
||||
return message.channel.send('Your prefix has been reset.')
|
||||
}
|
||||
|
||||
await client.updateUser(message.author, { prefix: prefix })
|
||||
|
||||
message.channel.send(`Your prefix has been updated: \`${prefix}\``)
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue