mirror of
https://gitlab.com/bignutty/labscore.git
synced 2025-06-08 14:13:02 -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
|
@ -4,10 +4,8 @@ const { editOrReply } = require('#utils/message')
|
|||
const { codeblock, icon, smallIconPill } = require('#utils/markdown');
|
||||
const { STATICS } = require('#utils/statics');
|
||||
|
||||
// TODO: Turn this into a general purpose permissions constant
|
||||
const { Permissions } = require("detritus-client/lib/constants");
|
||||
|
||||
const superagent = require('superagent');
|
||||
const { PERMISSION_GROUPS } = require("#constants");
|
||||
|
||||
module.exports = {
|
||||
name: 'qr',
|
||||
|
@ -20,7 +18,7 @@ module.exports = {
|
|||
category: 'utils',
|
||||
usage: `qr <contents>`
|
||||
},
|
||||
permissionsClient: [Permissions.EMBED_LINKS, Permissions.SEND_MESSAGES, Permissions.READ_MESSAGE_HISTORY, Permissions.ATTACH_FILES, Permissions.USE_EXTERNAL_EMOJIS],
|
||||
permissionsClient: [...PERMISSION_GROUPS.baseline, ...PERMISSION_GROUPS.attachments],
|
||||
run: async (context, args) => {
|
||||
|
||||
// If we have an argument, generate code
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue