mirror of
https://gitlab.com/bignutty/labscore.git
synced 2025-06-08 06:03:04 -04:00
- properly handle permissions for user commands
- add central permission group constant
This commit is contained in:
parent
dcb823a0a1
commit
d2aeecf70d
100 changed files with 245 additions and 942 deletions
|
@ -1,3 +1,4 @@
|
|||
const { PERMISSION_GROUPS } = require('#constants');
|
||||
const { LlmPrivateBard } = require('#obelisk');
|
||||
|
||||
const { createEmbed } = require('#utils/embed')
|
||||
|
@ -6,8 +7,7 @@ const { editOrReply } = require('#utils/message')
|
|||
const { STATIC_ICONS } = require('#utils/statics');
|
||||
const { hasFeature } = require('#utils/testing');
|
||||
|
||||
// TODO: Turn this into a general purpose permissions constant
|
||||
const { Permissions, InteractionCallbackTypes } = require("detritus-client/lib/constants");
|
||||
const { InteractionCallbackTypes } = require("detritus-client/lib/constants");
|
||||
const { Components } = require('detritus-client/lib/utils');
|
||||
|
||||
module.exports = {
|
||||
|
@ -22,7 +22,7 @@ module.exports = {
|
|||
usage: 'gemini <input>'
|
||||
},
|
||||
args: [],
|
||||
permissionsClient: [Permissions.EMBED_LINKS, Permissions.SEND_MESSAGES, Permissions.ATTACH_FILES, Permissions.USE_EXTERNAL_EMOJIS, Permissions.READ_MESSAGE_HISTORY],
|
||||
permissionsClient: [...PERMISSION_GROUPS.baseline, ...PERMISSION_GROUPS.attachments],
|
||||
run: async (context, args) => {
|
||||
if(!await hasFeature(context, "ai/bard")) return;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue