Skip to content

CodAre-Development/v14-slashli-altyapi

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🤖 Discord Bot Template

A TypeScript template for creating Discord bots with discord.js and Bun.

📦 Setup

  1. Clone the repo and install dependencies:
git clone https://github.com/bur4ky/bot-template.git
cd bot-template
bun install
cp .env.example .env
  1. Fill in your .env file.
  2. Register slash commands:
bun register
  1. Start the bot:
bun start

✨ Features

⚙️ Command Handler

Commands are organized under src/commands. Each command uses defineCommand and supports per-subcommand config overrides:

defineCommand({
  data: new SlashCommandBuilder() /* ... */,
  config: {
    category: "Bot",
    guildOnly: true,
    disabled: {
      "*": false, // default
      subcommandName: true, // only for "subcommandName"
      "subcommandGroupName subcommandName": true, // only for "subcommandName" in "subcommandGroupName"
    },
  },
  run: async ({ client, interaction }) => {
    // command logic
  },
});

🌐 Localization

Translations live in src/localizations. To add a new language:

  1. Create src/localizations/<code>.json
  2. Create src/localizations/slashCommands/<code>.json for command name/description localizations
  3. Add the locale to supportedLanguages in src/config.ts

🛠 Interaction Utilities

These are available on any interaction:

  • interaction.success(message | options) — sends a success embed
  • interaction.error(message | options) — sends an error embed
  • interaction.translate(key, options) — translates a key using the interaction's locale

📝 License

This project is licensed under the MIT License.

About

TypeScript ve birden çok dil destekli Discord.JS V14 boş altyapı

Resources

License

Stars

Watchers

Forks

Contributors

Languages

  • TypeScript 100.0%