A Discord bot for the Paralya Discord server, built with Kotlin and KordEx.
ParalyaBot is a modular Discord bot designed to facilitate community management and games for the Paralya community. The current implementation includes a Werewolf (Loup-Garou) game module directly integrated in the core bot. Once the plugin system is totally implemented, this game module, along with any potential other, will be moved to a dedicated plugin.
This bot is designed and supported only for use on the Paralya Discord server (ID: 883659215590277181).
To get support, you can:
- Open an issue on the GitHub repository (preferred method)
- DM me on Discord (
e_psi_lon) - Send me a message through the Paralya Discord server (only if none of the above methods work)
You are free to self-host under the terms of the AGPL-3.0 license, but functionality and support may not be guaranteed outside that context.
paralya-bot/
├── build.gradle.kts # Root build configuration
├── settings.gradle.kts # Project settings
├── src/ # Root module sources
│ └── main/
│ ├── kotlin/ # Main application code
│ └── resources/ # Root resources
├── common/ # Common utilities module
│ ├── src/
│ │ ├── main/kotlin/ # Shared code
│ │ └── resources/ # Common resources
│ └── build.gradle.kts # Common module build config
├── lg/ # Werewolf (Loup-Garou) game module
│ ├── src/
│ │ └── main/kotlin/ # Game implementation
│ └── build.gradle.kts # LG module build config
└── games/ # Folder for installed game plugins
- Modular architecture for easy extension
- Werewolf game with full role support and game cycle management
- Command-based interface for easy interaction
- Internationalization support
- Configuration through HOCON files
- JDK 21 or newer
- Gradle (wrapper included)
- Discord Bot Token
- Discord server with appropriate permissions
- If you are an admin of the Paralya Discord server, you can directly ask me on Discord to get a pre-built JAR file.
- If you want to self-host for your own server, please follow the Developers instruction below to set up the bot. You'll need to edit some values and to have some basic knowledge of Kotlin and Gradle as well as a Discord bot
- Clone the repository:
git clone https://github.com/paralya/paralyabot.git cd paralyabot - Create a
config.conffile in the project root (see the Configuration section) - Build and run as described in the Building section
Create a config.conf file with the following structure:
bot {
token = "YOUR_DISCORD_BOT_TOKEN"
admins = [YOUR_DISCORD_USER_ID, ANOTHER_ADMIN_USER_ID]
dmLogChannelId = DM_LOG_CHANNEL_ID
paralyaId = PARALYA_SERVER_ID
}
games {
// LG is an example, other games can be added similarly
lg {
rolesCategory = ROLES_CATEGORY_ID
mainCategory = MAIN_CATEGORY_ID
aliveRole = ALIVE_ROLE_ID
deadRole = DEAD_ROLE_ID
}
}- Go to the Discord Developer Portal
- Create a new application
- Navigate to the "Bot" section and create a bot
- Enable the necessary "Privileged Gateway Intents" (Message Content, Server Members, Presence)
- Copy the bot token to your
config.conffile - Use the OAuth2 URL Generator to invite the bot to your server with appropriate permissions
Build the entire project using Gradle:
./gradlew buildBuild the deployable JAR:
./gradlew shadowJarExport a plugin as a ready-to-use ZIP file for your games directory:
./gradlew :plugin-name:distZipRun the bot using:
java -jar build/libs/paralya-bot-$version.jarFor development, you can also run directly from Gradle:
./gradlew runA complete implementation of the Werewolf game for Discord. Features include:
- Day/night cycle management
- Role-based gameplay
- Voting system
- Special abilities for different roles
- Webhook-based anonymous messaging
See the LG module README for more details on the Werewolf game implementation.
The complete instructions for adding a new game module is available in the common module README. You'll find a step-by-step guide on how to create a new game configuration and implement the game logic.
- Configuration errors: Verify your
config.conffile has the correct format and valid IDs
Contributions are welcome! Please follow these steps:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the GNU Affero General Public License v3.0 (AGPL-3.0) — see the LICENSE file for details.