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

@ -5,6 +5,8 @@ const { STATICS } = require('../../../labscore/utils/statics')
const { weather } = require('../../../labscore/api');
const { pill, icon } = require('../../../labscore/utils/markdown');
const { Permissions } = require("detritus-client/lib/constants");
module.exports = {
name: 'weather',
label: 'query',
@ -15,6 +17,7 @@ module.exports = {
category: 'search',
usage: 'weather <location>'
},
permissionsClient: [Permissions.EMBED_LINKS, Permissions.SEND_MESSAGES, Permissions.USE_EXTERNAL_EMOJIS],
run: async (context, args) => {
context.triggerTyping();
if(!args.query) return editOrReply(context, {embeds:[createEmbed("warning", context, `Missing Parameter (location).`)]})