mirror of
https://github.com/Hessenuk/DiscordTickets.git
synced 2025-09-07 10:31:26 +03:00
Add commands
This commit is contained in:
34
src/commands/add.js
Normal file
34
src/commands/add.js
Normal file
@@ -0,0 +1,34 @@
|
||||
const Command = require('../modules/commands/command');
|
||||
const { MessageEmbed } = require('discord.js');
|
||||
|
||||
module.exports = class AddCommand extends Command {
|
||||
constructor(client) {
|
||||
const i18n = client.i18n.getLocale(client.config.locale);
|
||||
super(client, {
|
||||
internal: true,
|
||||
name: i18n('commands.add.name'),
|
||||
description: i18n('commands.add.description'),
|
||||
aliases: [],
|
||||
process_args: false,
|
||||
args: [
|
||||
{
|
||||
name: i18n('commands.add.args.member.name'),
|
||||
description: i18n('commands.add.args.member.description'),
|
||||
example: i18n('commands.add.args.member.example'),
|
||||
required: true,
|
||||
},
|
||||
{
|
||||
name: i18n('commands.add.args.ticket.name'),
|
||||
description: i18n('commands.add.args.ticket.description'),
|
||||
example: i18n('commands.add.args.ticket.example'),
|
||||
required: false,
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
async execute(message, args) {
|
||||
let settings = await message.guild.settings;
|
||||
const i18n = this.client.i18n.getLocale(settings.locale);
|
||||
}
|
||||
};
|
@@ -11,7 +11,6 @@ module.exports = class BlacklistCommand extends Command {
|
||||
aliases: [
|
||||
i18n('commands.blacklist.aliases.unblacklist'),
|
||||
],
|
||||
permissions: ['MANAGE_GUILD'], // staff_only: true,
|
||||
process_args: false,
|
||||
args: [
|
||||
{
|
||||
@@ -20,7 +19,8 @@ module.exports = class BlacklistCommand extends Command {
|
||||
example: i18n('commands.blacklist.args.member_or_role.example'),
|
||||
required: false,
|
||||
}
|
||||
]
|
||||
],
|
||||
permissions: ['MANAGE_GUILD']
|
||||
});
|
||||
}
|
||||
|
||||
|
31
src/commands/help.js
Normal file
31
src/commands/help.js
Normal file
@@ -0,0 +1,31 @@
|
||||
const Command = require('../modules/commands/command');
|
||||
const { MessageEmbed } = require('discord.js');
|
||||
|
||||
module.exports = class HelpCommand extends Command {
|
||||
constructor(client) {
|
||||
const i18n = client.i18n.getLocale(client.config.locale);
|
||||
super(client, {
|
||||
internal: true,
|
||||
name: i18n('commands.help.name'),
|
||||
description: i18n('commands.help.description'),
|
||||
aliases: [
|
||||
i18n('commands.help.aliases.command'),
|
||||
i18n('commands.help.aliases.commands'),
|
||||
],
|
||||
process_args: false,
|
||||
args: [
|
||||
{
|
||||
name: i18n('commands.help.args.command.name'),
|
||||
description: i18n('commands.help.args.command.description'),
|
||||
example: i18n('commands.help.args.command.example'),
|
||||
required: false,
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
async execute(message, args) {
|
||||
let settings = await message.guild.settings;
|
||||
const i18n = this.client.i18n.getLocale(settings.locale);
|
||||
}
|
||||
};
|
34
src/commands/remove.js
Normal file
34
src/commands/remove.js
Normal file
@@ -0,0 +1,34 @@
|
||||
const Command = require('../modules/commands/command');
|
||||
const { MessageEmbed } = require('discord.js');
|
||||
|
||||
module.exports = class RemoveCommand extends Command {
|
||||
constructor(client) {
|
||||
const i18n = client.i18n.getLocale(client.config.locale);
|
||||
super(client, {
|
||||
internal: true,
|
||||
name: i18n('commands.remove.name'),
|
||||
description: i18n('commands.remove.description'),
|
||||
aliases: [],
|
||||
process_args: false,
|
||||
args: [
|
||||
{
|
||||
name: i18n('commands.remove.args.member.name'),
|
||||
description: i18n('commands.remove.args.member.description'),
|
||||
example: i18n('commands.remove.args.member.example'),
|
||||
required: true,
|
||||
},
|
||||
{
|
||||
name: i18n('commands.remove.args.ticket.name'),
|
||||
description: i18n('commands.remove.args.ticket.description'),
|
||||
example: i18n('commands.remove.args.ticket.example'),
|
||||
required: false,
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
async execute(message, args) {
|
||||
let settings = await message.guild.settings;
|
||||
const i18n = this.client.i18n.getLocale(settings.locale);
|
||||
}
|
||||
};
|
@@ -8,10 +8,12 @@ module.exports = class SettingsCommand extends Command {
|
||||
super(client, {
|
||||
internal: true,
|
||||
name: i18n('commands.settings.name'),
|
||||
description: i18n('commands.settings.description'),
|
||||
aliases: [
|
||||
i18n('commands.settings.aliases.config'),
|
||||
],
|
||||
description: i18n('commands.settings.description'),
|
||||
process_args: false,
|
||||
args: [],
|
||||
permissions: ['MANAGE_GUILD']
|
||||
});
|
||||
}
|
||||
|
22
src/commands/stats.js
Normal file
22
src/commands/stats.js
Normal file
@@ -0,0 +1,22 @@
|
||||
const Command = require('../modules/commands/command');
|
||||
const { MessageEmbed } = require('discord.js');
|
||||
|
||||
module.exports = class StatsCommand extends Command {
|
||||
constructor(client) {
|
||||
const i18n = client.i18n.getLocale(client.config.locale);
|
||||
super(client, {
|
||||
internal: true,
|
||||
name: i18n('commands.stats.name'),
|
||||
description: i18n('commands.stats.description'),
|
||||
aliases: [],
|
||||
process_args: false,
|
||||
args: [],
|
||||
staff_only: true
|
||||
});
|
||||
}
|
||||
|
||||
async execute(message, args) {
|
||||
let settings = await message.guild.settings;
|
||||
const i18n = this.client.i18n.getLocale(settings.locale);
|
||||
}
|
||||
};
|
28
src/commands/topic.js
Normal file
28
src/commands/topic.js
Normal file
@@ -0,0 +1,28 @@
|
||||
const Command = require('../modules/commands/command');
|
||||
const { MessageEmbed } = require('discord.js');
|
||||
|
||||
module.exports = class TopicCommand extends Command {
|
||||
constructor(client) {
|
||||
const i18n = client.i18n.getLocale(client.config.locale);
|
||||
super(client, {
|
||||
internal: true,
|
||||
name: i18n('commands.topic.name'),
|
||||
description: i18n('commands.topic.description'),
|
||||
aliases: [],
|
||||
process_args: false,
|
||||
args: [
|
||||
{
|
||||
name: i18n('commands.topic.args.new_topic.name'),
|
||||
description: i18n('commands.topic.args.new_topic.description'),
|
||||
example: i18n('commands.topic.args.new_topic.example'),
|
||||
required: true,
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
async execute(message, args) {
|
||||
let settings = await message.guild.settings;
|
||||
const i18n = this.client.i18n.getLocale(settings.locale);
|
||||
}
|
||||
};
|
Reference in New Issue
Block a user