mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-03 23:36:43 +02:00
Remove unused owner-only commands
This commit is contained in:
@@ -1,40 +0,0 @@
|
||||
const Command = require('../../structures/Command');
|
||||
|
||||
module.exports = class CommandLastRunImportCommand extends Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: 'command-last-run-import',
|
||||
aliases: [
|
||||
'lr-import',
|
||||
'lrlb-import',
|
||||
'last-run-import',
|
||||
'cmd-lr-import',
|
||||
'cmd-last-run-import',
|
||||
'command-lr-import',
|
||||
'import-cmd-lr',
|
||||
'import-cmd-last-run',
|
||||
'import-command-lr',
|
||||
'import-command-last-run',
|
||||
'import-lr',
|
||||
'import-lrlb',
|
||||
'import-last-run'
|
||||
],
|
||||
group: 'util',
|
||||
memberName: 'command-last-run-import',
|
||||
description: 'Imports a command last run JSON file.',
|
||||
details: 'Only the bot owner(s) may use this command.',
|
||||
ownerOnly: true,
|
||||
guarded: true
|
||||
});
|
||||
}
|
||||
|
||||
run(msg) {
|
||||
try {
|
||||
const results = this.client.importLastRun();
|
||||
if (!results) return msg.reply('The JSON file provided is invalid.');
|
||||
return msg.say('Successfully imported command last run.');
|
||||
} catch (err) {
|
||||
return msg.reply(`Could not read \`command-last-run.json\`: \`${err.message}\`.`);
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -1,42 +0,0 @@
|
||||
const Command = require('../../structures/Command');
|
||||
|
||||
module.exports = class CommandLeaderboardImportCommand extends Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: 'command-leaderboard-import',
|
||||
aliases: [
|
||||
'cmd-lb-import',
|
||||
'cmd-leaderboard-import',
|
||||
'command-lb-import',
|
||||
'import-cmd-lb',
|
||||
'import-cmd-leaderboard',
|
||||
'import-command-lb',
|
||||
'import-command-leaderboard'
|
||||
],
|
||||
group: 'util',
|
||||
memberName: 'command-leaderboard-import',
|
||||
description: 'Imports a command leaderboard JSON file.',
|
||||
details: 'Only the bot owner(s) may use this command.',
|
||||
ownerOnly: true,
|
||||
guarded: true,
|
||||
args: [
|
||||
{
|
||||
key: 'add',
|
||||
prompt: 'Do you want to add the values to the existing ones?',
|
||||
type: 'boolean',
|
||||
default: false
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
run(msg, { add }) {
|
||||
try {
|
||||
const results = this.client.importCommandLeaderboard(add);
|
||||
if (!results) return msg.reply('The JSON file provided is invalid.');
|
||||
return msg.say('Successfully imported command leaderboard.');
|
||||
} catch (err) {
|
||||
return msg.reply(`Could not read \`command-leaderboard.json\`: \`${err.message}\`.`);
|
||||
}
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user