Auto-Aliases

This commit is contained in:
Daniel Odendahl Jr
2017-05-07 17:34:59 +00:00
parent 0a1bc41b26
commit 52e299b1b4
44 changed files with 83 additions and 89 deletions
+2 -2
View File
@@ -3,9 +3,9 @@ const { Command } = require('discord.js-commando');
module.exports = class ClearSettingCommand extends Command {
constructor(client) {
super(client, {
name: 'clearsetting',
name: 'clear-setting',
group: 'util',
memberName: 'clearsetting',
memberName: 'clear-setting',
description: 'Removes a custom-set Mod Channel, Member Channel, Staff Role, or Single Role.',
guildOnly: true,
args: [
+2 -2
View File
@@ -3,9 +3,9 @@ const { Command } = require('discord.js-commando');
module.exports = class MemberLogCommand extends Command {
constructor(client) {
super(client, {
name: 'memberchannel',
name: 'member-channel',
group: 'util',
memberName: 'memberchannel',
memberName: 'member-channel',
description: 'Sets the channel for the member logs to be sent.',
guildOnly: true,
args: [
+2 -2
View File
@@ -3,9 +3,9 @@ const { Command } = require('discord.js-commando');
module.exports = class ModChannelCommand extends Command {
constructor(client) {
super(client, {
name: 'modchannel',
name: 'mod-channel',
group: 'util',
memberName: 'modchannel',
memberName: 'mod-channel',
description: 'Sets the channel for the mod logs to be sent.',
guildOnly: true,
args: [
+7 -5
View File
@@ -6,18 +6,22 @@ require('moment-duration-format');
module.exports = class ShardInfoCommand extends Command {
constructor(client) {
super(client, {
name: 'shardinfo',
name: 'shard-info',
aliases: [
'shard'
],
group: 'util',
memberName: 'shardinfo',
memberName: 'shard-info',
description: 'Gives some bot info for the Shard you specify.',
args: [
{
key: 'shard',
prompt: 'Which Shard would you like to get data for?',
type: 'integer'
type: 'integer',
validate: shard => {
if(shard < this.client.options.shardCount || shard > -1) return true;
return 'Invalid Shard ID';
}
}
]
});
@@ -28,8 +32,6 @@ module.exports = class ShardInfoCommand extends Command {
if(!msg.channel.permissionsFor(this.client.user).has('EMBED_LINKS'))
return msg.say('This Command requires the `Embed Links` Permission.');
const { shard } = args;
if(shard > this.client.options.shardCount - 1 || shard < 0)
return msg.say('The Shard ID is not valid.');
const memory = await this.client.shard.broadcastEval('Math.round(process.memoryUsage().heapUsed / 1024 / 1024)');
const uptime = await this.client.shard.fetchClientValues('uptime');
const guilds = await this.client.shard.fetchClientValues('guilds.size');
+2 -2
View File
@@ -3,9 +3,9 @@ const { Command } = require('discord.js-commando');
module.exports = class SingleRoleCommand extends Command {
constructor(client) {
super(client, {
name: 'singlerole',
name: 'single-role',
group: 'util',
memberName: 'singlerole',
memberName: 'single-role',
description: 'Sets a single role that is able to use commands.',
guildOnly: true,
args: [
+2 -2
View File
@@ -3,9 +3,9 @@ const { Command } = require('discord.js-commando');
module.exports = class StaffRoleCommand extends Command {
constructor(client) {
super(client, {
name: 'staffrole',
name: 'staff-role',
group: 'util',
memberName: 'staffrole',
memberName: 'staff-role',
description: 'Sets the role that can use Mod Commands without perms.',
guildOnly: true,
args: [