A Telegram bot for osu! players — built with .NET 8 and designed to make interacting with osu! data fun and seamless.
SosuBot is a Telegram bot that connects to the osu! API v2, providing player statistics, recent plays, and other osu!-related data directly through Telegram chats. It also uses OpenAI API for smart features such as message analysis, playful responses, or extended contextual queries.
Before running the bot, make sure you have the following installed:
- .NET SDK 8.0 or higher Download .NET SDK 8.0
git clone https://github.com/Shoukox/SosuBot.git
cd SosuBotCreate a file named openai-settings.json in the project root and insert your OpenAI token:
{
"OpenAiConfiguration": {
"Token": "<your_token_here>",
"DeveloperPrompt": "<prompt>",
"Model": "gpt-4o-mini"
}
}Create a file named appsettings.json in the root directory and fill it with the following content:
{
"Logging": {
"LogLevel": {
"Default": "Debug",
"Microsoft": "Error",
"System.Net.Http.HttpClient": "Error"
},
"Console": {
"FormatterName": "CustomConsoleFormatter",
"FormatterOptions": {
"IncludeScopes": true,
"TimestampFormat": "HH:mm:ss.fff",
"UseUtcTimestamp": true,
"SingleLine": true
}
}
},
"BotConfiguration": {
"Token": "<bot-token>",
"Username": "<bot-username>"
},
"OsuApiV2Configuration": {
"ClientId": <your-client-id>,
"ClientSecret": "<your-client-secret>"
},
"ConnectionStrings": {
"DefaultConnection": "Data Source=bot.db"
}
}
⚠️ Replace placeholders (<bot-token>,<your-client-id>, etc.) with your actual values.
dotnet run --project SosuBotdotnet build -c Release
dotnet path/to/release/SosuBot.dllWhen launched, SosuBot will:
- Connect to Telegram using the bot token
- Initialize the osu! API client
- Use the OpenAI API for any AI-based features
- Start responding to Telegram commands and messages
Use the /help command to get a summary about bots functionality.
- osu! player stats lookup
- Recent plays and performance tracking
- Some special features for 🇺🇿 players
- Integration with OpenAI for contextual replies
- Custom logging system (console + file)
- SQLite database for local data storage
Logs are written to console and to daily files in the logs/ folder (e.g., logs/2025-10-19.log).
The logging configuration can be customized through appsettings.json.
- C# / .NET 8
- Telegram.Bot
- osu! API v2
- OpenAI API
- SQLite
- Polly (for HTTP resiliency)
- Microsoft.Extensions.Logging
- ...
Contributions, pull requests, and suggestions are welcome! Please open an issue if you encounter bugs or have feature ideas.
This project is licensed under the MIT License — see the LICENSE file for details.