Discord Bot JS

๐Ÿค– A modular Discord bot built with Discord.js v14 and Node.js. Includes slash commands, a guild event logging system, and automated role assignment.

Node.js Other ์ž‘์„ฑ์ž ๐’ž๐’ฝ๐‘œ๐’ธ๐‘œ
์ด ํ…œํ”Œ๋ฆฟ ๋ฐฐํฌํ•˜๊ธฐ
์Šคํฌ๋ฆฐ์ƒท 1

์†Œ๊ฐœ

README.md

๋ชฉ์ฐจ
GitHub์—์„œ ์—ด๊ธฐ

๐Ÿค– discord-bot-tutorial

A modular Discord bot built with Discord.js v14 and Node.js.

โšก Slash commands ยท ๐Ÿ“‹ Guild event logging ยท ๐ŸŽญ Automated role assignment

Deploy on Bot-Hosting.net License: MIT discord.js Node.js Lint Validate GitHub stars Last commit Repo size Support Server

๐Ÿง  About

This project is a hands-on Discord bot built to learn discord.js v14 in practice โ€” no boilerplate generators, no all-in-one frameworks, just modular code you can read top to bottom. It's structured the way a small production bot would be: event handlers, slash commands, and a lightweight database are all auto-loaded and organized by category, so adding a new feature usually means dropping in a single file rather than editing a giant index.js.

Architecture Style guide

๐Ÿš€ Deploy

Want to try it without setting it up locally? Deploy it in one click as a community template on Bot-Hosting.net:

Deploy on Bot-Hosting.net Deployments Community Template

๐Ÿ‘‰ Click here to deploy

โœจ Features

  • โšก Slash commands โ€” modular, auto-loaded from slashcommands/
  • ๐ŸŽญ Autorole โ€” automatic role assignment for users/bots on join, with role-hierarchy and admin-permission safety checks
  • ๐Ÿ“‹ Guild logging โ€” channel and role create/update/delete, message delete/bulk delete/update
  • ๐Ÿšซ Blacklist system โ€” block users from using the bot with reason, evidence, and automatic expiration
  • ๐ŸŽต Music โ€” Lavalink-powered music playback via moonlink.js
  • ๐Ÿ—ƒ๏ธ Local JSON database โ€” lightweight file-based storage per guild

๐Ÿ“ฆ Requirements

๐Ÿ› ๏ธ Setup

1. Clone the repository and install dependencies:

Bash
git clone https://github.com/choco-latito29/discord-bot-tutorial.git

cd discord-bot-tutorial

npm install

2. Copy the example environment file and fill in your bot token:

Bash
cp .env.example .env
IGNORE
TOKEN=your_bot_token_here

3. Run the bot:

Bash
npm start -s

๐Ÿ—‚๏ธ Project structure

๐Ÿ“ Events/          Event listeners (client, guild, interaction, logging)
๐Ÿ“ handlers/        Dynamic loaders for events and slash commands
๐Ÿ“ slashcommands/   Slash commands, grouped by category
๐Ÿ“ database/        Local JSON-based storage

๐Ÿ’ฌ Support

Need help or found a bug? Check SUPPORT.md or join the support server.

๐Ÿ”’ For security-related concerns, please follow the process in SECURITY.md instead of opening a public issue.

๐Ÿ“„ License

MIT โ€” see LICENSE.

๋ฐฐํฌ ๋ฐฉ๋ฒ•

  1. 1 ๋ฐฐํฌ ํŽ˜์ด์ง€ ์—ด๊ธฐ๋ฐฐํฌ ์ด๋ฆ„์„ ์ •ํ•˜์„ธ์š”. ํ™•์ธํ•  ๋•Œ ๋กœ๊ทธ์ธํ•ด์š”.
  2. 2 ๋ณ€์ˆ˜ ์ฑ„์šฐ๊ธฐํ…œํ”Œ๋ฆฟ์ด ์š”๊ตฌํ•˜๋Š” ๊ฐ’์ด๋ฉฐ ๋ฐฐํฌ์˜ ํ™˜๊ฒฝ ๋ณ€์ˆ˜๋กœ ์ €์žฅ๋ผ์š”.
  3. 3 ๋ฆฌ์†Œ์Šค ํ™•์ธ์š”๊ธˆ์ œ์˜ ๊ณต์œ  ํ’€์—์„œ ๊ฐ€์ ธ์™€ ์‹คํ–‰ํ•ด์š”. ๋ชจ๋“  ๊ณ„์ •์€ ๋ฌด๋ฃŒ๋กœ ์‹œ์ž‘ํ•ด์š”.

๋กœ๊ทธ์ธํ•˜๊ณ  ์‹ ๊ณ ํ•˜๊ธฐ

์•…์šฉ์„ ๋ง‰๊ธฐ ์œ„ํ•ด ์‹ ๊ณ ๋Š” ๊ณ„์ •๊ณผ ์—ฐ๊ฒฐ๋ผ์š”.

๋กœ๊ทธ์ธ