mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-22 10:19:11 +02:00
Clean-Ups
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
const { Command } = require('discord.js-commando');
|
||||
const Command = require('../../structures/Command');
|
||||
const settings = require('../../assets/json/clear-setting');
|
||||
|
||||
module.exports = class ClearSettingCommand extends Command {
|
||||
@@ -9,6 +9,7 @@ module.exports = class ClearSettingCommand extends Command {
|
||||
memberName: 'clear-setting',
|
||||
description: 'Removes a custom setting from your server.',
|
||||
guildOnly: true,
|
||||
userPermissions: ['ADMINISTRATOR'],
|
||||
args: [
|
||||
{
|
||||
key: 'setting',
|
||||
@@ -23,11 +24,6 @@ module.exports = class ClearSettingCommand extends Command {
|
||||
});
|
||||
}
|
||||
|
||||
hasPermission(msg) {
|
||||
if (!msg.member.hasPermission('ADMINISTRATOR')) return 'You do not have the `Administrator` Permission.';
|
||||
else return true;
|
||||
}
|
||||
|
||||
run(msg, args) {
|
||||
const { setting } = args;
|
||||
msg.guild.settings.remove(setting);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
const { Command } = require('discord.js-commando');
|
||||
const Command = require('../../structures/Command');
|
||||
|
||||
module.exports = class InviteGuardCommand extends Command {
|
||||
constructor(client) {
|
||||
@@ -7,15 +7,11 @@ module.exports = class InviteGuardCommand extends Command {
|
||||
group: 'settings',
|
||||
memberName: 'invite-guard',
|
||||
description: 'Configures auto-delete for invites.',
|
||||
guildOnly: true
|
||||
guildOnly: true,
|
||||
userPermissions: ['ADMINISTRATOR']
|
||||
});
|
||||
}
|
||||
|
||||
hasPermission(msg) {
|
||||
if (!msg.member.hasPermission('ADMINISTRATOR')) return 'You do not have the `Administrator` Permission.';
|
||||
else return true;
|
||||
}
|
||||
|
||||
run(msg) {
|
||||
msg.guild.settings.set('inviteGuard', true);
|
||||
return msg.say('Invite Guard is now active.');
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
const { Command } = require('discord.js-commando');
|
||||
const Command = require('../../structures/Command');
|
||||
|
||||
module.exports = class JoinRoleCommand extends Command {
|
||||
constructor(client) {
|
||||
@@ -8,6 +8,7 @@ module.exports = class JoinRoleCommand extends Command {
|
||||
memberName: 'join-role',
|
||||
description: 'Sets a role that new members are automatically joined to.',
|
||||
guildOnly: true,
|
||||
userPermissions: ['ADMINISTRATOR'],
|
||||
args: [
|
||||
{
|
||||
key: 'role',
|
||||
@@ -18,11 +19,6 @@ module.exports = class JoinRoleCommand extends Command {
|
||||
});
|
||||
}
|
||||
|
||||
hasPermission(msg) {
|
||||
if (!msg.member.hasPermission('ADMINISTRATOR')) return 'You do not have the `Administrator` Permission.';
|
||||
else return true;
|
||||
}
|
||||
|
||||
run(msg, args) {
|
||||
const { role } = args;
|
||||
msg.guild.settings.set('joinRole', role.id);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
const { Command } = require('discord.js-commando');
|
||||
const Command = require('../../structures/Command');
|
||||
|
||||
module.exports = class MemberLogCommand extends Command {
|
||||
constructor(client) {
|
||||
@@ -8,6 +8,7 @@ module.exports = class MemberLogCommand extends Command {
|
||||
memberName: 'member-channel',
|
||||
description: 'Sets the channel for the member logs to be sent.',
|
||||
guildOnly: true,
|
||||
userPermissions: ['ADMINISTRATOR'],
|
||||
args: [
|
||||
{
|
||||
key: 'channel',
|
||||
@@ -18,11 +19,6 @@ module.exports = class MemberLogCommand extends Command {
|
||||
});
|
||||
}
|
||||
|
||||
hasPermission(msg) {
|
||||
if (!msg.member.hasPermission('ADMINISTRATOR')) return 'You do not have the `Administrator` Permission.';
|
||||
else return true;
|
||||
}
|
||||
|
||||
run(msg, args) {
|
||||
const { channel } = args;
|
||||
msg.guild.settings.set('memberLog', channel.id);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
const { Command } = require('discord.js-commando');
|
||||
const Command = require('../../structures/Command');
|
||||
|
||||
module.exports = class MemberMsgCommand extends Command {
|
||||
constructor(client) {
|
||||
@@ -10,6 +10,7 @@ module.exports = class MemberMsgCommand extends Command {
|
||||
description: 'Sets the message for either join/leave logs to use.',
|
||||
details: '**Placeholders:** <user>: Username, <server>: Server Name, <mention>: A Mention of the User',
|
||||
guildOnly: true,
|
||||
userPermissions: ['ADMINISTRATOR'],
|
||||
args: [
|
||||
{
|
||||
key: 'type',
|
||||
@@ -33,11 +34,6 @@ module.exports = class MemberMsgCommand extends Command {
|
||||
});
|
||||
}
|
||||
|
||||
hasPermission(msg) {
|
||||
if (!msg.member.hasPermission('ADMINISTRATOR')) return 'You do not have the `Administrator` Permission.';
|
||||
else return true;
|
||||
}
|
||||
|
||||
run(msg, args) {
|
||||
const { type, message } = args;
|
||||
if (type === 'joinMsg') {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
const { Command } = require('discord.js-commando');
|
||||
const Command = require('../../structures/Command');
|
||||
|
||||
module.exports = class ModChannelCommand extends Command {
|
||||
constructor(client) {
|
||||
@@ -8,6 +8,7 @@ module.exports = class ModChannelCommand extends Command {
|
||||
memberName: 'mod-channel',
|
||||
description: 'Sets the channel for the mod logs to be sent.',
|
||||
guildOnly: true,
|
||||
userPermissions: ['ADMINISTRATOR'],
|
||||
args: [
|
||||
{
|
||||
key: 'channel',
|
||||
@@ -18,11 +19,6 @@ module.exports = class ModChannelCommand extends Command {
|
||||
});
|
||||
}
|
||||
|
||||
hasPermission(msg) {
|
||||
if (!msg.member.hasPermission('ADMINISTRATOR')) return 'You do not have the `Administrator` Permission.';
|
||||
else return true;
|
||||
}
|
||||
|
||||
run(msg, args) {
|
||||
const { channel } = args;
|
||||
msg.guild.settings.set('modLog', channel.id);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
const { Command } = require('discord.js-commando');
|
||||
const Command = require('../../structures/Command');
|
||||
const { stripIndents } = require('common-tags');
|
||||
|
||||
module.exports = class SettingListCommand extends Command {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
const { Command } = require('discord.js-commando');
|
||||
const Command = require('../../structures/Command');
|
||||
|
||||
module.exports = class SingleRoleCommand extends Command {
|
||||
constructor(client) {
|
||||
@@ -8,6 +8,7 @@ module.exports = class SingleRoleCommand extends Command {
|
||||
memberName: 'single-role',
|
||||
description: 'Sets a single role that is able to use commands.',
|
||||
guildOnly: true,
|
||||
userPermissions: ['ADMINISTRATOR'],
|
||||
args: [
|
||||
{
|
||||
key: 'role',
|
||||
@@ -18,11 +19,6 @@ module.exports = class SingleRoleCommand extends Command {
|
||||
});
|
||||
}
|
||||
|
||||
hasPermission(msg) {
|
||||
if (!msg.member.hasPermission('ADMINISTRATOR')) return 'You do not have the `Administrator` Permission.';
|
||||
else return true;
|
||||
}
|
||||
|
||||
run(msg, args) {
|
||||
const { role } = args;
|
||||
msg.guild.settings.set('singleRole', role.id);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
const { Command } = require('discord.js-commando');
|
||||
const Command = require('../../structures/Command');
|
||||
|
||||
module.exports = class StaffRoleCommand extends Command {
|
||||
constructor(client) {
|
||||
@@ -8,6 +8,7 @@ module.exports = class StaffRoleCommand extends Command {
|
||||
memberName: 'staff-role',
|
||||
description: 'Sets the role that can use Mod Commands without perms.',
|
||||
guildOnly: true,
|
||||
userPermissions: ['ADMINISTRATOR'],
|
||||
args: [
|
||||
{
|
||||
key: 'role',
|
||||
@@ -18,11 +19,6 @@ module.exports = class StaffRoleCommand extends Command {
|
||||
});
|
||||
}
|
||||
|
||||
hasPermission(msg) {
|
||||
if (!msg.member.hasPermission('ADMINISTRATOR')) return 'You do not have the `Administrator` Permission.';
|
||||
else return true;
|
||||
}
|
||||
|
||||
run(msg, args) {
|
||||
const { role } = args;
|
||||
msg.guild.settings.set('staffRole', role.id);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
const { Command } = require('discord.js-commando');
|
||||
const Command = require('../../structures/Command');
|
||||
|
||||
module.exports = class StarboardCommand extends Command {
|
||||
constructor(client) {
|
||||
@@ -8,6 +8,7 @@ module.exports = class StarboardCommand extends Command {
|
||||
memberName: 'starboard',
|
||||
description: 'Sets the channel for the starboard.',
|
||||
guildOnly: true,
|
||||
userPermissions: ['ADMINISTRATOR'],
|
||||
args: [
|
||||
{
|
||||
key: 'channel',
|
||||
@@ -18,11 +19,6 @@ module.exports = class StarboardCommand extends Command {
|
||||
});
|
||||
}
|
||||
|
||||
hasPermission(msg) {
|
||||
if (!msg.member.hasPermission('ADMINISTRATOR')) return 'You do not have the `Administrator` Permission.';
|
||||
else return true;
|
||||
}
|
||||
|
||||
run(msg, args) {
|
||||
const { channel } = args;
|
||||
msg.guild.settings.set('starboard', channel.id);
|
||||
|
||||
Reference in New Issue
Block a user