mirror of
https://github.com/Hessenuk/DiscordTickets.git
synced 2024-12-23 00:03:09 +02:00
Rename move
command to transfer
This commit is contained in:
parent
0bc02e808a
commit
c6abefe30d
@ -1,13 +1,13 @@
|
||||
const { SlashCommand } = require('@eartharoid/dbf');
|
||||
const { ApplicationCommandOptionType } = require('discord.js');
|
||||
|
||||
module.exports = class MoveSlashCommand extends SlashCommand {
|
||||
module.exports = class TransferSlashCommand extends SlashCommand {
|
||||
constructor(client, options) {
|
||||
const descriptionLocalizations = {};
|
||||
client.i18n.locales.forEach(l => (descriptionLocalizations[l] = client.i18n.getMessage(l, 'commands.slash.move.description')));
|
||||
client.i18n.locales.forEach(l => (descriptionLocalizations[l] = client.i18n.getMessage(l, 'commands.slash.transfer.description')));
|
||||
|
||||
const nameLocalizations = {};
|
||||
client.i18n.locales.forEach(l => (nameLocalizations[l] = client.i18n.getMessage(l, 'commands.slash.move.name')));
|
||||
client.i18n.locales.forEach(l => (nameLocalizations[l] = client.i18n.getMessage(l, 'commands.slash.transfer.name')));
|
||||
|
||||
let opts = [
|
||||
{
|
||||
@ -19,10 +19,10 @@ module.exports = class MoveSlashCommand extends SlashCommand {
|
||||
];
|
||||
opts = opts.map(o => {
|
||||
const descriptionLocalizations = {};
|
||||
client.i18n.locales.forEach(l => (descriptionLocalizations[l] = client.i18n.getMessage(l, `commands.slash.move.options.${o.name}.description`)));
|
||||
client.i18n.locales.forEach(l => (descriptionLocalizations[l] = client.i18n.getMessage(l, `commands.slash.transfer.options.${o.name}.description`)));
|
||||
|
||||
const nameLocalizations = {};
|
||||
client.i18n.locales.forEach(l => (nameLocalizations[l] = client.i18n.getMessage(l, `commands.slash.move.options.${o.name}.name`)));
|
||||
client.i18n.locales.forEach(l => (nameLocalizations[l] = client.i18n.getMessage(l, `commands.slash.transfer.options.${o.name}.name`)));
|
||||
|
||||
return {
|
||||
...o,
|
||||
@ -43,5 +43,8 @@ module.exports = class MoveSlashCommand extends SlashCommand {
|
||||
});
|
||||
}
|
||||
|
||||
async run(interaction) { }
|
||||
async run(interaction) {
|
||||
// TODO: check discordCategory max but not category max (ignore)
|
||||
// TODO: update cached count for both categories and category-members (from and to)
|
||||
}
|
||||
};
|
@ -69,13 +69,6 @@ commands:
|
||||
time:
|
||||
description: Close all tickets that have been inactive for the specific time
|
||||
name: time
|
||||
move:
|
||||
description: Move a ticket to another category
|
||||
name: move
|
||||
options:
|
||||
category:
|
||||
description: The category to move the ticket to
|
||||
name: category
|
||||
new:
|
||||
description: Create a new ticket
|
||||
name: new
|
||||
@ -131,6 +124,13 @@ commands:
|
||||
ticket:
|
||||
description: The number of the ticket to get the transcript of
|
||||
name: ticket
|
||||
transfer:
|
||||
description: Transfer a ticket to another category
|
||||
name: transfer
|
||||
options:
|
||||
category:
|
||||
description: The category to transfer the ticket to
|
||||
name: category
|
||||
user:
|
||||
create:
|
||||
name: Create a ticket for user
|
||||
|
Loading…
Reference in New Issue
Block a user