aboutsummaryrefslogtreecommitdiffstats
path: root/tests/helpers.py (unfollow)
Commit message (Collapse)AuthorLines
2021-08-24Ignore partners & members of the python community as well as staff from ↵Gravatar Izan-5/+7
`!liststream`
2021-08-24Minor linting fixesGravatar Izan-4/+9
2021-08-24Allow partners & members of the python community to bypass cooldown and use ↵Gravatar Izan-2/+2
`!raw` in any channel
2021-08-24Allow partners & members of the python community to use `!role` and `!roles`Gravatar Izan-2/+2
2021-08-24Allow partners & members of the python community to use commands in any channelGravatar Izan-11/+11
Allow partners & members of the python community to use `!remind`, `!help` `!user`, `!snowflake`, `!ping`, `!charinfo` in any channel
2021-08-24Add constants.STAFF_PARTNERS_COMMUNITY_ROLESGravatar Izan-0/+1
2021-08-24Update nomination messages to display user mentionGravatar TizzySaurus-3/+3
2021-08-23Enable debug mode by defaultGravatar MarkKoz-2/+2
2021-08-23Added some more test cases to ensure bot mentions aren't countedGravatar wookie184-1/+17
2021-08-23Remove restriction on snowflake commandGravatar D0rs4n-4/+0
2021-08-23Fix current tests by using MockMember in mention listsGravatar wookie184-3/+5
2021-08-23Escape markdown in user's name for `!user` commandGravatar TizzySaurus-0/+2
2021-08-23Ignore bot mentions in antispam mentions ruleGravatar wookie184-1/+5
2021-08-23Update reminders command to use `UserMentionOrID` instead of ↵Gravatar TizzySaurus-4/+5
`discord.Member` to fix greediness issues. (#1768)
2021-08-23Update time format in reminder message to DAY_TIME from RELATIVE (#1766)Gravatar TizzySaurus-1/+1
* Update time format in reminder message to DAY_TIME from RELATIVE Co-authored-by: Xithrius <[email protected]>
2021-08-22Update outdated commentGravatar Izan-1/+1
2021-08-22Revert `search_user` typehint back to `MemberOrUser`Gravatar Izan-2/+2
2021-08-22Update `infraction_search_group` typehint to `UserMentionOrId`Gravatar Izan-3/+3
2021-08-22Attempt to get user from DB when discord.Object passed to search_userGravatar Izan-2/+6
2021-08-22Remove redundant getattr protectionGravatar Izan-2/+2
2021-08-22Remove redundant fetching of user codeGravatar Izan-11/+4
2021-08-22Add missing call to `escape_markdown`Gravatar Izan-2/+6
2021-08-22Re-add ability to search infractions of deleted accountGravatar Izan-6/+9
2021-08-22Remove redundant functionGravatar Izan-13/+0
2021-08-22Fix isinstance checkGravatar Izan-1/+1
2021-08-22Fix importGravatar Izan-1/+1
2021-08-22Fix import orderGravatar Izan-1/+1
2021-08-22Rename converter from FetchedMember to MemberOrUserGravatar Izan-57/+58
2021-08-22Remove unused importsGravatar TizzySaurus-4/+3
2021-08-22Update to new convertersGravatar TizzySaurus-29/+21
2021-08-22Remove converters made redundant by dpy V1.6's UserConverter updateGravatar TizzySaurus-72/+1
2021-08-22Fix edge-case of `user.joined_at` being `None` in userinfo command.Gravatar TizzySaurus-1/+5
2021-08-22Improve cache iteration speedGravatar Boris Muratov-0/+10
getitem based iteration included operations that aren't necessary when iterating over the cache continuously. Adding an iter method to the class seems to have improved iteration speed by several orders of magnitude.
2021-08-22Add ability to publish metabase questionsGravatar Chris Lovering-0/+14
2021-08-22Trigger typing, to avoid wrapping whole func in a context managerGravatar Chris Lovering-30/+30
2021-08-22Add alias for metabase exportGravatar Chris Lovering-1/+1
2021-08-22Change metabase config to base url, rather than api urlGravatar Chris Lovering-9/+7
2021-08-22Move metabase error handling to a cog error handlerGravatar Chris Lovering-26/+33
2021-08-22Error to info log level on missing reminder message.Gravatar Xithrius-1/+1
2021-08-22Modify reminder response messages to be in the correct formatGravatar D0rs4n-2/+2
2021-08-21Additional comments and tests for slicingGravatar mbaruh-2/+5
2021-08-21Clean up codeGravatar mbaruh-4/+2
Removed unused import, corrected docstring, and removed unnedded type annotation.
2021-08-21Fix MessageCache slicing bugs, improve testsGravatar mbaruh-26/+41
2021-08-21Identify DeletionContext by members, not channelsGravatar mbaruh-17/+14
Since the anti-spam now works cross-channels, it makes no sense to identify it by the channel in which it was invoked. The DeletionContext class was changed to accept a frozenset of members, and the message_deletion_queue dict uses the frozensets as keys. DeletionContext still accepts a channel on creation, because while it might get added more channels, there's only one channel in which the mute message will be sent. Using members as the key can run into the issue of one member becoming irrelevant to the filter while others still are, resulting in another log message being sent, but it's an unlikely edge case since the users should be muted almost immediately, and we're currently not using any multi-member filters in the first place.
2021-08-21AntiSpam deletes from all spammed channelsGravatar mbaruh-7/+16
The anti-spam cog was amended to handle cross-channel spam.
2021-08-21AntiSpam modified to work with cacheGravatar mbaruh-9/+406
The anti-spam cog now uses a cache instead of reading channel history. The cache is for all channels in the guild, and does not remove deleted messages. That means that the anti-spam logic now works cross-channel and counts deleted messages. The size of the cache is determined via a new field in the config YAML file. The cache was implemented as a separate class, MessageCache, which uses circular buffer logic. This allows for constant time addition and removal form either side, and lookup. The cache does not support removal from the middle of the cache. The cache additionally stores a mapping from message ID's to the index of the message in the cache, to allow constant time lookup by message ID. The commit additionally adds accompanying tests, and renames `cache.py` to `caching.py` to better distinguish it from the new `message_cache.py` and convey that it's for general caching utilities.
2021-08-19Add comma separators to member counts in !serverGravatar Chris Lovering-3/+3
2021-08-19Fix linebreak formatting on server commandGravatar Chris Lovering-7/+7
The features part of the embed isn't included in some channels, this leads to there not being a linebreak between voice regions and roles in the embed. By changing it to this, rather than dedent, we specify exact where we want the linebreaks to be.
2021-08-17Move max_interval to initGravatar Boris Muratov-8/+8
The on_message event calculated the max interval value every time for no reason. The value is constant throughout the bot's up time.
2021-08-17Provide jump_url in reminders even when the bot repliesGravatar D0rs4n-1/+1
When the message is in the same channel and the bot replies, from now on it will also provide a jump_url for the sake of consistency