mirror of
https://github.com/sern-handler/awesome-plugins
synced 2026-06-27 18:22:17 +00:00
chore: Update JavaScript plugins (#69)
chore: update JavaScript plugins Co-authored-by: EvolutionX-10 <EvolutionX-10@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
98ab449203
commit
b2ee0996f1
@@ -18,11 +18,8 @@
|
||||
*/
|
||||
|
||||
import type { GuildMember, PermissionResolvable } from "discord.js";
|
||||
import {CommandControlPlugin, CommandType, controller } from "@sern/handler";
|
||||
export function permCheck(
|
||||
perm: PermissionResolvable,
|
||||
response: string
|
||||
) {
|
||||
import { CommandControlPlugin, CommandType, controller } from "@sern/handler";
|
||||
export function permCheck(perm: PermissionResolvable, response: string) {
|
||||
return CommandControlPlugin<CommandType.Both>(async (ctx, args) => {
|
||||
if (ctx.guild === null) {
|
||||
await ctx.reply("This command cannot be used here");
|
||||
@@ -36,5 +33,5 @@ export function permCheck(
|
||||
return controller.stop();
|
||||
}
|
||||
return controller.next();
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user