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,4 +1,5 @@
|
|||
const { googleVisionLabels } = require("#api");
|
||||
const { PERMISSION_GROUPS } = require("#constants");
|
||||
|
||||
const { getRecentImage } = require("#utils/attachment");
|
||||
const { createEmbed } = require("#utils/embed");
|
||||
|
@ -6,9 +7,6 @@ const { pill, smallPill } = require("#utils/markdown");
|
|||
const { editOrReply } = require("#utils/message");
|
||||
const { STATICS } = require("#utils/statics");
|
||||
|
||||
// TODO: Turn this into a general purpose permissions constant
|
||||
const { Permissions } = require("detritus-client/lib/constants");
|
||||
|
||||
module.exports = {
|
||||
name: 'labels',
|
||||
metadata: {
|
||||
|
@ -17,7 +15,7 @@ module.exports = {
|
|||
category: 'utils',
|
||||
usage: 'labels <attachment>'
|
||||
},
|
||||
permissionsClient: [Permissions.EMBED_LINKS, Permissions.SEND_MESSAGES, Permissions.USE_EXTERNAL_EMOJIS, Permissions.READ_MESSAGE_HISTORY],
|
||||
permissionsClient: [...PERMISSION_GROUPS.baseline],
|
||||
run: async (context) => {
|
||||
context.triggerTyping();
|
||||
let image = await getRecentImage(context, 50)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue