1if (cmd === `!dm`) {
2 let dUser =
3 message.guild.member(message.mentions.users.first()) ||
4 message.guild.members.get(args[0]);
5 if (!dUser) return message.channel.send("Can't find user!");
6 if (!message.member.hasPermission('ADMINISTRATOR'))
7 return message.reply("You can't you that command!");
8 let dMessage = args.join(' ').slice(22);
9 if (dMessage.length < 1) return message.reply('You must supply a message!');
10
11 dUser.send(`${dUser} A moderator from WP Coding Club sent you: ${dMessage}`);
12
13 message.author.send(
14 `${message.author} You have sent your message to ${dUser}`
15 );
16}
1case 'dm':
2 mentiondm = message.mentions.users.first();
3 message.channel.bulkDelete(1);
4 if (!message.member.roles.cache.some(role => role.name === "Owner")) return message.channel.send('Beep Boing: This command is way too powerful for you to use!');
5 if (mentiondm == null) return message.reply('Beep Boing: No user to send message to!');
6 mentionMessage = message.content.slice(3);
7 mentiondm.send(mentionMessage);
8 console.log('Message Sent!')
9 break;