Files
xiao/commands/settings/modchannel.js
T
2017-05-19 13:43:56 +00:00

31 lines
885 B
JavaScript

const { Command } = require('discord.js-commando');
module.exports = class ModChannelCommand extends Command {
constructor(client) {
super(client, {
name: 'mod-channel',
group: 'settings',
memberName: 'mod-channel',
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.id);
return msg.say(`Mod Log channel set to ${channel.name}.`);
}
};