This source code includes a Discord bot written in JavaScript, running through the discord.js
library. This bot is designed to help you quickly create channels.
The bot is developed by truongtrung, a web developer experienced in using WordPress and offering website design services.
Nothing major, just added a new feature for creating stickers for you!
- Node.js and Visual Studio Code (VSCode) installed on your computer.
- Download Node.js from https://nodejs.org/
-
Initialize the Node.js project:
- Open the terminal in VSCode.
- Navigate to the downloaded file.
-
Install
discord.js
:- Use the commands
npm init -y
andnpm install
, along withnpm install discord.js
andnpm install discord.js image-size
to install the library.
- Use the commands
-
Run the bot:
- Press the run button and select Node.js to start the bot.
The config.json
file will contain:
{
"token": "YOUR_BOT_TOKEN_HERE",
"newServerName": "New Server Name"
}
token
is where you store your bot token.newServerName
is where you set the server name, e.g., "NUKE FUMO BY TRUONGTRUNG".
If you want to make specific changes, here's an example to guide you.
In the main.js
file, look for the tags I have included:
// Create new channels
// Send a message to the last created channel
// Create new roles
You just need to change them according to your preferences.
- Add the bot to your Discord server for testing.
Good luck with your Discord bot project!
Mã nguồn này bao gồm một bot Discord được viết bằng JavaScript và chạy thông qua thư viện discord.js
. Bot này được để thực hiện trên giúp tạo kênh nhanh của bạn.
Bot này được phát triển bởi truongtrung, một nhà phát triển web với kinh nghiệm sử dụng WordPres và cung cấp dịch vụ thiết kế website.
không có gì chỉ là thêm tính năng mới là tạo sticker cho bạn!
- Node.js và Visual Studio Code (VSCode) đã được cài đặt trên máy tính của bạn.
- tải Node.js https://nodejs.org/
-
Khởi tạo dự án Node.js:
- Mở terminal trong VSCode
- và mở file đã tải xuống
-
Cài đặt
discord.js
:- Sử dụng lệnh
npm init-y
vànpm install
cùng vớinpm install discord.js
npm install discord.js image-size
để cài đặt thư viện.
- Sử dụng lệnh
-
Chạy bot:
- nhấn nút run và chọn Node.js để khởi động bot.
file config.json
sẽ có chứa là
"token": "YOUR_BOT_TOKEN_HERE",
"newServerName": "New Server Name"
token để lưu token của bạn new Server Name là đổi tên máy chủ ví dụ "NUKE FUMO BY TRUONGTRUNG"
niếu bạn muốn đổi riêng mình và đây tôi ví dụ chỉ bạn.
trong file main.js
bạn sẽ phải tìm mà tôi đã tag
// Tạo các kênh mới // Gửi tin nhắn đến kênh cuối cùng đã tạo // Tạo các vai trò mới bạn chỉ cần đổi theo ý muốn là được
- Thêm bot vào máy chủ Discord để kiểm tra.
Chúc bạn thành công với dự án bot Discord của mình.
Chúc bạn thành công với dự án bot Discord của mình.