mirror of
https://github.com/sern-handler/awesome-plugins
synced 2026-06-06 01:16:51 +00:00
chore: Update JavaScript plugins (#89)
chore: update JavaScript plugins Co-authored-by: jacoobes <jacoobes@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
49db76219e
commit
3ce312f5aa
@@ -4,7 +4,7 @@
|
||||
* This is OwnerOnly plugin, it allows only bot owners to run the command, like eval.
|
||||
*
|
||||
* @author @EvolutionX-10 [<@697795666373640213>]
|
||||
* @version 1.0.0
|
||||
* @version 1.1.0
|
||||
* @example
|
||||
* ```ts
|
||||
* import { ownerOnly } from "../plugins/ownerOnly";
|
||||
@@ -21,7 +21,7 @@ import { CommandControlPlugin, controller } from "@sern/handler";
|
||||
const ownerIDs = ["697795666373640213"]; //! Fill your ID
|
||||
|
||||
export function ownerOnly() {
|
||||
return CommandControlPlugin((ctx, args) => {
|
||||
return CommandControlPlugin(async (ctx, args) => {
|
||||
if (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!!!");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user