This Discord bot helps manage user timezones, schedules, and availability statuses within a server.
- Set and display user timezones
- Set and view user schedules
- Automatically update user statuses based on schedules and default availability
- Set default availability for weekdays and weekends
- Display all users' schedules and current times
!set_timezone <timezone>
: Set your timezone!set_status <status>
: Set your current status (green, yellow, red)!set_schedule <day> <start_time> <end_time> <status>
: Set your schedule for a specific day!view_schedule [user]
: View your schedule or another user's schedule!view_default [user]
: View your default availability or another user's!show_times
: Display current times for all users in your timezone
!set_user_timezone <user> <timezone>
: Set the timezone for another user!set_user_status <user> <status>
: Set the status for another user!set_user_schedule <user> <day> <start_time> <end_time> <status>
: Set a schedule for another user!clear_user_schedule <user>
: Clear another user's custom schedule and apply their default availability schedule (if set)!set_user_default <user> <weekday_start> <weekday_end> <weekend_start> <weekend_end>
: Set default availability for a user
-
Set your timezone:
!set_timezone America/New_York
-
Set your status:
!set_status green
-
Set your schedule for Monday:
!set_schedule Monday 09:00 17:00 green
-
View everyone's schedule:
!view_schedule
-
Set default availability (admin only): Note: You enter it in your own timezone and it'll be converted when you view it.
!set_user_default @username 09:00 17:00 10:00 15:00
-
Clear a user's schedule (admin only):
!clear_user_schedule @username
-
Show current times for all users:
!show_times
-
Set a user's timezone (admin only):
!set_user_timezone @username America/New_York
-
Set a user's status (admin only):
!set_user_status @username green
- Install required libraries:
discord.py
,pytz
,apscheduler
,tabulate
- Set up a Discord bot and get the token
- Create a
config.py
file with your bot token:DISCORD_TOKEN = 'your_token_here'
- Run the script
Keep the bot running to ensure automatic status updates. The bot updates statuses every 20 seconds based on schedules and default availability.