8000 GitHub - BLITZ-BOTS/JSR-Bot: This bot is designed to load and manage plugins dynamically, handling their respective events and commands.
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

This bot is designed to load and manage plugins dynamically, handling their respective events and commands.

License

Notifications You must be signed in to change notification settings

BLITZ-BOTS/JSR-Bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This bot is designed to load and manage plugins dynamically, handling their respective events and commands.

Example Usage

const bot = new Bot({ token: token });
bot.start();

Custom Intents

const customIntents = [
  IntentsBitField.Flags.Guilds,
  IntentsBitField.Flags.GuildMessages,
];

const bot = new Bot({ token: token, intents: customIntents });
bot.start();

Custom Plugin Directory

const bot = new Bot({ token: token, pluginsDir: "./custom_plugins" });
bot.start();

Load Within A Server

const bot = new Bot({ token: token, server: "123456789101112" });
bot.start();

Project Structure

The project is organized into a clear directory structure that separates the core bot code, configuration, and plugin functionality. Each plugin can define its own commands and events, making it easy to add or remove functionality as needed.

.
├── bot.ts                  
└── plugins                
    └── plugin_1
        ├── blitz.config.yaml           
        ├── events          
        │   └── ready.ts    
        └── commands        
            └── ping.ts

Explanation of Key Files and Directories

  • bot.ts: The main entry point for the bot. This file is responsible for initializing the bot, loading configuration settings, and dynamically importing plugins along with their events and commands.
  • plugins/: Contains all plugins. Each plugin is organized into subdirectories for events and commands, which helps in managing individual plugin functionality independently. Each plugin contains a blitz.config.yaml file which contains all metadata and config for a plugin.

Example Plugin Structure

Each plugin follows a standardized structure within the plugins/ folder. For example:

plugin_1
├── blitz.config.yaml
├── events
│   └── ready.ts            
└── commands
    └── ping.ts

This structure helps keep the bot modular and scalable. Adding a new plugin is as simple as creating a new folder under plugins and adding corresponding event or command files.

About

This bot is designed to load and manage plugins dynamically, handling their respective events and commands.

Topics

Resources

License

Stars

Watchers

Forks

Contributors 2

  •  
  •  
0