Files
xiao/commands/util/modchannel.js
T
Daniel Odendahl Jr 3bb21c2df0 Cleaner Looking args
2017-05-02 17:54:07 +00:00

31 lines
881 B
JavaScript

const { Command } = require('discord.js-commando');
module.exports = class ModChannelCommand extends Command {
constructor(client) {
super(client, {
name: 'modchannel',
group: 'util',
memberName: 'modchannel',
description: 'Sets the channel for the mod logs to be sent.',
guildOnly: true,
args: [
{
key: 'channel',
prompt: 'What is the channel you want to send logs to?',
type: 'channel'
}
]
});
}
hasPermission(msg) {
return msg.member.hasPermission('ADMINISTRATOR');
}
run(msg, args) {
const { channel } = args;
msg.guild.settings.set('modLog', channel.name);
return msg.say(`Mod Log channel set to ${channel.name}.`);
}
};