diff options
| author | Andrew Lee <alee14498@protonmail.com> | 2020-07-25 21:29:07 -0400 |
|---|---|---|
| committer | Andrew Lee <alee14498@protonmail.com> | 2020-07-25 21:29:07 -0400 |
| commit | b2b631137ebc04f76b822ed3ca6b973c7fb9f016 (patch) | |
| tree | 3340a9711ac484e8206fc4f12ab31e3ad0906ad2 /commands/nick.js | |
| parent | 434f0ec1a5aba1cd577e89413e54cc921dc2de10 (diff) | |
| download | AleeBot-b2b631137ebc04f76b822ed3ca6b973c7fb9f016.tar.gz AleeBot-b2b631137ebc04f76b822ed3ca6b973c7fb9f016.tar.bz2 AleeBot-b2b631137ebc04f76b822ed3ca6b973c7fb9f016.zip | |
Basic nick command
Diffstat (limited to 'commands/nick.js')
| -rw-r--r-- | commands/nick.js | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/commands/nick.js b/commands/nick.js new file mode 100644 index 0000000..bb3709b --- /dev/null +++ b/commands/nick.js @@ -0,0 +1,37 @@ +/** ************************************** + * + * Nick: Command for AleeBot + * Copyright (C) 2017-2020 Alee Productions + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + * *************************************/ +module.exports.run = async (client, message, args) => { + if (!message.guild.member(client.user).hasPermission('MANAGE_NICKNAME')) return message.reply('**ERROR:** I can\'t change nicknames. (Check permissions)'); + if (message.guild.member(client.user).hasPermission('ADMINISRTATOR')) return message.reply('**ERROR:** Since you have admin permissions you are allowed to change your nickanme.'); + const nick = args.join(' '); + message.member.setNickname(nick); + message.channel.send(`Alright! I changed your nickname to \`${nick}\``); +}; + +exports.conf = { + aliases: [], + guildOnly: false, +}; +exports.help = { + name: 'nick', + description: 'Changes nickname.', + usage: 'nick [context]', + category: '- General Commands', +}; |
