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
|
@ -1,12 +1,9 @@
|
|||
const { OPEN_SOURCE_REPOSITORY_URL } = require('#constants');
|
||||
const { OPEN_SOURCE_REPOSITORY_URL, PERMISSION_GROUPS } = require('#constants');
|
||||
|
||||
const { createEmbed } = require('#utils/embed');
|
||||
const { highlight, iconPill, iconLinkPill } = require('#utils/markdown');
|
||||
const { editOrReply } = require('#utils/message');
|
||||
|
||||
// TODO: Turn this into a general purpose permissions constant
|
||||
const { Permissions } = require("detritus-client/lib/constants");
|
||||
|
||||
const superagent = require("superagent");
|
||||
|
||||
// TODO: Move this into utils
|
||||
|
@ -34,7 +31,7 @@ module.exports = {
|
|||
category: 'core',
|
||||
usage: 'stats'
|
||||
},
|
||||
permissionsClient: [Permissions.EMBED_LINKS, Permissions.SEND_MESSAGES, Permissions.USE_EXTERNAL_EMOJIS, Permissions.READ_MESSAGE_HISTORY],
|
||||
permissionsClient: [...PERMISSION_GROUPS.baseline],
|
||||
run: async (context) => {
|
||||
context.triggerTyping();
|
||||
try{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue