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,11 +1,9 @@
|
|||
const { PERMISSION_GROUPS } = require("#constants");
|
||||
const { WebUtilsWebPageScreenshot} = require("#obelisk");
|
||||
|
||||
const { createEmbed } = require("#utils/embed");
|
||||
const { editOrReply } = require("#utils/message");
|
||||
|
||||
// TODO: Turn this into a general purpose permissions constant
|
||||
const { Permissions } = require("detritus-client/lib/constants");
|
||||
|
||||
module.exports = {
|
||||
label: "url",
|
||||
name: "screenshot",
|
||||
|
@ -18,7 +16,7 @@ module.exports = {
|
|||
usage: 'screenshot <url>',
|
||||
slashCommand: "screenshot"
|
||||
},
|
||||
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 (!args.url) return editOrReply(context, createEmbed("warning", context, "No url supplied."))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue