- ๐ฅ Modern TypeScript - Written in TypeScript with full type safety
- โก Seyfert Framework - Built on top of the powerful Seyfert Discord library
- ๐ฏ Command System - Easy-to-use command structure with decorators
- ๐ฆ Event Handling - Clean event system for Discord events
- ๐ ๏ธ Development Tools - Hot reload, linting, and formatting included
- ๐ง Configuration - Flexible configuration with environment variables
- ๐ Code Quality - Biome for linting and formatting, Husky for git hooks
- ๐จ Argument Parsing - YunaForSeyfert for advanced command argument parsing
seyfert-template/
โโโ src/
โ โโโ commands/ # Bot commands
โ โ โโโ ping.ts # Example ping command
โ โโโ events/ # Discord events
โ โ โโโ ready.ts # Bot ready event
โ โโโ index.ts # Main entry point
โโโ dist/ # Compiled JavaScript (generated)
โโโ seyfert.config.mjs # Seyfert configuration
โโโ tsconfig.json # TypeScript configuration
โโโ biome.json # Biome linting/formatting config
โโโ package.json # Project dependencies
- Node.js 20+
- pnpm (recommended package manager)
- Discord Bot Token (Get one here)
-
Clone the repository
git clone https://github.com/Ganyu-Studios/seyfert-template.git cd seyfert-template
-
Install dependencies
pnpm install
-
Set up environment variables
# Create a .env file in the root directory TOKEN=your_discord_bot_token_here
-
Start development
pnpm dev
Script | Description |
---|---|
pnpm dev |
Start the bot in development mode with hot reload |
pnpm test |
Run the bot in debug mode for testing |
pnpm build |
Compile TypeScript to JavaScript |
pnpm start |
Start the production build |
pnpm lint |
Run Biome linter |
pnpm format |
Format code with Biome |
pnpm typecheck |
Check TypeScript types without emitting |
/ping
- Check bot latency and API response time- Aliases:
!ping
,?latency
,>>pong
- Shows gateway latency and API response time
- Aliases:
Create a new file in src/commands/
directory:
import { Command, type CommandContext, Declare } from "seyfert";
@Declare({
name: "hello",
description: "Say hello to the user",
})
export default class HelloCommand extends Command {
override async run(ctx: CommandContext) {
await ctx.editOrReply({ content: `Hello, ${ctx.author.displayName}! ๐` });
}
}
Create a new file in src/events/
directory:
import { createEvent } from "seyfert";
export default createEvent({
data: { name: "messageCreate" },
async run(message, client) {
// Handle message create event
console.log(`Message received: ${message.content}`);
},
});
The bot configuration is handled through seyfert.config.mjs
. Key features:
- Environment-based setup - Automatically switches between development and production
- Debug mode - Use
--debug
flag for detailed logging - Intent management - Configurable Discord gateway intents
- Command handling - Custom command processing with Yuna parser
Variable | Description | Required |
---|---|---|
TOKEN |
Discord bot token | โ |
This template includes:
- Biome - Fast linting and formatting
- Husky - Git hooks for code quality
- lint-staged - Run linters on staged files
- TypeScript - Type checking and compilation
--dev
- Development mode (usessrc/
directory)--debug
- Debug mode (enhanced logging)
- seyfert - Modern Discord bot framework
- yunaforseyfert - Advanced argument parsing
- dotenv - Environment variable management
- typescript - TypeScript compiler
- @biomejs/biome - Linting and formatting
- tsx - TypeScript execution
- husky - Git hooks
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- GitHub Issues - Report bugs or request features
- Seyfert Docs - Official Seyfert Documentation
- Seyfert Team - For the amazing Discord bot framework
- Ganyu Studios - Template development and maintenance
- Community - For feedback and contributions
Made with โค๏ธ by Ganyu Studios
Star โญ this repository if you found it helpful!