mirror of
https://github.com/SrIzan10/vinci.git
synced 2026-06-06 01:07:00 +00:00
chore: we add a lil button
This commit is contained in:
@@ -38,6 +38,10 @@ export default commandModule({
|
||||
new ButtonBuilder()
|
||||
.setLabel('lol')
|
||||
.setURL('https://discord.com/channels/928018226330337280/928018227156643857/1030480463690731530')
|
||||
.setStyle(ButtonStyle.Link),
|
||||
new ButtonBuilder()
|
||||
.setLabel('<3')
|
||||
.setURL('https://discord.com/channels/928018226330337280/1030913456846680134')
|
||||
.setStyle(ButtonStyle.Link)
|
||||
)
|
||||
await ctx.reply({embeds: [page1], components: [buttons], ephemeral: true})
|
||||
|
||||
31
src/plugins/srIzanOnly.ts
Normal file
31
src/plugins/srIzanOnly.ts
Normal file
@@ -0,0 +1,31 @@
|
||||
// @ts-nocheck
|
||||
/**
|
||||
* @author: @EvolutionX-10
|
||||
* @version: 1.0.0
|
||||
* @description: This is OwnerOnly plugin, it allows only bot owners to run the command, like eval.
|
||||
* @license: MIT
|
||||
* @example:
|
||||
* ```ts
|
||||
* import { OwnerOnly } from "../path/to/your/plugin/folder";
|
||||
* import { sernModule, CommandType } from "@sern/handler";
|
||||
* export default sernModule<CommandType.Slash>([OwnerOnly()], {
|
||||
* // your code
|
||||
* })
|
||||
* ```
|
||||
*/
|
||||
|
||||
import { CommandType, EventPlugin, PluginType } from "@sern/handler";
|
||||
const ownerIDs = ['703974042700611634']; //! Fill your ID
|
||||
export function ownerOnly(): EventPlugin<CommandType.Both> {
|
||||
return {
|
||||
type: PluginType.Event,
|
||||
description: "Allows only bot owner to run command",
|
||||
async execute(event, controller) {
|
||||
const [ctx] = event;
|
||||
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("**ERROR**: Sólo Sr Izan puede correr este comando.");
|
||||
return controller.stop(); //! Important: It stops the execution of command!
|
||||
},
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user