Merge remote-tracking branch 'origin/master'

This commit is contained in:
Unknown 2018-02-24 11:51:55 -05:00
commit 83bfe82d30
2 changed files with 31 additions and 1 deletions

2
bot.js
View file

@ -11,7 +11,7 @@ function setGame() {
const games = [
'Pokemon',
'Catching things',
'Finding pokemons',
'Finding pokemon',
'Type p:help for help',
];

30
commands/warn.js Normal file
View file

@ -0,0 +1,30 @@
exports.run = (bot, msg, args) => {
if (!message.member.permissions.has("MANAGE_MESSAGES")) return message.channel.send(':warning: You cannot warn members due to your permission level.');
let warnReason = args.slice(1);
var victim = message.mentions.users.first();
message.channel.send(`Successfully logged ${victim.user.tag}'s warning.`)
bot.channels.find('name', 'logs').send(
new Discord.RichEmbed()
.setColor(0x00ae86)
.setTitle('Warning')
.addField('ID', victim.id, true)
.addField('Created Account', victim.user.createdAt, true)
.addField('Warning Reason', warnReason)
.setTimestamp()
.setFooter('Warned by: ' + message.author.user.tag, message.author.user.avatarURL)
);
};
exports.conf = {
aliases: [],
guildOnly: true,
};
exports.help = {
name: 'warn',
description: 'Logs a warning to the user.',
category: 'Moderation',
};