mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-22 11:17:05 +02:00
fix: remove refresh button if not enough permissions
This commit is contained in:
1 parent
96a9e5b938
commit
716b446272
5 files changed
+30
-17
No files matched your search
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user