Skip to content

Advanced boilerplate including SlashCommand handler (with auto-register based on scope) and Event Handler, to start with Your Discord.JS Typescript Bot

Notifications You must be signed in to change notification settings

mafineeek/discordjs-typescript-advanced-boilerplate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Advanced OOP (class based) boilerplate for your Discord.JS Typescript based bot

Events

Events are classes that implement such interface:

interface IEvent<K extends keyof ClientEvents> {
  event: K;
  once?: boolean;
  execute: (...args: ClientEvents[K]) => Promise<void>;
}

Slash Commands

Slash Commands are classes that implement such interface:

interface ISlashCommand {
  isGlobal?: boolean; // Should commands be registered globally?
  guildsToRegister?: string[]; // If isGlobal is false - where bot should register commands
  ownerOnly?: boolean; // Only owner command?
  requiredUserPermissions?: PermissionsString[]; // Permissions required from command author
  requiredBotPermissions?: PermissionsString[]; // Permissions required from bot
  data: SlashCommandBuilder; // Discord.JS Slash Command Builder
  execute: (
    interaction: ChatInputCommandInteraction,
    client?: BotClient
  ) => Promise<void>;
}

Installation

git clone https://github.com/mafineeek/discordjs-typescript-advanced-boilerplate

About

Advanced boilerplate including SlashCommand handler (with auto-register based on scope) and Event Handler, to start with Your Discord.JS Typescript Bot

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published