aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeLines
...
* | | | | | | | | | Simplify the implementation of the custom strainerGravatar Numerlor2021-01-09-15/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The strainer now forces the text attribute to be None, simplifying the check on strings and falls back to the superclass' method on non string elements
* | | | | | | | | | Strip whitespace from symbol Markdown before returning itGravatar Numerlor2021-01-09-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The html we parse frequently ends up with trailing and sometimes leading newlines which get stripped out by discord anyway, we have no reason to keep those around when sending the Markdown over to redis
* | | | | | | | | | Use cancel_all instead of manually calling cancel repeatedlyGravatar Numerlor2021-01-09-2/+1
| | | | | | | | | |
* | | | | | | | | | Use send_denial util instead of creating embed manuallyGravatar Numerlor2021-01-09-7/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The symbol is also no longer sent back to the user, as it is not necessary and we can skip the cleanup on it
* | | | | | | | | | Return the sent messageGravatar Numerlor2021-01-09-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows the caller to work with the message further
* | | | | | | | | | Move copyright outside of license textGravatar Numerlor2021-01-09-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Co-authored-by: MarkKoz <[email protected]>
* | | | | | | | | | Use string addition instead of joinGravatar Numerlor2021-01-09-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With only two strings, the addition is a bit clearer than constructing and joining a tuple Co-authored-by: MarkKoz <[email protected]>
* | | | | | | | | | Change param styling to be consistent with the repoGravatar Numerlor2021-01-09-5/+6
| | | | | | | | | |
* | | | | | | | | | Call command method directlyGravatar Numerlor2020-12-15-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Co-authored-by: MarkKoz <[email protected]>
* | | | | | | | | | Make reschedule delays a module constantGravatar Numerlor2020-12-15-3/+10
| | | | | | | | | |
* | | | | | | | | | Reuse form body to construct log messageGravatar Numerlor2020-12-15-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Co-authored-by: MarkKoz <[email protected]>
* | | | | | | | | | Clear up grammarGravatar Numerlor2020-12-15-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Co-authored-by: MarkKoz <[email protected]>
* | | | | | | | | | Simplify flowGravatar Numerlor2020-12-15-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The else is a bit clearer than the early return
* | | | | | | | | | Lock inventory refreshesGravatar Numerlor2020-12-15-3/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All commands that refresh the inventories in some way are now locked to prevent various race conditions that may have occurred in the unlikely scenario that they got triggered together, the fetching part of the get command now also has to wait for the running inventory refresh to finish before proceeding to fetch and parse the html
* | | | | | | | | | Create function for merging function and decorator wrapper globalsGravatar Numerlor2020-12-15-6/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | discord.py uses the globals of functions to resolve forward refs in commands, previously decorators applied before commands broke the bot with forwardrefs to names that weren't in the namespace of the module where they were defined, the new function takes care of merging the globals in a new function to mitigate this issue. closes: #1323
* | | | | | | | | | Provide feedback to user when no cache to clear was foundGravatar Numerlor2020-12-15-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While technically correct, always sending success could be misleading in case of a typo on the package
* | | | | | | | | | Move parse_queue cleanup into finally blockGravatar Numerlor2020-12-15-15/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The finally will make sure we reset the task and log it no matter what happens, additionally the clearing of the variable is now only done in one place as the finally also executes when the coro is cancelled
* | | | | | | | | | Ensure only one future is created for each doc_itemGravatar Numerlor2020-12-15-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously in case get_markdown for an item ran twice, the one that ran second would overwrite the future created by the first one, potentially causing the coro to wait for it infinitely as _parse_queue would only be able to set the last future
* | | | | | | | | | Remove internal CachedParser result cacheGravatar Numerlor2020-12-15-12/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We no longer need to keep the items around since everything is in redis and the costs of always going through redis is fairly small
* | | | | | | | | | Use global bot http_session instead of parameterGravatar Numerlor2020-12-15-14/+13
| | | | | | | | | |
* | | | | | | | | | Merge remote-tracking branch 'upstream/master' into doc-impGravatar Numerlor2020-12-11-1635/+2259
|\| | | | | | | | |
| * | | | | | | | | Make sure PR build artifact is always uploadedGravatar Sebastiaan Zeeff2020-12-11-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | GitHub Actions has an implicit status condition, `success()`, that is added whenever an `if` condition lacks a status function check of its own. In this case, while the upload step did check for the outcome of the previous "always" step, it did not have an actual status check and, thus, only ran on success. Since we always want to upload the artifact, even if other steps failed, I've added the "always" status function now.
| * | | | | | | | | Send a custom workflow status embed to DiscordGravatar Sebastiaan Zeeff2020-12-10-0/+100
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit introduces the same custom status embed as is already being used for Sir Lancebot. The default embeds GitHub sends are disabled, as they were causing slight issues with rate limits from time to time. It works like this: - The Lint & Test workflow stores an artifact with PR information, if we are linting/testing a PR. - Whenever we reach the end of a workflow run sequence, a status embed is send with the conclusion status. Signed-off-by: Sebastiaan Zeeff <[email protected]>
| * | | | | | | | | Merge pull request #1318 from python-discord/ks123/snowflake-commandGravatar Boris Muratov2020-12-10-0/+18
| |\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | Create command for showing Discord snowflake creation time
| | * \ \ \ \ \ \ \ \ Merge branch 'master' into ks123/snowflake-commandGravatar Boris Muratov2020-12-10-43/+78
| | |\ \ \ \ \ \ \ \ \ | | |/ / / / / / / / / | |/| | | | | | | | |
| * | | | | | | | | | Merge pull request #1322 from python-discord/swfarnsworth/developer_commandGravatar Boris Muratov2020-12-10-1/+17
| |\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | New `!verify` command to manually apply the Developer role
| | * \ \ \ \ \ \ \ \ \ Merge branch 'master' into swfarnsworth/developer_commandGravatar Steele Farnsworth2020-12-09-33/+52
| | |\ \ \ \ \ \ \ \ \ \ | | |/ / / / / / / / / / | |/| | | | | | | | | |
| * | | | | | | | | | | Merge pull request #1319 from python-discord/swfarnsworth/superstarGravatar Dennis Pham2020-12-09-20/+21
| |\ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | Relay the moderator's reason for `!superstarify` to the user
| | * \ \ \ \ \ \ \ \ \ \ Merge branch 'master' into swfarnsworth/superstarGravatar Steele Farnsworth2020-12-09-21/+39
| | |\ \ \ \ \ \ \ \ \ \ \ | | |/ / / / / / / / / / / | |/| | | | | | | | | | |
| * | | | | | | | | | | | Merge pull request #1306 from python-discord/Stelercus/close_commandGravatar Dennis Pham2020-12-08-13/+31
| |\ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | `!close` removes the cooldown role from the claimant
| | * \ \ \ \ \ \ \ \ \ \ \ Merge branch 'master' into Stelercus/close_commandGravatar Dennis Pham2020-12-08-11/+36
| | |\ \ \ \ \ \ \ \ \ \ \ \ | | |/ / / / / / / / / / / / | |/| | | | | | | | | | | |
| | * | | | | | | | | | | | Merge branch 'master' into Stelercus/close_commandGravatar Steele Farnsworth2020-12-01-29/+92
| | |\ \ \ \ \ \ \ \ \ \ \ \ | | | | |_|_|_|_|_|_|_|_|/ / | | | |/| | | | | | | | | |
| | * | | | | | | | | | | | Corrected `unclaim_channel` docstring to comply with style guideGravatar Steele2020-11-29-2/+4
| | | | | | | | | | | | | |
| | * | | | | | | | | | | | Merge branch 'master' of https://github.com/python-discord/bot into ↵Gravatar Steele2020-11-29-34/+29
| | |\ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Stelercus/close_command
| | * | | | | | | | | | | | | `!close` removes role from claimant only, new method `unclaim_channel`.Gravatar Steele2020-11-29-13/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously `!close` would remove the cooldown role from the person who issued the command, whereas now `unclaim_channel` handles removing the role from the claimant if it was their only channel open.
| | * | | | | | | | | | | | | Resolving merge conflicts with masterGravatar Steele2020-11-28-966/+1019
| | |\ \ \ \ \ \ \ \ \ \ \ \ \
| | * \ \ \ \ \ \ \ \ \ \ \ \ \ Merge branch 'master' of https://github.com/python-discord/bot into ↵Gravatar Steele2020-11-26-1/+1
| | |\ \ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Stelercus/close_command
| | * | | | | | | | | | | | | | | Changes requested by @MarkKoz, new `unclaim_channel` methodGravatar Steele2020-11-26-20/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Deleted expensive logging operation; moved cooldown role removal functionality to new `unclaim_channel` method; handle possibility that claimant has left the guild; optimized redis cache iteration with `any`
| | * | | | | | | | | | | | | | | Merge branch 'master' of https://github.com/python-discord/bot into ↵Gravatar Steele2020-11-25-109/+167
| | |\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Stelercus/close_command
| | * | | | | | | | | | | | | | | | Moved the removal of the cooldown role from `close_command` to `move_to_dormant`Gravatar Steele2020-11-25-7/+8
| | | | | | | | | | | | | | | | | |
| | * | | | | | | | | | | | | | | | `!close` removes role when they have no help channels left; needs to be ↵Gravatar Steele2020-11-25-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fixed so role is removed when the channel times out
| | * | | | | | | | | | | | | | | | `!close` removes the cooldown role from the claimant even when invoked by ↵Gravatar Steele2020-11-20-10/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | someone else; flattened `close_command`
| | | | | | | | * | | | | | | | | | Use the original wording of the public embed, but change the title to ↵Gravatar Steele2020-12-07-11/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "Superstarified!" Per internal staff discussion, we'll keep the wording of the message.
| | | | | | | | * | | | | | | | | | User gets a more detailed message from the botGravatar Steele2020-12-06-12/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Whereas one of my previous commits makes the message the user gets and the infraction that gets recorded the same, the recorded infraction is now shorter, but the message the user gets is more similar to the embed posted in the public channel. We also softened the language of the user-facing message a bit.
| | | | | | | | * | | | | | | | | | Merge branch 'master' of https://github.com/python-discord/bot into ↵Gravatar Steele2020-12-05-1/+1
| | | | | | | | |\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | swfarnsworth/superstar
| | | | | | | | * | | | | | | | | | | Add `starify` and `unstarify` as command aliases.Gravatar Steele2020-12-05-2/+2
| | | | | | | | | | | | | | | | | | |
| | | | | | | | * | | | | | | | | | | Bot relays the infraction reason in the DM.Gravatar Steele2020-12-05-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, the infraction DM from the bot gave a formulaic message about the nickname policy. It now gives a slightly different message along with the reason given by the mod. This means that the message the user gets and the infraction reason that gets recorded are now the same.
| | | | | | | | | | * | | | | | | | | Delete verify.py, integrate `!verify` command into verification.py.Gravatar Steele2020-12-09-45/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There wasn't any reason the command needed its own cog, so the exact same functionality is now in the Verification cog.
| | | | | | | | | | * | | | | | | | | Create Verify cog for new `!verify` command.Gravatar Steele2020-12-09-1/+46
| | |_|_|_|_|_|_|_|/ / / / / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `!verify` command allows moderators to apply the Developer role to a user. `!verify` is therefore removed as an alias for `!accept`.
| * | | | | | | | | | | | | | | | | Update CODEOWNERS for @Den4200Gravatar Dennis Pham2020-12-06-8/+5
| | | | | | | | | | | | | | | | | |