add permission checks to everything user-facing

This commit is contained in:
derpystuff 2023-06-15 12:09:40 +02:00
parent 9e9c53e1bd
commit 61274d6be5
66 changed files with 276 additions and 27 deletions

View file

@ -4,6 +4,8 @@ const { STATICS } = require('../../../../labscore/utils/statics')
const { retroWave } = require('../../../../labscore/api')
const { Permissions } = require("detritus-client/lib/constants");
module.exports = {
name: 'retro',
label: 'text',
@ -18,6 +20,7 @@ module.exports = {
{default: 5, name: 'background', type: 'integer', help: "Background Style ` 1, 2, 3, 4, 5 `"},
{default: 4, name: 'style', type: 'integer', help: "Text Style ` 1, 2, 3, 4 `"},
],
permissionsClient: [Permissions.EMBED_LINKS, Permissions.SEND_MESSAGES, Permissions.USE_EXTERNAL_EMOJIS, Permissions.ATTACH_FILES],
run: async (context, args) => {
context.triggerTyping();
if(!args.text) return editOrReply(context, {embeds:[createEmbed("warning", context, `Missing Parameter (text).`)]})

View file

@ -4,6 +4,8 @@ const { STATICS } = require('../../../../labscore/utils/statics')
const { yacht } = require('../../../../labscore/api')
const { Permissions } = require("detritus-client/lib/constants");
module.exports = {
name: 'yacht',
label: 'text',
@ -14,6 +16,7 @@ module.exports = {
category: 'image',
usage: 'yacht <text>'
},
permissionsClient: [Permissions.EMBED_LINKS, Permissions.SEND_MESSAGES, Permissions.USE_EXTERNAL_EMOJIS, Permissions.ATTACH_FILES],
run: async (context, args) => {
context.triggerTyping();
if(!args.text) return editOrReply(context, {embeds:[createEmbed("warning", context, `Missing Parameter (text).`)]})