Files
blitzkit/src/core/discord/buttonRefresh.ts
T
2024-03-07 17:02:37 -06:00

17 lines
389 B
TypeScript

import { ChatInputCommandInteraction } from 'discord.js';
import buttonPrimary from './buttonPrimary';
export function buttonRefresh(
interaction: ChatInputCommandInteraction,
path: string,
) {
if (
interaction.appPermissions?.has('ReadMessageHistory') &&
interaction.appPermissions?.has('ViewChannel')
) {
return buttonPrimary(path, 'Refresh');
}
return null;
}