A web interface that allows you to send messages to Discord channels using a bot.
This project aims to provide a simple and user-friendly web interface to send messages to Discord channels via a bot.
Before starting, ensure you have Node.js installed on your machine.
Clone the repository and navigate to the project directory. Install the necessary dependencies by running the following command:
npm install express discord.js dotenv body-parser
If you don't have a Discord bot yet, follow these steps:
- Go to the Discord Developer Portal.
- Click on "New Application".
- Provide a name for your bot and agree to the Terms of Service.
- Click "Create" to generate your Discord bot.
-
Navigate to the "Bot" tab in the Discord Developer Portal.
-
Click "Reset Token" to generate a new token.
-
Copy the generated token.
-
In the root directory of your project, create a
.env
file and add the following line:TOKEN=your-bot-token-here
Note: Do not share your token with anyone. Keep it secure!
-
Go to the "OAuth2" tab in the Discord Developer Portal.
-
Under Scopes, select "bot".
-
Under Bot Permissions, select the required permissions for your bot:
Send Messages
View Channels
-
Select "Guild Install" as the Integration Type.
-
Copy the generated URL and paste it into your web browser.
-
Choose the server where you want to add the bot, click Continue, and then Authorize.
Congratulations! Your bot is now added to the server.
To start the web interface, run:
node index.js
This command will start a local server on your machine. Open your web browser and navigate to http://localhost:3000
to access the web interface.
Once the web interface is open:
- Select the desired server (guild) and channel from the dropdown menus.
- Enter your message in the text field.
- Click "Send Message" to send your message to the selected channel.
This project is licensed under the MIT License - see the LICENSE file for details.