fix: remove refresh button if not enough permissions

This commit is contained in:
TrèsAbhi committed 2024-03-06 16:19:29 -06:00
1 parent 96a9e5b938
commit 716b446272
5 files changed
+30 -17

No files matched your search

+2 -2
View File
@@ -6,10 +6,10 @@ export function buttonRefresh(
path: string,
) {
if (
interaction.appPermissions?.has('AttachFiles') &&
interaction.appPermissions?.has('ReadMessageHistory') &&
interaction.appPermissions?.has('ViewChannel')
) {
return buttonPrimary(path, 'Refresh');
return buttonPrimary(path, 'Refresh', '🔄️');
}
return null;