aboutsummaryrefslogtreecommitdiffstats
path: root/tests/helpers.py (unfollow)
Commit message (Collapse)AuthorLines
2020-04-17HelpChannels: fix role not resetting after dormant commandGravatar MarkKoz-13/+3
Resetting permissions relied on getting the member from the cache, but the member was already removed from the cache prior to resetting the role. Now the member is passed directly rather than relying on the cache.
2020-04-17HelpChannels: mention dormant cmd in available message embedGravatar MarkKoz-2/+3
Users should know they can close their own channels.
2020-04-17HelpChannels: add info about cooldown role & dormant cmd to docstringGravatar MarkKoz-0/+3
2020-04-17HelpChannels: add/remove a cooldown role rather than using overwritesGravatar MarkKoz-13/+10
Overwrites had issues syncing with channels in the category. * Remove update_category_permissions; obsolete * Add constant for the cooldown role wrapped in a discord.Object
2020-04-17HelpChannels: clear roles when resetting permissionsGravatar MarkKoz-9/+7
Claimants will have a special role that needs to be removed rather than using member overwrites for the category.
2020-04-17HelpChannels: add helper function to check for claimant roleGravatar MarkKoz-0/+5
2020-04-17HelpChannels: remove ensure_permissions_synchronizationGravatar MarkKoz-29/+1
2020-04-17Constants: add help channel cooldown roleGravatar MarkKoz-0/+2
2020-04-17HelpChannels: ensure `is_in_category` returns a boolGravatar Mark-1/+1
Co-Authored-By: kwzrd <[email protected]>
2020-04-16Remove `.md` from anti-malware whitelistGravatar Sebastiaan Zeeff-1/+0
We want our members to use the paste site to share text-based files instead of them sharing the files as attachments on Discord. As `.md`, a file extensions used for plain-text files with markdown formatting, is such a text file, I've removed it from the anti-malware whitelist.
2020-04-14Revert deletion of !dormant invocation messagesGravatar Sebastiaan Zeeff-4/+0
PR #868 introduced the automatic deletion of the message that issued the `!dormant` command. The idea behind this was that moving the channel to the dormant category makes it obvious that a channel has gone dormant and the message would only serve as visual clutter. However, removing the command invocation also means that it's less obvious why a channel was moved to the dormant category. As the message gets deleted almost immediately, you have to be actively watching the channel to know that the command was issued and who issued it. This has already caused some confusion where helping members where left wondering why a channel suddenly went dormant while they felt that the conversation was still ongoing. To improve the user experience, this commit removes the deletions of the command invocation messages.
2020-04-13[stat] Tag statistic was using the user input as the series name, not the ↵Gravatar Joseph Banks-1/+1
resolved tag name
2020-04-12[stat] Create a statistic for whether dormant was called by the claimant or ↵Gravatar Joseph Banks-1/+7
staff
2020-04-12timer -> timing for statsdGravatar Joseph Banks-2/+2
2020-04-12Use underscore for metric names instead of dashGravatar Joseph Banks-1/+1
2020-04-12Add a timeout to prevent the bot from being overloaded with presence updatesGravatar Joseph Banks-5/+21
2020-04-12Address aeros' review comment regarding help channel stat reportingGravatar Joseph Banks-3/+3
2020-04-11Add a metric for tracking how long defcon was activeGravatar Joseph Banks-1/+15
2020-04-11Use in for membership check as opposed to .get()Gravatar Joseph Banks-1/+1
2020-04-11Update bot/cogs/stats.pyGravatar Joseph-1/+1
Co-Authored-By: Mark <[email protected]>
2020-04-11Additional statisticsGravatar Joseph Banks-9/+45
2020-04-11Move create_socket to the login method of the botGravatar Joseph Banks-4/+1
2020-04-11Implement an AsyncStatsClient to send statsd communications asynchronouslyGravatar Joseph Banks-3/+49
2020-04-11Address review comments from MarkGravatar Joseph Banks-3800/+5
2020-04-11Address review comments from MarkGravatar Joseph Banks-14/+3837
2020-04-11HelpChannels: create helper method for checking channel's categoryGravatar MarkKoz-4/+8
2020-04-11HelpChannels: create a helper method for checking a channGravatar MarkKoz-2/+4
2020-04-11StatsD integrationGravatar Joseph Banks-34/+145
2020-04-10Fix `help_channel_claimants` typehint.Gravatar Numerlor-1/+3
`ctx.author` that is used to populate the dict returns a `Member` object in most cases while only `User` was documented as a possible value.
2020-04-10Use synchronized permission reset.Gravatar Numerlor-1/+1
2020-04-09Specify encoding to logging file handler.Gravatar Numerlor-1/+1
With the new addition of non latin-11 chars in channel names - which get logged, the logging to files fails on those entries on OSs where the default encoding is not utf8 or an other encoding capable of handling them.
2020-04-09Delete channel from claimant cache.Gravatar Numerlor-0/+3
Deleting the channel from the claimant cache on invokation of the dormant command prevents users running the command multiple times before the bot moves it.
2020-04-09Reverse order of moving to dormant and task cancellation.Gravatar Numerlor-1/+1
Reversing the order ensures the task is not cancelled when moving to dormant fails which gives a fallback to move it after the initial period of time.
2020-04-09HelpChannels: check author of dormant messageGravatar MarkKoz-3/+2
In a testing environment, the bot may try to edit the message of a different bot. Therefore, the author of the message should be checked to ensure the current bot sent it.
2020-04-09Suppress errors when resetting permissions.Gravatar Numerlor-1/+2
2020-04-09Move permissions reset up.Gravatar Numerlor-1/+2
2020-04-09Move message deletion up.Gravatar Numerlor-3/+4
2020-04-09Reword comment.Gravatar Numerlor-1/+1
Co-authored-by: MarkKoz <[email protected]>
2020-04-09Add spacing.Gravatar Numerlor-0/+1
Co-authored-by: MarkKoz <[email protected]>
2020-04-09Reword strings to reflect name changes.Gravatar Numerlor-6/+6
2020-04-09Change names to more descriptive ones.Gravatar Numerlor-6/+6
2020-04-09Delete overwrite instead of send_messages permission.Gravatar Numerlor-1/+1
Only resetting the permission caused the overwrites for the users to remain on the category, potentially piling up and causing further issues.
2020-04-09Reverse help_channel_user pairs.Gravatar Numerlor-6/+4
Pairing users to channels was a design flaw, because the keys didn't get overwritten. This allowed multiple users to access the dormant command for the running session of the bot. Replacing this with a reversed paring fixes both issues because the cache is overwritten on channel activation.
2020-04-09Cancel permission restoration task.Gravatar Numerlor-0/+2
After the dormant command is used and the permissions are restored for the user that started the session, the task for restoring them after the claim time has passed is no longer necessary.
2020-04-09Handle dormant invokation not being found.Gravatar Numerlor-1/+4
2020-04-09Extend docstrings to include new behaviour.Gravatar Numerlor-1/+7
2020-04-09Reset cooldown after channel is made dormant.Gravatar Numerlor-0/+14
2020-04-09Allow help session starters to invoke dormant.Gravatar Numerlor-6/+17
Removing the `with_role` check from the command and replcaing it with a new `dormant_check` that's used in the body, which also checks against a cache of users that started the sessions, allows them to close their own channels along with the role check.
2020-04-09Remove dormant invokation message after move.Gravatar Numerlor-0/+1
2020-04-09(Syncer Tests): Replaced wrong side effectGravatar ks129-1/+2
Replaced `TimeoutError` with `asyncio.TimeoutError`.