mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-20 05:51:35 +02:00
Remove 15 commands, patreon and bot list stuff
This commit is contained in:
@@ -1,29 +0,0 @@
|
||||
const Command = require('../../framework/Command');
|
||||
|
||||
module.exports = class ForcePatronCommand extends Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: 'force-patron',
|
||||
group: 'util',
|
||||
memberName: 'force-patron',
|
||||
description: 'Allows a user to use patron-only commands.',
|
||||
details: 'Only the bot owner(s) may use this command.',
|
||||
ownerOnly: true,
|
||||
guarded: true,
|
||||
args: [
|
||||
{
|
||||
key: 'target',
|
||||
prompt: 'Who do you want to allow? Use the ID.',
|
||||
type: 'string'
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
run(msg, { target }) {
|
||||
if (this.client.patreon.isPatron(target)) return msg.say(`💸 \`${target}\` is already a patron.`);
|
||||
this.client.patreon.forced.push(target);
|
||||
this.client.patreon.exportForced();
|
||||
return msg.say(`💸 Allowed \`${target}\` to use patron-only commands.`);
|
||||
}
|
||||
};
|
||||
@@ -1,30 +0,0 @@
|
||||
const Command = require('../../framework/Command');
|
||||
const { removeFromArray } = require('../../util/Util');
|
||||
|
||||
module.exports = class UnforcePatronCommand extends Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: 'unforce-patron',
|
||||
group: 'util',
|
||||
memberName: 'unforce-patron',
|
||||
description: 'Disallows a user from using patron-only commands.',
|
||||
details: 'Only the bot owner(s) may use this command.',
|
||||
ownerOnly: true,
|
||||
guarded: true,
|
||||
args: [
|
||||
{
|
||||
key: 'target',
|
||||
prompt: 'Who do you want to disallow? Use the ID.',
|
||||
type: 'string'
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
run(msg, { target }) {
|
||||
if (!this.client.patreon.isPatron(target)) return msg.say(`💸 \`${target}\` is not a patron.`);
|
||||
removeFromArray(this.client.patreon.forced, target);
|
||||
this.client.patreon.exportForced();
|
||||
return msg.say(`💸 Disallowed \`${target}\` from using patron-only commands.`);
|
||||
}
|
||||
};
|
||||
@@ -1,33 +0,0 @@
|
||||
const Command = require('../../framework/Command');
|
||||
|
||||
module.exports = class WebhookCommand extends Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: 'webhook',
|
||||
aliases: ['rin', 'rin-say'],
|
||||
group: 'util',
|
||||
memberName: 'webhook',
|
||||
description: 'Posts a message to the webhook defined in the bot owner\'s `process.env`.',
|
||||
details: 'Only the bot owner(s) may use this command.',
|
||||
ownerOnly: true,
|
||||
clientPermissions: ['MANAGE_MESSAGES'],
|
||||
args: [
|
||||
{
|
||||
key: 'content',
|
||||
prompt: 'What text would you like the webhook to say?',
|
||||
type: 'string'
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
async run(msg, { content }) {
|
||||
try {
|
||||
if (msg.guild && msg.deletable) await msg.delete();
|
||||
await this.client.webhook.send(content);
|
||||
return null;
|
||||
} catch (err) {
|
||||
return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
|
||||
}
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user