aboutsummaryrefslogtreecommitdiffstats
path: root/tests/helpers.py (unfollow)
Commit message (Collapse)AuthorLines
2021-10-10Handle 400 when setting pre-existing doc packageGravatar Richard Si-1/+9
If you run, for example: !doc setdoc black https://black.readthedocs/en/stable/objects.inv twice over. You'll get an unhelpful "According to the API, your request is malformed." error message back. This commit adds an error handler to catch the HTTP 400 and tell the user the package already exists.
2021-10-08Fix typoGravatar TizzySaurus-1/+1
Co-authored-by: Bluenix <[email protected]>
2021-10-08Bluenix Review #4Gravatar Izan-2/+2
2021-10-06Kill subdomains from configuration file.Gravatar Johannes Christ-3/+3
This will need a coordinated rollout with @jb3, in order to make the appropriate changes in Kubernetes beforehand.
2021-10-06Add appeal categories to mod categoriesGravatar Chris Lovering-0/+4
This allows us to run moderation commands in the appeal categories
2021-10-06Revert "Apply infractions before DMing"Gravatar Matteo Bertucci-10/+8
2021-10-05Use `isinstance` instead of `hasattr` to determine if `Member`Gravatar Izan-2/+2
2021-10-05Fix lintingGravatar TizzySaurus-0/+1
Reverted accidental line deletion
2021-10-05Fix if statement errorGravatar TizzySaurus-10/+9
Adds `messages_as_list` for easy indexing of `self.messages.values()` Also updated the comment above if statement and tidied some code
2021-10-05Make attachments check explicitGravatar TizzySaurus-1/+1
Co-authored-by: Matteo Bertucci <[email protected]>
2021-10-05Improvements to anti-spam log messageGravatar TizzySaurus-3/+9
- Removed redundant f-string - Made it so that messages with attachments will *always* upload to the log site. - Made it so that truncates messages will also upload to the paste site, for full viewing. - Fixed a previously unnoticed bug where truncating didn't account for extra characters of the ellipses.
2021-10-04Use utcnow() and lower a logging level in patch_typingGravatar Chris Lovering-3/+3
2021-10-04Move all monkey patches to their own fileGravatar Chris Lovering-23/+22
2021-10-04Monkey patch http.send_typing to catch 403sGravatar Chris Lovering-1/+35
Sometimes discord turns off typing events by throwing 403's, so we should catch those
2021-10-03Check cache for Members and UsersGravatar Chris Lovering-5/+5
By swapping the isinstance to check for int, the else block now catches the case where target is Member or User, this allows for editting the nomination reason of members that are off server.
2021-10-03Block helpers from editing nomination reasons in channels other than ↵Gravatar Chris Lovering-3/+7
#nominations
2021-10-03Handle channel category being None in antispam/malware checksGravatar wookie184-2/+2
The code already handled the attribute not existing (e.g from a DM channel), but didn't handle TextChannels not in a category
2021-10-03Force kwargs when calling helper utilGravatar ChrisJL-1/+2
Co-authored-by: Bluenix <[email protected]>
2021-10-03Allow helpers to edit their own nomination reasonGravatar Chris Lovering-8/+60
This change will allow helpers to run the edit reason command in the Talentpool cog. To ensure that non-mod helpers can only edit their own reasons the interface for the reason command has been changed slightly. If nominee_or_nomination_id is a member or user, then the command edits the currently active nomination for that person. If it's an int, then use this to look up that nomination ID to edit. If no nominator is specified, assume the invoker is editing their own nomination reason. Otherwise, edit the reason from that specific nominator. Raise a permission error if a non-mod staff member invokes this command on a specific nomination ID, or with an nominator other than themselves.
2021-09-29python-news escape fixes (#1822)Gravatar TizzySaurus-5/+16
* Fix escapes in python-news posts No longer escapes markdown inside of codeblocks or pre-escaped markdown. Co-authored-by: Ryu18 <[email protected]> * Add escaping to title of py-news posts * Fix typo Co-authored-by: Ryu18 <[email protected]>
2021-09-29Add new poetry tasks for pytestGravatar Chris Lovering-1/+2
Updated the test task to now run with --ff which runs failed tests from the last run first Added retest, which runs pytest with --lf this only runs the failed tests from the last test run
2021-09-29Rename channel helper to be consistent with other helpersGravatar Chris Lovering-6/+6
2021-09-29Mock fetch_member in tests that user get_or_fetch nowGravatar Chris Lovering-6/+15
2021-09-29Migrate all Guild.get_member calls to get_or_fetch_memberGravatar Chris Lovering-46/+53
This protects us against the guild cache not being fully populated with members.