mirror of
https://github.com/sern-handler/awesome-plugins
synced 2026-06-28 02:32:17 +00:00
chore: Update JavaScript plugins (#91)
chore: update JavaScript plugins Co-authored-by: jacoobes <jacoobes@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
16328c9b4a
commit
e617fdcefb
@@ -21,7 +21,8 @@ import { CommandType, CommandControlPlugin, controller } from "@sern/handler";
|
||||
const ownerIDs = ["697795666373640213"]; //! Fill your ID
|
||||
export function ownerOnly(override?: string[]) {
|
||||
return CommandControlPlugin<CommandType.Both>((ctx) => {
|
||||
if ((override ?? ownerIDs).includes(ctx.user.id)) return controller.next();
|
||||
if ((override ?? ownerIDs).includes(ctx.user.id))
|
||||
return controller.next();
|
||||
//* If you want to reply when the command fails due to user not being owner, you can use following
|
||||
// await ctx.reply("Only owner can run it!!!");
|
||||
return controller.stop(); //! Important: It stops the execution of command!
|
||||
|
||||
Reference in New Issue
Block a user