mirror of
https://github.com/Hessenuk/DiscordTickets.git
synced 2024-12-23 08:13: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 { SlashCommand } = require('@eartharoid/dbf');
|
||||||
const { ApplicationCommandOptionType } = require('discord.js');
|
const { ApplicationCommandOptionType } = require('discord.js');
|
||||||
|
|
||||||
module.exports = class MoveSlashCommand extends SlashCommand {
|
module.exports = class TransferSlashCommand extends SlashCommand {
|
||||||
constructor(client, options) {
|
constructor(client, options) {
|
||||||
const descriptionLocalizations = {};
|
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 = {};
|
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 = [
|
let opts = [
|
||||||
{
|
{
|
||||||
@ -19,10 +19,10 @@ module.exports = class MoveSlashCommand extends SlashCommand {
|
|||||||
];
|
];
|
||||||
opts = opts.map(o => {
|
opts = opts.map(o => {
|
||||||
const descriptionLocalizations = {};
|
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 = {};
|
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 {
|
return {
|
||||||
...o,
|
...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:
|
time:
|
||||||
description: Close all tickets that have been inactive for the specific time
|
description: Close all tickets that have been inactive for the specific time
|
||||||
name: 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:
|
new:
|
||||||
description: Create a new ticket
|
description: Create a new ticket
|
||||||
name: new
|
name: new
|
||||||
@ -131,6 +124,13 @@ commands:
|
|||||||
ticket:
|
ticket:
|
||||||
description: The number of the ticket to get the transcript of
|
description: The number of the ticket to get the transcript of
|
||||||
name: ticket
|
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:
|
user:
|
||||||
create:
|
create:
|
||||||
name: Create a ticket for user
|
name: Create a ticket for user
|
||||||
|
Loading…
Reference in New Issue
Block a user