A Kotlin-based Discord bot that integrates with RuneScape APIs to provide real-time game information, including player highscores, item prices, and wiki searches. This bot also allows users to link their RuneScape profiles to their Discord accounts.
- Highscore Command: Fetch RuneScape highscores for any player.
- Grand Exchange Command: Search for items in the Grand Exchange.
- Flip Command: Find the best items to flip in the Grand Exchange.
- Wiki Command: Search the RuneScape Wiki.
- Profile Linking: Link your RuneScape profile to your Discord account.
- Kotlin: Ensure you have Kotlin installed on your development machine.
- Discord Bot Token: Create a bot on the Discord Developer Portal and obtain a token.
- Gradle: This project uses Gradle for dependency management.
-
Clone the Repository
git clone https://github.com/Jrod7938/RSDB.git cd RSDB
-
Configure the Bot You have three options to provide the Discord bot token:
- Passing as an Argument: Run the bot by passing the token as an argument to the main file.
- Saving as a File: Save the token as
token.txt
within thesrc/main/kotlin
folder. - Environment Variable: Save the token as an environment variable named
DISCORD_BOT_TOKEN
.
-
Build the Project
./gradlew build
-
Run the Bot
./gradlew run
Command | Description |
---|---|
/highscore |
Fetch the RuneScape highscore for a player. |
/ge |
Search for an item in the Grand Exchange. |
/flip |
Find the best items to flip in the Grand Exchange. |
/wiki |
Search the RuneScape Wiki for an object or topic. |
/me |
Link your RuneScape profile to your Discord account. |
To use the bot, simply invite it to your Discord server and use the commands listed above. For example:
/highscore player:Zezima
/ge item:Dragon claws
/me username:Zezima
The bot uses a centralized logger to track all command executions and user interactions.
We welcome contributions to improve this bot! Here's how you can help:
- Fork the Repository
- Create a New Branch (
git checkout -b feature/your-feature-name
) - Commit Your Changes (
git commit -m 'Add some feature'
) - Push to the Branch (
git push origin feature/your-feature-name
) - Open a Pull Request
Please ensure your code adheres to the existing coding standards and includes relevant documentation.
This project is licensed under the MIT License - see the LICENSE file for details.
- Kord Library: Used for Discord API interactions.
- RuneScape Wiki API: Provided the game data integrations.
- JetBrains: For the Kotlin language and development tools.
For any issues or feature requests, please open an issue on GitHub.