From f4776cce45fba4380d6652fef5b9a6fbf78f8e16 Mon Sep 17 00:00:00 2001 From: 8cy <50817549+8cy@users.noreply.github.com> Date: Wed, 15 Apr 2020 02:58:49 -0700 Subject: The Uwufication --- fix/fun/dm.js | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 fix/fun/dm.js (limited to 'fix/fun') diff --git a/fix/fun/dm.js b/fix/fun/dm.js new file mode 100644 index 0000000..fc10f28 --- /dev/null +++ b/fix/fun/dm.js @@ -0,0 +1,51 @@ +const { Command } = require('discord.js-commando'); +const { RichEmbed } = require('discord.js'); + +module.exports = class DMFun extends Command { + constructor(client) { + super(client, { + name: 'dm', + aliases: [ + 'directmessage', + 'directmsg', + 'direct-message', + 'direct-msg' + ], + group: 'fun', + memberName: 'dm', + description: 'dm someone', + guildOnly: true, + args: [ + { + key: 'msgContent', + prompt: 'what would u like to send', + type: 'string' + } + ], + examples: [ + 's5n!dm @sin#1337 hi', + 's5n!directmessage @sin#1337 hey', + 's5n!directmsg @sin#1337 hello', + 's5n!direct-message @sin#1337 yo', + 's5n!direct-msg @sin#1337 aye', + ] + }); + } + run(msg, { msgContent }) { + if (msg.author) { + if (!msg.mentions.users.first() && msgContent) { + msg.reply('you haven\'t specified anyone to send to.'); + } else { + var sendTo = msg.mentions.users.first().id; + var d = new Date(msg.createdTimestamp); + + msg.guild.members.fetch(sendTo, false).then(messageUser => { + messageUser.send(msgContent); + msg.reply('sent :D'); + }); + } + } else { + msg.reply('insufficent perms bruh'); + } + } +}; \ No newline at end of file -- cgit v1.2.3