Files
blitzkit/src/core/discord/buttonRefresh.ts
T

16 lines
389 B
TypeScript
Raw Normal View History

2023-10-11 18:26:35 -05:00
import { ChatInputCommandInteraction } from 'discord.js';
2023-10-14 11:36:10 -05:00
import buttonPrimary from './buttonPrimary';
2023-10-11 18:26:35 -05:00
2023-10-14 11:36:10 -05:00
export function buttonRefresh(
2023-10-11 18:26:35 -05:00
interaction: ChatInputCommandInteraction,
path: string,
) {
if (
interaction.appPermissions?.has('ReadMessageHistory') &&
2023-10-11 18:26:35 -05:00
interaction.appPermissions?.has('ViewChannel')
) {
2024-03-07 17:02:37 -06:00
return buttonPrimary(path, 'Refresh');
2023-10-11 18:26:35 -05:00
}
return null;
}