aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Lee <alee14498@protonmail.com>2020-07-25 21:29:07 -0400
committerAndrew Lee <alee14498@protonmail.com>2020-07-25 21:29:07 -0400
commitb2b631137ebc04f76b822ed3ca6b973c7fb9f016 (patch)
tree3340a9711ac484e8206fc4f12ab31e3ad0906ad2
parent434f0ec1a5aba1cd577e89413e54cc921dc2de10 (diff)
downloadAleeBot-b2b631137ebc04f76b822ed3ca6b973c7fb9f016.tar.gz
AleeBot-b2b631137ebc04f76b822ed3ca6b973c7fb9f016.tar.bz2
AleeBot-b2b631137ebc04f76b822ed3ca6b973c7fb9f016.zip
Basic nick command
-rw-r--r--commands/nick.js37
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',
+};