mirror of
https://gitlab.com/bignutty/labscore.git
synced 2025-06-09 06:33:05 -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 { geminiVision } = require("#obelisk");
|
||||
|
||||
const { getRecentImage } = require("#utils/attachment");
|
||||
|
@ -7,9 +8,6 @@ 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 } = require("detritus-client/lib/constants");
|
||||
|
||||
module.exports = {
|
||||
name: 'gemini-vision',
|
||||
label: 'text',
|
||||
|
@ -21,7 +19,7 @@ module.exports = {
|
|||
category: 'limited',
|
||||
usage: 'gemini-vision <attachment> <prompt>'
|
||||
},
|
||||
permissionsClient: [Permissions.EMBED_LINKS, Permissions.SEND_MESSAGES, Permissions.USE_EXTERNAL_EMOJIS, Permissions.ATTACH_FILES, Permissions.READ_MESSAGE_HISTORY],
|
||||
permissionsClient: [...PERMISSION_GROUPS.baseline, ...PERMISSION_GROUPS.attachments],
|
||||
run: async (context, args) => {
|
||||
if(!await hasFeature(context, "ai/gemini/vision")) return;
|
||||
context.triggerTyping();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue