mirror of
https://github.com/darksaid98/cadence-discord-bot.git
synced 2026-12-02 14:38:49 +00:00
Localize upstream /help changes
This commit is contained in:
3 files changed
+6
-30
No files matched your search
+2
-2
@@ -56,9 +56,9 @@
|
||||
"name": "help",
|
||||
"description": "Show the list of bot commands."
|
||||
},
|
||||
"addBotCallout": "{{icon}} **Enjoying {{botName}}?**\nAdd me to another server:\n**[Click me!]({{invite}})**",
|
||||
"addBotButton": "Add bot",
|
||||
"listTitle": "{{icon}} **List of commands**",
|
||||
"supportServerCallout": "{{icon}} **Support server**\nJoin the support server for help or to suggest improvements:\n{{invite}}"
|
||||
"supportServerButton": "Support server"
|
||||
},
|
||||
"history": {
|
||||
"metadata": {
|
||||
|
||||
Vendored
+2
-2
@@ -57,9 +57,9 @@ interface Resources {
|
||||
"name": "help",
|
||||
"description": "Show the list of bot commands."
|
||||
},
|
||||
"addBotCallout": "{{icon}} **Enjoying {{botName}}?**\nAdd me to another server:\n**[Click me!]({{invite}})**",
|
||||
"addBotButton": "Add bot",
|
||||
"listTitle": "{{icon}} **List of commands**",
|
||||
"supportServerCallout": "{{icon}} **Support server**\nJoin the support server for help or to suggest improvements:\n{{invite}}"
|
||||
"supportServerButton": "Support server"
|
||||
},
|
||||
"history": {
|
||||
"metadata": {
|
||||
|
||||
@@ -15,7 +15,6 @@ import { BaseSlashCommandInteraction } from '../../../classes/interactions';
|
||||
import { BaseSlashCommandParams, BaseSlashCommandReturnType } from '../../../types/interactionTypes';
|
||||
import { localizeCommand, useServerTranslator } from '../../../common/localeUtil';
|
||||
import { ExtendedClient } from '../../../types/clientTypes';
|
||||
import { TFunction } from 'i18next';
|
||||
|
||||
class HelpCommand extends BaseSlashCommandInteraction {
|
||||
constructor() {
|
||||
@@ -37,7 +36,7 @@ class HelpCommand extends BaseSlashCommandInteraction {
|
||||
.setURL(this.botOptions.serverInviteUrl)
|
||||
.setStyle(ButtonStyle.Link)
|
||||
.setEmoji(this.embedOptions.icons.support)
|
||||
.setLabel('Support server')
|
||||
.setLabel(translator('commands.help.supportServerButton'))
|
||||
.toJSON();
|
||||
components.push(supportServerButton);
|
||||
}
|
||||
@@ -47,7 +46,7 @@ class HelpCommand extends BaseSlashCommandInteraction {
|
||||
.setURL(this.botOptions.botInviteUrl)
|
||||
.setStyle(ButtonStyle.Link)
|
||||
.setEmoji(this.embedOptions.icons.bot)
|
||||
.setLabel('Add bot')
|
||||
.setLabel(translator('commands.help.addBotButton'))
|
||||
.toJSON();
|
||||
components.push(addBotButton);
|
||||
}
|
||||
@@ -110,29 +109,6 @@ class HelpCommand extends BaseSlashCommandInteraction {
|
||||
}
|
||||
return '';
|
||||
}
|
||||
|
||||
private async getSupportServerString(translator: TFunction): Promise<string> {
|
||||
if (!this.botOptions.serverInviteUrl) {
|
||||
return '';
|
||||
}
|
||||
|
||||
return translator('commands.help.supportServerCallout', {
|
||||
icon: this.embedOptions.icons.support,
|
||||
invite: this.botOptions.serverInviteUrl
|
||||
});
|
||||
}
|
||||
|
||||
private async getAddBotString(translator: TFunction): Promise<string> {
|
||||
if (!this.botOptions.botInviteUrl) {
|
||||
return '';
|
||||
}
|
||||
|
||||
return translator('commands.help.addBotCallout', {
|
||||
icon: this.embedOptions.icons.bot,
|
||||
botName: this.botOptions.name,
|
||||
invite: this.botOptions.botInviteUrl
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
export default new HelpCommand();
|
||||
Reference in new issue
Block a user