- properly handle permissions for user commands

- add central permission group constant
This commit is contained in:
bignutty 2024-12-08 14:49:57 +01:00
parent dcb823a0a1
commit d2aeecf70d
100 changed files with 245 additions and 942 deletions

View file

@ -1,5 +1,5 @@
const { googleTranslate } = require('#api');
const { TRANSLATE_LANGUAGES, TRANSLATE_DISPLAY_MAPPINGS } = require('#constants');
const { TRANSLATE_LANGUAGES, TRANSLATE_DISPLAY_MAPPINGS, PERMISSION_GROUPS } = require('#constants');
const { createEmbed } = require('#utils/embed')
const { codeblock, icon, pill, stringwrap } = require('#utils/markdown');
@ -51,7 +51,7 @@ module.exports = {
}
],
run: async (context, args) => {
await acknowledge(context, args.incognito);
await acknowledge(context, args.incognito, [...PERMISSION_GROUPS.baseline_slash]);
if(!args.to) args.to = "en";
if(!args.from) args.from = "auto";