mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-21 10:47:04 +02:00
feat: button translations
This commit is contained in:
1 parent
9d6d893373
commit
8d5e78a510
2 files changed
+8
-1
No files matched your search
@@ -1,15 +1,18 @@
|
||||
import { ChatInputCommandInteraction } from 'discord.js';
|
||||
import { translator } from '../localization/translator';
|
||||
import buttonPrimary from './buttonPrimary';
|
||||
|
||||
export function buttonRefresh(
|
||||
interaction: ChatInputCommandInteraction,
|
||||
path: string,
|
||||
) {
|
||||
const { t } = translator(interaction.locale);
|
||||
|
||||
if (
|
||||
interaction.appPermissions?.has('ReadMessageHistory') &&
|
||||
interaction.appPermissions?.has('ViewChannel')
|
||||
) {
|
||||
return buttonPrimary(path, 'Refresh');
|
||||
return buttonPrimary(path, t`bot.common.buttons.refresh`);
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
@@ -178,6 +178,10 @@
|
||||
"tanks_found": "No tanks found"
|
||||
},
|
||||
|
||||
"buttons": {
|
||||
"refresh": "Refresh"
|
||||
},
|
||||
|
||||
"errors": {
|
||||
"clan_not_found": "# Could not find clan\nCouldn't find \"%s\". Try selecting a clan from the search result.",
|
||||
"player_not_found": "# Could not find user\nI couldn't find user \"%s\". Try picking an user from the search result, typing in a valid username, or using the `/link` command.",
|
||||
|
||||
Reference in new issue
Block a user