mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-03 15:07:42 +02:00
Add a bunch of report shortcut subcommands
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
const Command = require('../../framework/Command');
|
||||
|
||||
module.exports = class FeedbackCommand extends Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: 'feedback',
|
||||
group: 'util-public',
|
||||
description: 'Shortcut to send feedback.',
|
||||
guarded: true,
|
||||
args: [
|
||||
{
|
||||
key: 'message',
|
||||
type: 'string'
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
run(msg, { message }) {
|
||||
return this.client.registry.commands.get('report').run(msg, { reason: 'feedback', message });
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,23 @@
|
||||
const Command = require('../../framework/Command');
|
||||
|
||||
module.exports = class ReportAbuseCommand extends Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: 'report-abuse',
|
||||
aliases: ['abuse'],
|
||||
group: 'util-public',
|
||||
description: 'Shortcut to report abuse.',
|
||||
guarded: true,
|
||||
args: [
|
||||
{
|
||||
key: 'message',
|
||||
type: 'string'
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
run(msg, { message }) {
|
||||
return this.client.registry.commands.get('report').run(msg, { reason: 'abuse', message });
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,23 @@
|
||||
const Command = require('../../framework/Command');
|
||||
|
||||
module.exports = class ReportBugCommand extends Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: 'report-bug',
|
||||
aliases: ['bug', 'report-suggestion'],
|
||||
group: 'util-public',
|
||||
description: 'Shortcut to report a bug.',
|
||||
guarded: true,
|
||||
args: [
|
||||
{
|
||||
key: 'message',
|
||||
type: 'string'
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
run(msg, { message }) {
|
||||
return this.client.registry.commands.get('report').run(msg, { reason: 'bug', message });
|
||||
}
|
||||
};
|
||||
@@ -8,7 +8,7 @@ module.exports = class ReportCommand extends Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: 'report',
|
||||
aliases: ['bug', 'report-bug', 'feedback', 'contact', 'suggest', 'suggestion', 'abuse', 'report-abuse'],
|
||||
aliases: ['contact'],
|
||||
group: 'util-public',
|
||||
description: 'Reports something to the bot owner(s).',
|
||||
guarded: true,
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
const Command = require('../../framework/Command');
|
||||
|
||||
module.exports = class SuggestCommand extends Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: 'suggest',
|
||||
aliases: ['suggestion'],
|
||||
group: 'util-public',
|
||||
description: 'Shortcut to suggest new features.',
|
||||
guarded: true,
|
||||
args: [
|
||||
{
|
||||
key: 'message',
|
||||
type: 'string'
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
run(msg, { message }) {
|
||||
return this.client.registry.commands.get('report').run(msg, { reason: 'suggestion', message });
|
||||
}
|
||||
};
|
||||
@@ -19,6 +19,7 @@ module.exports = class Command {
|
||||
this.guildOnly = options.guildOnly || false;
|
||||
this.game = options.game || false;
|
||||
this.guarded = options.guarded || false;
|
||||
this.hidden = options.hidden || false;
|
||||
this.unknown = options.unknown || false;
|
||||
this.throttling = options.throttling || { usages: 2, duration: 5 };
|
||||
this.sendTyping = typeof options.sendTyping === 'undefined' ? true : Boolean(options.sendTyping);
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "xiao",
|
||||
"version": "155.1.0",
|
||||
"version": "155.2.0",
|
||||
"description": "Your personal server companion.",
|
||||
"main": "Xiao.js",
|
||||
"scripts": {
|
||||
|
||||
Reference in New Issue
Block a user