mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-22 19:19:52 +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;
|
||||
|
||||
Reference in new issue
Block a user