woomy-v2/bot/commands/Configuration/userprefix.js

32 lines
1 KiB
JavaScript
Raw Normal View History

2020-10-21 07:06:52 +00:00
module.exports = class {
constructor (name, category) {
this.name = name,
this.category = category,
this.enabled = true,
this.devOnly = false,
this.aliases = [],
this.userPerms = [],
this.botPerms = [],
2020-10-23 03:26:10 +00:00
this.cooldown = 5000,
2020-10-21 07:06:52 +00:00
this.help = {
2020-10-23 08:10:49 +00:00
description: 'Sets your own personal prefix for woomy, that works across all the servers you\'re in!',
2020-10-29 08:20:45 +00:00
arguments: '[new prefix]',
details: '',
2020-10-21 07:06:52 +00:00
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]);
2020-10-23 08:10:49 +00:00
message.channel.createMessage(
2020-11-10 03:31:49 +00:00
`${client.emojis.success} Your personal prefix has been set to: \`${args[0]}\``
2020-10-23 08:10:49 +00:00
);
2020-10-21 07:06:52 +00:00
}
};