A simple Java-based Discord bot integrated with Twitch functionality. This bot utilizes the JDA (Java Discord API) for interacting with Discord and connects to Twitch for additional features.
Invite Link: https://discord.com/oauth2/authorize?client_id=1170492845006802944&permissions=18432&integration_type=0&scope=bot
- Responds to Discord messages with custom reactions.
- Monitors Twitch streams using provided credentials.
- Configurable status and activity for the bot.
- Java Development Kit (JDK): Ensure you have JDK 8 or higher installed.
- Maven: Build and manage your project dependencies.
- JDA: Discord Java library for bot development.
- dotenv: Library for managing environment variables.
- Discord Bot Token
- Create a bot on the Discord Developer Portal.
- Add the bot to your server with appropriate permissions.
- Twitch Application Credentials
- Create a Twitch application via the Twitch Developer Portal.
- Obtain your
Client IDandClient Secret.
-
Clone the repository:
git clone <repository-url> cd DiscordTwitchBot
-
Install dependencies using Maven:
mvn clean install
-
Set up environment variables:
- Create a
.envfile in the root of the project. - Add the following keys:
DISCORD_TOKEN=your_discord_token DISCORD_STATUS=your_bot_status TWITCH_CLIENT_ID=your_twitch_client_id TWITCH_CLIENT_SECRET=your_twitch_client_secret
- Create a
-
Run the bot:
mvn exec:java -Dexec.mainClass="main.DiscordTwitchBot" -
The bot will:
- Appear online in Discord with the configured status.
- Start responding to messages as defined in
NachrichtenReaktion. - Interact with Twitch using the
MyTwitchclass (ensure proper implementation).
main/DiscordTwitchBot: Main entry point for the application.NachrichtenReaktion: Handles Discord message reactions.Categories: Manages dynamic bot behavior and parameters.MyTwitch: Interacts with Twitch API (implementation required).
- Fork the repository.
- Create your feature branch (
git checkout -b feature/your-feature). - Commit your changes (
git commit -m 'Add your feature'). - Push to the branch (
git push origin feature/your-feature). - Open a Pull Request.
- JDA for the powerful Discord API.
- dotenv for environment variable management.
- Twitch API for stream data and interaction.