chore: update JavaScript plugins

This commit is contained in:
EvolutionX-10
2023-09-01 16:52:00 +00:00
committed by GitHub
parent 63253dce8f
commit ecaad4b162
27 changed files with 1253 additions and 610 deletions

View File

@@ -1,6 +1,7 @@
// @ts-nocheck
/**
* @plugin
* This is perm check, it allows users to parse the permission you want and let the plugin do the rest. (check bot or user for that perm).
*
* @author @Benzo-Fury [<@762918086349029386>]
@@ -17,6 +18,7 @@
* }
* })
* ```
* @end
*/
import { CommandControlPlugin, controller } from "@sern/handler";
@@ -36,7 +38,7 @@ export function requirePermission(target, perm, response) {
if (ctx.guild === null) {
ctx.reply(payload("This command cannot be used here"));
console.warn(
"PermCheck > A command stopped because we couldn't check a users permissions (was used in dms)"
"PermCheck > A command stopped because we couldn't check a users permissions (was used in dms)",
); //delete this line if you dont want to be notified when a command is used outside of a guild/server
return controller.stop();
@@ -53,7 +55,7 @@ export function requirePermission(target, perm, response) {
if (!bot.permissions.has(perm)) {
if (!response)
response = `I cannot use this command, please give me \`${perm.join(
", "
", ",
)}\` permission(s).`;
await ctx.reply(payload(response));
return controller.stop();
@@ -66,7 +68,7 @@ export function requirePermission(target, perm, response) {
if (!memm.permissions.has(perm)) {
if (!response)
response = `You cannot use this command because you are missing \`${perm.join(
", "
", ",
)}\` permission(s).`;
await ctx.reply(payload(response));
return controller.stop();