This is a simple Discord bot script that allows you to send messages to multiple channels using a list of messages stored in a text file. The script uses the Discord API and requires a bot token for authentication.
- Send messages from multiple account to multiple Discord channels.
- Customize message delays and token processing.
- Node.js (version 14 or higher)
- npm (Node package manager)
-
Clone the repository (or download the script):
git clone https://github.com/recitativonika/Discord-auto-chat-js.git cd Discord-auto-chat-js
-
Install the required dependencies:
npm install
-
Edit
config.yaml
file in the same directory as the script with the following structure:token: - "your_token_1" - "your_token_2" channel_id: - "channel_id_1" - "channel_id_2" - "channel_id_3" token_delay: 5 # Delay for each token processing in seconds message_delay: 2 # Delay for each message sent in seconds restart_delay: 10 # Delay before restarting the bot in seconds
Get the token for your discord account with this, pasten in url bar when you open discord web
javascript:var i = document.createElement('iframe');i.onload = function(){var localStorage = i.contentWindow.localStorage;prompt('Your discord token', localStorage.getItem('token').replace(/["]+/g, ''));};document.body.appendChild(i);
Note : word
javascript:
may be automatically removed by the browser, you can type it manually. -
Edit the
chat.txt
file with the messages you want the bot to send. Each message should be on a new line.
-
Run the script:
npm start
or
node index.js
-
Monitor the terminal output:
- The bot will print colorful messages indicating the status of message sending.
- If any errors occur, they will be displayed in red.
-
Customize your configuration:
- You can modify the
config.yaml
file to add more tokens, channel IDs, and adjust delays as needed.
- You can modify the
Your chat.txt
file might look like this:
Hello there!
How's it going?
This is a random message.
Have a great day!
- Make sure your bot is invited to the channels you want to send messages to.
- Ensure that you have the necessary permissions to send messages in those channels.
This project is licensed under the MIT License. See the LICENSE file for more details.
- Inspired by the Discord API documentation.
- Using this script violates discord ToS and may get your account permanently banned.