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

@ -1,6 +1,8 @@
const { createEmbed } = require('../../../labscore/utils/embed')
const { editOrReply } = require('../../../labscore/utils/message')
const { Permissions } = require("detritus-client/lib/constants");
module.exports = {
name: 'undo',
default: 1,
@ -12,6 +14,7 @@ module.exports = {
category: 'core',
usage: 'undo [<amount (1-5)>]'
},
permissionsClient: [Permissions.SEND_MESSAGES, Permissions.EMBED_LINKS],
run: async (context, args) => {
try{
if(typeof(args.amount) == "string") args.amount = parseInt(args.amount)