From 95477dd346b0f2dca1b6ced6946f5cc3cfda6697 Mon Sep 17 00:00:00 2001 From: 8cy <50817549+8cy@users.noreply.github.com> Date: Fri, 24 Apr 2020 19:29:25 -0700 Subject: big changes, too lazy to count, v7.6.0 mainly just fix darling --- src/commands/user/nickname.ts | 30 ++++++++++++++++++++++++++++++ src/commands/user/pfp.ts | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 63 insertions(+) create mode 100644 src/commands/user/nickname.ts create mode 100644 src/commands/user/pfp.ts (limited to 'src/commands/user') diff --git a/src/commands/user/nickname.ts b/src/commands/user/nickname.ts new file mode 100644 index 0000000..ffc8d18 --- /dev/null +++ b/src/commands/user/nickname.ts @@ -0,0 +1,30 @@ +import { Command, CommandoMessage } from 'discord.js-commando'; +import emoji from 'emoji-random'; + +module.exports = class NickNameUser extends Command { + constructor(client) { + super(client, { + name: 'nickname', + aliases: ['nick', 'name'], + group: 'user', + memberName: 'nickname', + description: 'Allows you to change your nickname in the current server.', + args: [ + { + key: 'userNick', + prompt: 'What would you like to change your nickname to?', + type: 'string' + } + ], + examples: [ + 'uwu!nickname sinny', + 'uwu!nick s1nical', + 'uwu!name s1n' + ] + }); + } + run(msg: CommandoMessage, { userNick }) { + msg.member.setNickname(userNick) + msg.reply(`Your nickname has been changed to ${userNick}. ` + emoji.random()) + } +}; \ No newline at end of file diff --git a/src/commands/user/pfp.ts b/src/commands/user/pfp.ts new file mode 100644 index 0000000..bf593fa --- /dev/null +++ b/src/commands/user/pfp.ts @@ -0,0 +1,33 @@ +import { Command, CommandoMessage } from 'discord.js-commando'; +import { MessageEmbed } from 'discord.js'; +import emoji from 'emoji-random'; + +module.exports = class PFPServer extends Command { + constructor(client) { + super(client, { + name: 'pfp', + aliases: ['profilepicture', 'profile-picture', 'profileimage', 'profile-image'], + group: 'server', + memberName: 'pfp', + description: 'Grabs the profile picture of a given user.', + args: [ + { + key: 'userID', + prompt: 'Which user\'s profile picture would you like to grab?', + type: 'string' + } + ], + examples: ['uwu!pfp @sin#1337'] + }); + } + run(msg: CommandoMessage, { userID } ) { + userID = msg.mentions.users.first()?.id; + this.client.users.fetch(userID).then(user => { + let emb = new MessageEmbed() + .setColor(0xFFCC4D) + .setTitle(`${msg.mentions.users.first()?.username}'s Profile Picture ` + emoji.random()) + .setImage(user.avatarURL()) + msg.reply(emb) + }) + } +}; \ No newline at end of file -- cgit v1.2.3