diff options
| author | 2018-11-27 21:01:18 +0100 | |
|---|---|---|
| committer | 2018-11-27 21:01:18 +0100 | |
| commit | 70d2170a0a6594561d59c7d080c4280f1ebcd70b (patch) | |
| tree | 3eb52bc45b91f3de1cc51a0cb2e710685009dd4d /bot/resources | |
| parent | Merge pull request #69 from python-discord/issue/68-with-typing (diff) | |
Allows you to create Seasons. (#64)
* Allows you to create Season objects which change the bots behavior. For example, a season can determine things like the avatar, the nickname, and which cogs are loaded. Season automatically changes according to the date range you specify when you create it.
* removing some hungarian notation.
* Automatic season changes will now always happen at a minute past midnight, no matter when the bot started.
* catching dunders in the glob.
* Refine Season Creation behaviour and structure.
* Added channel and role constants, refactored roles into NamedTuples, added role check decorators from the main bot, and added role checks for the season change feature. Yes this is duplicate code from our main bot, but it will just have to be like that for now until we get a bot core running.
* replacing the or with an xor and switching out the assert for a UserWarning
* New lockfile
* changing discord.py to discord-py to prevent pip bug from putting two of them in our lockfile
* fixing flake errors
* flake8
* Cleaned everything up, but I seem to have introduced some sort of infinite load loop? o.O
* Fixing up all bugs in the halloween cogs. This should be ready for merge now.
* Add avatar_path baseclass method for consistency.
While making it simpler to add avatar urls in new season extensions, it also allows the avatar resource path to be changed in a single place if needed in future.
* Avoid shadowing builtin `object`.
* Add debug mode, refine bot user editing on season load.
The changing of a bot's username and avatar is heavily ratelimited. While testing, restarting the bot and changing seasons is required, and hitting these limits are typical. Instead, when in debug mode, the avatar isn't set and only the nickname is changed to prevent unnecessary account edit requests.
In the case that the rate limit is hit when not in debug mode, there's an added fallback to use the nickname instead.
* Add cancel load_seasons task on SeasonManager un/reload.
Previously the load_seasons task was loaded and looping forever. Even if the cog was unloaded for some reason, it would still be running. On loading the SeasonManager again, it would create a new load_seasons task, while the old one still existed.
Adding the cancellation allows the task to end when the cog is unloaded or reloaded, and will help assist with live code changes during development at a later time where it's possible to reload this extension (perhaps when the pending bot core is implemented).
* get_season_class helper, season class attribs, fix admin id
Changes `get_season`'s date check to not initialise unwanted classes (to avoid needless loading of tasks which would otherwise cause unexpected behaviour). To do this, defining attributes of season classes have been moved from `__init__` as an instance variable, to the class variable level. This also results in `__init__` not needing to be defined for the `SeasonBase` class, and `super().__init__()` not needing to be called in individual season classes, making things cleaner/simpler for them.
Adds a helper function for retrieving a season class and combines two unnecessarily separate if statements. Credits to @MarkKoz for the suggestions.
Reverts the admin ID mistakenly changed in a previous commit.
* Update bot/seasons/halloween/hacktoberstats.py
Co-Authored-By: heavysaturn <[email protected]>
* Update bot/seasons/halloween/halloween_facts.py
Co-Authored-By: heavysaturn <[email protected]>
* No more property in halloweenfacts
* Changed all aliases to tuples
* Made tokens a seperate namedtuple
* Update bot/seasons/halloween/spookyavatar.py
Co-Authored-By: heavysaturn <[email protected]>
Diffstat (limited to 'bot/resources')
| -rw-r--r-- | bot/resources/avatars/christmas.png | bin | 0 -> 44843 bytes | |||
| -rw-r--r-- | bot/resources/avatars/spooky.png | bin | 0 -> 37202 bytes | |||
| -rw-r--r-- | bot/resources/avatars/standard.png | bin | 0 -> 52156 bytes | |||
| -rw-r--r-- | bot/resources/halloween/github_links.json | 0 | ||||
| -rw-r--r-- | bot/resources/halloween/monstersurvey.json | 5 | ||||
| -rw-r--r-- | bot/resources/halloween/spookysounds/109710__tomlija__horror-gate.mp3 (renamed from bot/resources/spookysounds/109710__tomlija__horror-gate.mp3) | bin | 118125 -> 118125 bytes | |||
| -rw-r--r-- | bot/resources/halloween/spookysounds/126113__klankbeeld__laugh.mp3 (renamed from bot/resources/spookysounds/126113__klankbeeld__laugh.mp3) | bin | 112365 -> 112365 bytes | |||
| -rw-r--r-- | bot/resources/halloween/spookysounds/133674__klankbeeld__horror-laugh-original-132802-nanakisan-evil-laugh-08.mp3 (renamed from bot/resources/spookysounds/133674__klankbeeld__horror-laugh-original-132802-nanakisan-evil-laugh-08.mp3) | bin | 137385 -> 137385 bytes | |||
| -rw-r--r-- | bot/resources/halloween/spookysounds/14570__oscillator__ghost-fx.mp3 (renamed from bot/resources/spookysounds/14570__oscillator__ghost-fx.mp3) | bin | 135405 -> 135405 bytes | |||
| -rw-r--r-- | bot/resources/halloween/spookysounds/168650__0xmusex0__doorcreak.mp3 (renamed from bot/resources/spookysounds/168650__0xmusex0__doorcreak.mp3) | bin | 162421 -> 162421 bytes | |||
| -rw-r--r-- | bot/resources/halloween/spookysounds/171078__klankbeeld__horror-scream-woman-long.mp3 (renamed from bot/resources/spookysounds/171078__klankbeeld__horror-scream-woman-long.mp3) | bin | 131625 -> 131625 bytes | |||
| -rw-r--r-- | bot/resources/halloween/spookysounds/193812__geoneo0__four-voices-whispering-6.mp3 (renamed from bot/resources/spookysounds/193812__geoneo0__four-voices-whispering-6.mp3) | bin | 163257 -> 163257 bytes | |||
| -rw-r--r-- | bot/resources/halloween/spookysounds/237282__devilfish101__frantic-violin-screech.mp3 (renamed from bot/resources/spookysounds/237282__devilfish101__frantic-violin-screech.mp3) | bin | 131566 -> 131566 bytes | |||
| -rw-r--r-- | bot/resources/halloween/spookysounds/249686__cylon8472__cthulhu-growl.mp3 (renamed from bot/resources/spookysounds/249686__cylon8472__cthulhu-growl.mp3) | bin | 153226 -> 153226 bytes | |||
| -rw-r--r-- | bot/resources/halloween/spookysounds/35716__analogchill__scream.mp3 (renamed from bot/resources/spookysounds/35716__analogchill__scream.mp3) | bin | 114773 -> 114773 bytes | |||
| -rw-r--r-- | bot/resources/halloween/spookysounds/413315__inspectorj__something-evil-approaches-a.mp3 (renamed from bot/resources/spookysounds/413315__inspectorj__something-evil-approaches-a.mp3) | bin | 298717 -> 298717 bytes | |||
| -rw-r--r-- | bot/resources/halloween/spookysounds/60571__gabemiller74__breathofdeath.mp3 (renamed from bot/resources/spookysounds/60571__gabemiller74__breathofdeath.mp3) | bin | 177049 -> 177049 bytes | |||
| -rw-r--r-- | bot/resources/halloween/spookysounds/Female_Monster_Growls_.mp3 (renamed from bot/resources/spookysounds/Female_Monster_Growls_.mp3) | bin | 148276 -> 148276 bytes | |||
| -rw-r--r-- | bot/resources/halloween/spookysounds/Male_Zombie_Roar_.mp3 (renamed from bot/resources/spookysounds/Male_Zombie_Roar_.mp3) | bin | 62171 -> 62171 bytes | |||
| -rw-r--r-- | bot/resources/halloween/spookysounds/Monster_Alien_Growl_Calm_.mp3 (renamed from bot/resources/spookysounds/Monster_Alien_Growl_Calm_.mp3) | bin | 133651 -> 133651 bytes | |||
| -rw-r--r-- | bot/resources/halloween/spookysounds/Monster_Alien_Grunt_Hiss_.mp3 (renamed from bot/resources/spookysounds/Monster_Alien_Grunt_Hiss_.mp3) | bin | 74718 -> 74718 bytes | |||
| -rw-r--r-- | bot/resources/halloween/spookysounds/sources.txt (renamed from bot/resources/spookysounds/sources.txt) | 0 |
22 files changed, 1 insertions, 4 deletions
diff --git a/bot/resources/avatars/christmas.png b/bot/resources/avatars/christmas.png Binary files differnew file mode 100644 index 00000000..55b72fac --- /dev/null +++ b/bot/resources/avatars/christmas.png diff --git a/bot/resources/avatars/spooky.png b/bot/resources/avatars/spooky.png Binary files differnew file mode 100644 index 00000000..4ab33188 --- /dev/null +++ b/bot/resources/avatars/spooky.png diff --git a/bot/resources/avatars/standard.png b/bot/resources/avatars/standard.png Binary files differnew file mode 100644 index 00000000..c14ff42a --- /dev/null +++ b/bot/resources/avatars/standard.png diff --git a/bot/resources/halloween/github_links.json b/bot/resources/halloween/github_links.json new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/bot/resources/halloween/github_links.json diff --git a/bot/resources/halloween/monstersurvey.json b/bot/resources/halloween/monstersurvey.json index b430b6c0..d8cc72e7 100644 --- a/bot/resources/halloween/monstersurvey.json +++ b/bot/resources/halloween/monstersurvey.json @@ -10,7 +10,6 @@ "summary": "Count Dracula is an undead, centuries-old vampire, and a Transylvanian nobleman who claims to be a Sz\u00c3\u00a9kely descended from Attila the Hun. He inhabits a decaying castle in the Carpathian Mountains near the Borgo Pass. Unlike the vampires of Eastern European folklore, which are portrayed as repulsive, corpse-like creatures, Dracula wears a veneer of aristocratic charm. In his conversations with Jonathan Harker, he reveals himself as deeply proud of his boyar heritage and nostalgic for the past, which he admits have become only a memory of heroism, honour and valour in modern times.", "image": "https://upload.wikimedia.org/wikipedia/commons/thumb/9/90/Bela_Lugosi_as_Dracula%2C_anonymous_photograph_from_1931%2C_Universal_Studios.jpg/250px-Bela_Lugosi_as_Dracula%2C_anonymous_photograph_from_1931%2C_Universal_Studios.jpg", "votes": [ - 224734305581137921 ] }, "goofy": { @@ -24,8 +23,6 @@ "summary": "Who let this guy write this? That's who the real monster is.", "image": "https://avatars0.githubusercontent.com/u/24819750?s=460&v=4", "votes": [ - 95872159741644800, - 129606635545952258 ] } -}
\ No newline at end of file +} diff --git a/bot/resources/spookysounds/109710__tomlija__horror-gate.mp3 b/bot/resources/halloween/spookysounds/109710__tomlija__horror-gate.mp3 Binary files differindex 495f2bd1..495f2bd1 100644 --- a/bot/resources/spookysounds/109710__tomlija__horror-gate.mp3 +++ b/bot/resources/halloween/spookysounds/109710__tomlija__horror-gate.mp3 diff --git a/bot/resources/spookysounds/126113__klankbeeld__laugh.mp3 b/bot/resources/halloween/spookysounds/126113__klankbeeld__laugh.mp3 Binary files differindex 538feabc..538feabc 100644 --- a/bot/resources/spookysounds/126113__klankbeeld__laugh.mp3 +++ b/bot/resources/halloween/spookysounds/126113__klankbeeld__laugh.mp3 diff --git a/bot/resources/spookysounds/133674__klankbeeld__horror-laugh-original-132802-nanakisan-evil-laugh-08.mp3 b/bot/resources/halloween/spookysounds/133674__klankbeeld__horror-laugh-original-132802-nanakisan-evil-laugh-08.mp3 Binary files differindex 17f66698..17f66698 100644 --- a/bot/resources/spookysounds/133674__klankbeeld__horror-laugh-original-132802-nanakisan-evil-laugh-08.mp3 +++ b/bot/resources/halloween/spookysounds/133674__klankbeeld__horror-laugh-original-132802-nanakisan-evil-laugh-08.mp3 diff --git a/bot/resources/spookysounds/14570__oscillator__ghost-fx.mp3 b/bot/resources/halloween/spookysounds/14570__oscillator__ghost-fx.mp3 Binary files differindex 5670657c..5670657c 100644 --- a/bot/resources/spookysounds/14570__oscillator__ghost-fx.mp3 +++ b/bot/resources/halloween/spookysounds/14570__oscillator__ghost-fx.mp3 diff --git a/bot/resources/spookysounds/168650__0xmusex0__doorcreak.mp3 b/bot/resources/halloween/spookysounds/168650__0xmusex0__doorcreak.mp3 Binary files differindex 42f9e9fd..42f9e9fd 100644 --- a/bot/resources/spookysounds/168650__0xmusex0__doorcreak.mp3 +++ b/bot/resources/halloween/spookysounds/168650__0xmusex0__doorcreak.mp3 diff --git a/bot/resources/spookysounds/171078__klankbeeld__horror-scream-woman-long.mp3 b/bot/resources/halloween/spookysounds/171078__klankbeeld__horror-scream-woman-long.mp3 Binary files differindex 1cdb0f4d..1cdb0f4d 100644 --- a/bot/resources/spookysounds/171078__klankbeeld__horror-scream-woman-long.mp3 +++ b/bot/resources/halloween/spookysounds/171078__klankbeeld__horror-scream-woman-long.mp3 diff --git a/bot/resources/spookysounds/193812__geoneo0__four-voices-whispering-6.mp3 b/bot/resources/halloween/spookysounds/193812__geoneo0__four-voices-whispering-6.mp3 Binary files differindex 89150d57..89150d57 100644 --- a/bot/resources/spookysounds/193812__geoneo0__four-voices-whispering-6.mp3 +++ b/bot/resources/halloween/spookysounds/193812__geoneo0__four-voices-whispering-6.mp3 diff --git a/bot/resources/spookysounds/237282__devilfish101__frantic-violin-screech.mp3 b/bot/resources/halloween/spookysounds/237282__devilfish101__frantic-violin-screech.mp3 Binary files differindex b5f85f8d..b5f85f8d 100644 --- a/bot/resources/spookysounds/237282__devilfish101__frantic-violin-screech.mp3 +++ b/bot/resources/halloween/spookysounds/237282__devilfish101__frantic-violin-screech.mp3 diff --git a/bot/resources/spookysounds/249686__cylon8472__cthulhu-growl.mp3 b/bot/resources/halloween/spookysounds/249686__cylon8472__cthulhu-growl.mp3 Binary files differindex d141f68e..d141f68e 100644 --- a/bot/resources/spookysounds/249686__cylon8472__cthulhu-growl.mp3 +++ b/bot/resources/halloween/spookysounds/249686__cylon8472__cthulhu-growl.mp3 diff --git a/bot/resources/spookysounds/35716__analogchill__scream.mp3 b/bot/resources/halloween/spookysounds/35716__analogchill__scream.mp3 Binary files differindex a0614b53..a0614b53 100644 --- a/bot/resources/spookysounds/35716__analogchill__scream.mp3 +++ b/bot/resources/halloween/spookysounds/35716__analogchill__scream.mp3 diff --git a/bot/resources/spookysounds/413315__inspectorj__something-evil-approaches-a.mp3 b/bot/resources/halloween/spookysounds/413315__inspectorj__something-evil-approaches-a.mp3 Binary files differindex 38374316..38374316 100644 --- a/bot/resources/spookysounds/413315__inspectorj__something-evil-approaches-a.mp3 +++ b/bot/resources/halloween/spookysounds/413315__inspectorj__something-evil-approaches-a.mp3 diff --git a/bot/resources/spookysounds/60571__gabemiller74__breathofdeath.mp3 b/bot/resources/halloween/spookysounds/60571__gabemiller74__breathofdeath.mp3 Binary files differindex f769d9d8..f769d9d8 100644 --- a/bot/resources/spookysounds/60571__gabemiller74__breathofdeath.mp3 +++ b/bot/resources/halloween/spookysounds/60571__gabemiller74__breathofdeath.mp3 diff --git a/bot/resources/spookysounds/Female_Monster_Growls_.mp3 b/bot/resources/halloween/spookysounds/Female_Monster_Growls_.mp3 Binary files differindex 8b04f0f5..8b04f0f5 100644 --- a/bot/resources/spookysounds/Female_Monster_Growls_.mp3 +++ b/bot/resources/halloween/spookysounds/Female_Monster_Growls_.mp3 diff --git a/bot/resources/spookysounds/Male_Zombie_Roar_.mp3 b/bot/resources/halloween/spookysounds/Male_Zombie_Roar_.mp3 Binary files differindex 964d685e..964d685e 100644 --- a/bot/resources/spookysounds/Male_Zombie_Roar_.mp3 +++ b/bot/resources/halloween/spookysounds/Male_Zombie_Roar_.mp3 diff --git a/bot/resources/spookysounds/Monster_Alien_Growl_Calm_.mp3 b/bot/resources/halloween/spookysounds/Monster_Alien_Growl_Calm_.mp3 Binary files differindex 9e643773..9e643773 100644 --- a/bot/resources/spookysounds/Monster_Alien_Growl_Calm_.mp3 +++ b/bot/resources/halloween/spookysounds/Monster_Alien_Growl_Calm_.mp3 diff --git a/bot/resources/spookysounds/Monster_Alien_Grunt_Hiss_.mp3 b/bot/resources/halloween/spookysounds/Monster_Alien_Grunt_Hiss_.mp3 Binary files differindex ad99cf76..ad99cf76 100644 --- a/bot/resources/spookysounds/Monster_Alien_Grunt_Hiss_.mp3 +++ b/bot/resources/halloween/spookysounds/Monster_Alien_Grunt_Hiss_.mp3 diff --git a/bot/resources/spookysounds/sources.txt b/bot/resources/halloween/spookysounds/sources.txt index 7df03c2e..7df03c2e 100644 --- a/bot/resources/spookysounds/sources.txt +++ b/bot/resources/halloween/spookysounds/sources.txt |