Added timezones command (times need to be fixed)
Added timezones hybrid command command which can be invoked using $timezones or /timezones.
This is NOT ready to merge yet. The times that the embed provides are inaccurate.
Summary by Sourcery
Add a new timezones command to display a list of top 20 timezones using data from newly added JSON files for countries and timezones. The command is implemented as a hybrid command, allowing invocation through both text and slash commands.
New Features:
- Introduce a new hybrid command
timezonesthat can be invoked using$timezonesor/timezonesto present a list of the top 20 timezones.
Enhancements:
- Add a JSON file containing country data with details such as name, emoji, region, capital, and timezones.
- Add a JSON file containing timezone data with details such as offset, timezone, full timezone, and associated Discord emoji.
Reviewer's Guide by Sourcery
This pull request adds a new 'timezones' hybrid command to the bot. The command displays a list of the top 20 timezones in the world, including their offsets, abbreviations, and current times. The implementation involves adding new JSON data files for countries and timezones, and creating a new Timezones cog with the necessary functionality.
File-Level Changes
| Files | Changes |
|---|---|
tux/utils/data/countries.json |
Added a new JSON file containing detailed information about countries, including their timezones |
tux/utils/data/timezones.json |
Added a new JSON file with data for the top 20 timezones, including offsets, abbreviations, and Discord emoji flags |
tux/cogs/utility/timezones.py |
Implemented a new Timezones cog with methods to load JSON data, build formatted timezone strings, and handle the 'timezones' command |
tux/cogs/utility/timezones.py |
Created a hybrid command 'timezones' that displays an embed with formatted timezone information |
Tips
- Trigger a new Sourcery review by commenting
@sourcery-ai reviewon the pull request. - Continue your discussion with Sourcery by replying directly to review comments.
- You can change your review settings at any time by accessing your dashboard:
- Enable or disable the Sourcery-generated pull request summary or reviewer's guide;
- Change the review language;
- You can always contact us if you have any questions or feedback.