mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-11-13 20:56:11 +01:00
16 lines
382 B
TypeScript
16 lines
382 B
TypeScript
import { ChatInputCommandInteraction } from 'discord.js';
|
|||
|
|
import primaryButton from './primaryButton';
|
||
|
|
|
||
|
|
export function refreshButton(
|
||
|
|
interaction: ChatInputCommandInteraction,
|
||
|
|
path: string,
|
||
|
|
) {
|
||
|
|
if (
|
||
|
|
interaction.appPermissions?.has('AttachFiles') &&
|
||
|
|
interaction.appPermissions?.has('ViewChannel')
|
||
|
|
) {
|
||
|
|
return primaryButton(path, 'Refresh');
|
||
|
|
}
|
||
|
|
|
||
|
|
return null;
|
||
|
|
}
|