summaryrefslogtreecommitdiff
path: root/src/commands/user
diff options
context:
space:
mode:
author8cy <[email protected]>2020-04-24 19:29:25 -0700
committer8cy <[email protected]>2020-04-24 19:29:25 -0700
commit95477dd346b0f2dca1b6ced6946f5cc3cfda6697 (patch)
treebbb02c892bdc3893e8aa4ed66afc04ecc00437bb /src/commands/user
parentshift groups around, new mod cmds, v7.5.0 (diff)
downloaddep-core-95477dd346b0f2dca1b6ced6946f5cc3cfda6697.tar.xz
dep-core-95477dd346b0f2dca1b6ced6946f5cc3cfda6697.zip
big changes, too lazy to count, v7.6.0
mainly just fix darling
Diffstat (limited to 'src/commands/user')
-rw-r--r--src/commands/user/nickname.ts30
-rw-r--r--src/commands/user/pfp.ts33
2 files changed, 63 insertions, 0 deletions
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