mirror of
https://gitlab.com/bignutty/labscore.git
synced 2025-06-07 13:43:06 -04:00
dont send a permission message if we lack permissions to
This commit is contained in:
parent
2c841e27f1
commit
80f2cf0a04
1 changed files with 2 additions and 1 deletions
|
@ -53,7 +53,7 @@ const interactionClient = new InteractionCommandClient(cluster, {
|
|||
})
|
||||
|
||||
const { maintower } = require('./logging');
|
||||
const { icon, highlight, pill } = require('./utils/markdown');
|
||||
const { icon, highlight } = require('./utils/markdown');
|
||||
const { editOrReply } = require('./utils/message');
|
||||
|
||||
const { PERMISSIONS_TEXT } = require('./constants');
|
||||
|
@ -61,6 +61,7 @@ const { createEmbed } = require('./utils/embed');
|
|||
|
||||
// Handle missing permission errors
|
||||
commandClient.on('commandPermissionsFailClient', ({context, permissions}) => {
|
||||
if(!context.channel.can(Permissions.SEND_MESSAGES)) return;
|
||||
const perms = [];
|
||||
for (let permission of permissions) {
|
||||
if (permission in PERMISSIONS_TEXT) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue