Files
xiao/commands/util/modchannel.js
T
Daniel Odendahl Jr 877f720cfc msg
2017-04-30 22:56:59 +00:00

29 lines
837 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.permissions.has('ADMINISTRATOR');
}
run(msg, args) {
const { channel } = args;
msg.guild.settings.set('modLog', channel.name);
return msg.say(`Mod Log channel set to ${channel.name}.`);
}
};