A Discord bot that helps manage game scheduling across different timezones for your server members.
- Timezone Management: Set and store individual timezone preferences for each member
- Time Conversion: Convert any date/time to all registered members' local timezones
- Game Scheduling: Set and view upcoming game times across all timezones
- Persistent Storage: Saves timezone preferences and game schedules to a JSON file
Set your personal timezone preference.
Examples:
!timezone America/New_York!timezone Europe/London!timezone UTC
The bot supports fuzzy matching, so you can use partial timezone names like new_york or london.
Convert any date/time to all registered members' local timezones.
Examples:
!time tomorrow 3pm!time December 25 8:00 AM!time next Friday 7:30 PM
Set or view the next scheduled game time.
Examples:
!game- View the currently scheduled game!game Saturday 8pm- Set next game for Saturday at 8pm!game January 15 7:00 PM- Set game for a specific date
- Python 3.9 or higher
- Discord bot token
- Clone or download this repository
- Install required dependencies:
pip install -r requirements.txt- Create a
.envfile in the project directory:
DISCORD_TOKEN=your_discord_bot_token_here- Run the bot:
python bot.py- Go to the Discord Developer Portal
- Create a new application
- Go to the "Bot" section and create a bot
- Copy the bot token and add it to your
.envfile - Under "Privileged Gateway Intents", enable:
- Message Content Intent
- Server Members Intent
- Invite the bot to your server with appropriate permissions
The bot stores data in data.json with the following structure:
members_timezones: Dictionary mapping user IDs to their timezone preferencesnext_game: Timestamp of the next scheduled game (null if none set)
discord.py- Discord API wrapperpython-dotenv- Environment variable managementpython-dateparser- Natural language date parsingzoneinfo- Timezone handling (Python 3.9+ standard library)
- Members must set their timezone before using time-related commands
- The bot uses natural language parsing for dates, so you can use phrases like "tomorrow", "next Friday", etc.
- All times are displayed in each member's local timezone
- Game schedules persist between bot restarts