A Discord bot that tracks and announces Trackmania player records for campaign maps. The bot monitors player times on official campaign maps and announces improvements in Discord channels. It's in very early stage still, but feel free to contribute!
- Track player records on official Trackmania campaign maps
- Track weekly shorts personal bests
- Automatic Discord announcements for new records and improvements
- Automatic announcements for weekly shorts personal bests
- Multi-language support (English and Spanish for now)
- Leaderboard commands with country filtering
- Node.js v14 or higher
- Discord bot token
- Trackmania/Ubisoft account credentials
- Trackmania OAuth credentials for display names
- Clone the repository:
git clone https://github.com/daih27/trackmania-campaign-records-bot.git
cd trackmania-campaign-records-bot- Install dependencies:
npm install- Create a
.envfile in the project root:
# Discord Configuration
DISCORD_TOKEN=your_discord_bot_token
DISCORD_CLIENT_ID=your_discord_client_id
# Ubisoft/Trackmania Authentication
UBI_EMAIL=your_ubisoft_email
UBI_PASSWORD=your_ubisoft_password
# OAuth for display names
TM_OAUTH_CLIENT_ID=your_oauth_client_id
TM_OAUTH_CLIENT_SECRET=your_oauth_client_secret
# Database path
DB_PATH=./data/trackmania.db
# User agent for API requests
USER_AGENT=App name / @user / [email protected]- Start the bot:
npm start- Set up authorized users for global settings (Optional):
node setup-authorized-user.js [YOUR_DISCORD_USER_ID]/register <account_id>- Link your Discord account to your Trackmania account/unregister- Unlink your account/records- View your recent records/leaderboard [map] [country]- View campaign or map leaderboards/weeklyshortsleaderboard [map] [country]- View weekly shorts leaderboard (overall or specific map)/help- Show all available commands
/setcountry <country>- Set default country for leaderboards/language <lang>- Change bot language/setchannel <channel>- Set announcement channel for records/setweeklyshortschannel <channel>- Set announcement channel for weekly shorts/setminposition <position>- Set minimum world position to announce records/togglecampaignannouncements <enabled>- Enable/disable campaign announcements/toggleweeklyshortsannouncements <enabled>- Enable/disable weekly shorts announcements
/setcampaignsearchtime <minutes>- Set campaign search interval (5-60 minutes)/setweeklyshortssearchtime <minutes>- Set weekly shorts search interval (5-60 minutes)/authorizeuser <user>- Authorize a user to modify global settings/unauthorizeuser <user>- Remove user authorization for global settings
- Trackmania API documentation
- The Chilean Trackmania community