aboutsummaryrefslogtreecommitdiffstats
path: root/bot/cogs (follow)
Commit message (Collapse)AuthorAgeLines
* Allows you to create Seasons. (#64)Gravatar Leon Sandøy2018-11-27-1454/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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]>
* Resolve Flake8Gravatar sco12018-11-20-6/+9
|
* Add typing context manager where appropriateGravatar sco12018-11-20-132/+164
| | | Some minor syntax & logic fixes where noticed
* Fixing flake8 errors, and making the gif post inside an embed.Gravatar Leon Sandøy2018-11-20-3/+39
|
* Merge branch 'gif' of https://github.com/markylon/hacktoberbot into markylon-gifGravatar Leon Sandøy2018-11-20-0/+32
|\
| * Refactoring.Gravatar Marko Kovačević2018-10-10-3/+6
| |
| * Add random spooky gif feature.Gravatar Marko Kovačević2018-10-09-0/+29
| |
* | fixing merge requests and preventing a race conditionGravatar Leon Sandøy2018-11-20-2/+49
|\ \
| * | * Update channel ID.Gravatar meooow252018-10-17-6/+12
| | | | | | | | | | | | | | | * Add class docstring. * Make `disconnect` a helper static method.
| * | Add cog to play spooky soundsGravatar meooow252018-10-14-0/+39
| | | | | | | | | | | | | | | | | | * Add SpookySound cog * Add sound files * Add PyNaCl to Pipfile (required for Discord voice)
* | | flake8Gravatar Leon Sandøy2018-11-20-10/+10
| | |
* | | Cleaning up bats a bitGravatar Leon Sandøy2018-11-20-10/+2
| | |
* | | Solved merge conflictsGravatar Leon Sandøy2018-11-20-0/+52
|\ \ \
| * | | Add whitespace.Gravatar hundredrab2018-10-26-1/+1
| | | |
| * | | Merge branch 'master' of github.com:discord-python/hacktoberbotGravatar hundredrab2018-10-26-34/+205
| |\ \ \
| * | | | Various minor fixes.Gravatar hundredrab2018-10-26-2/+4
| | | | |
| * | | | Add more spookifications.Gravatar hundredrab2018-10-22-1/+1
| | | | |
| * | | | Fix formatting and add docstrings.Gravatar hundredrab2018-10-21-1/+2
| | | | |
| * | | | Fix issues related to spookyavatar cog.Gravatar hundredrab2018-10-21-7/+11
| | | | |
| * | | | Add cog for avatar inversion.Gravatar hundredrab2018-10-21-0/+45
| | |/ / | |/| |
* | | | Merge branch 'master' of github.com:python-discord/seasonalbotGravatar Leon Sandøy2018-11-20-2/+430
|\ \ \ \
| * \ \ \ Merge pull request #67 from python-discord/dfitzpatrick-vote-monster-refactorGravatar Leon Sandøy2018-11-20-2/+194
| |\ \ \ \ | | | | | | | | | | | | Dfitzpatrick vote monster refactor
| | * | | | It should work now.Gravatar Leon Sandøy2018-11-20-5/+5
| | | | | |
| | * | | | Minor changesGravatar Leon Sandøy2018-11-20-193/+1
| | | | | |
| | * | | | Merge branch 'vote-monster-refactor' of ↵Gravatar Leon Sandøy2018-11-20-2/+194
| | |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | https://github.com/dfitzpatrick/hacktoberbot into dfitzpatrick-vote-monster-refactor
| | | * | | | Resolved PR comments.Gravatar Derek Fitzpatrick2018-10-31-37/+51
| | | | | | |
| | | * | | | Fixed linting issue in hacktoberstatsGravatar Derek Fitzpatrick2018-10-31-2/+2
| | | | | | |
| | | * | | | Merge branch 'master' of https://github.com/discord-python/hacktoberbot into ↵Gravatar Derek Fitzpatrick2018-10-31-34/+280
| | | |\ \ \ \ | | | | | |/ / | | | | |/| | | | | | | | | vote-monster-refactor
| | | * | | | Resolved feedback from PR. Resolved lint extra spacing.Gravatar Derek Fitzpatrick2018-10-31-14/+31
| | | | | | |
| | | * | | | Merge branch 'master' of https://github.com/discord-python/hacktoberbot into ↵Gravatar Derek Fitzpatrick2018-10-12-29/+101
| | | |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | vote-monster-refactor
| | | * | | | | Fixed linting: Multiple imports on single line.Gravatar Derek Fitzpatrick2018-10-12-1/+3
| | | | | | | |
| | | * | | | | Finished MonsterSurvey cog. Added docstrings to all commands, refactored a ↵Gravatar unknown2018-10-12-20/+72
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | tiny bit of code within the two commands that you wrote.
| | | * | | | | Refactor monstersurvey. Added leaderboard and show.Gravatar Derek Fitzpatrick2018-10-12-87/+90
| | | | | | | |
| | | * | | | | Merge branch 'deploy' of https://github.com/dfitzpatrick/hacktoberbot into ↵Gravatar Derek Fitzpatrick2018-10-11-28/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 31-vote-for-favorite-monster # Conflicts: # Pipfile
| | | * | | | | Merge branch 'deploy' of https://github.com/dfitzpatrick/hacktoberbot into ↵Gravatar Derek Fitzpatrick2018-10-11-5/+9
| | | |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 31-vote-for-favorite-monster # Conflicts: # Pipfile
| | | | * | | | | Corrected linting errors.Gravatar Daniel Brown2018-10-10-5/+9
| | | | | | | | |
| | | * | | | | | Initial commit.Gravatar Derek Fitzpatrick2018-10-11-0/+74
| | | |/ / / / /
| | * | | | | | Adding the files this PR was supposed to haveGravatar Leon Sandøy2018-11-20-0/+192
| | | | | | | |
| | * | | | | | Reverting changes on the conflicting file.Gravatar Leon Sandøy2018-11-20-2/+2
| | | | | | | |
| * | | | | | | Merge pull request #33 from mathsman5133/candy-collectionGravatar Leon Sandøy2018-11-19-0/+236
| |\ \ \ \ \ \ \ | | |/ / / / / / | |/| | | | | | Candy collection
| | * | | | | | clean json fileGravatar mathsman51332018-10-14-19/+2
| | | | | | | |
| | * | | | | | fixed docstring and position of constantsGravatar mathsman51332018-10-14-24/+43
| | | | | | | |
| | * | | | | | Add that line back lolGravatar mathsman51332018-10-13-1/+1
| | | | | | | |
| | * | | | | | Remove new line at end of fileGravatar mathsman51332018-10-13-2/+1
| | | | | | | |
| | * | | | | | Add new line and remove save variable (not used)Gravatar mathsman51332018-10-13-1/+1
| | | | | | | |
| | * | | | | | Fixed merged conflictsGravatar mathsman51332018-10-12-4/+0
| | | | | | | |
| | * | | | | | Merge branch 'candy-collection' of ↵Gravatar mathsman51332018-10-12-2/+6
| | |\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | https://github.com/mathsman5133/hacktoberbot-1 into candy-collection
| | | * | | | | | fixed colour for spooky msgGravatar mathsman51332018-10-11-3/+3
| | | | | | | | |
| | | * | | | | | Update candy_collection.jsonGravatar mathsman51332018-10-10-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | add new line
| | | * | | | | | Update candy_collection.pyGravatar mathsman51332018-10-10-4/+3
| | | | | | | | |