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

16 lines
382 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('AttachFiles') &&
interaction.appPermissions?.has('ViewChannel')
) {
2023-10-14 11:36:10 -05:00
return buttonPrimary(path, 'Refresh');
2023-10-11 18:26:35 -05:00
}
return null;
}