aboutsummaryrefslogtreecommitdiffstats
path: root/tests/helpers.py (unfollow)
Commit message (Collapse)AuthorLines
2021-08-05Time: rename format_infraction_with_durationGravatar MarkKoz-22/+22
It's not necessarily tied to infractions anymore.
2021-08-05Time: remove timedelta and relativedelta support from discord_timestampGravatar MarkKoz-5/+1
When a delta is given, it is unknown what it's relative to. The function has to assume it's relative to the POSIX Epoch. However, using a delta for this would be quite odd, and would more likely be a mistake if anything. relativedelta support was broken anyway since it wasn't using the total seconds represented by the delta.
2021-08-05Time: remove broken enum type check in discord_timestampGravatar MarkKoz-3/+0
First, the `args` attribute doesn't exist on enums. Even if it did, this check only works if the argument given is an enum member (of any enum). Such occurrence seems too rare to warrant an explicit check.
2021-08-05Time: remove absolute param from format_infraction_with_durationGravatar MarkKoz-8/+1
It's not used anywhere. Furthermore, a humanised duration with negative values wouldn't make sense.
2021-08-05Time: replace discord_timestamp calls with format_relativeGravatar MarkKoz-6/+6
Use the latter where the former was being called with the relative format type.
2021-08-05Time: rename time_since to format_relativeGravatar MarkKoz-8/+13
While the function is basically just a wrapper for discord_timestamp now, it is very common to use the relative format. It's cumbersome to import the format enum and pass it to discord_timestamp calls, so keeping this function around will be nice.
2021-08-05Time: qualify uses of functions with the module nameGravatar MarkKoz-58/+51
In cases where many time utility functions were being imported, this makes the imports shorter and cleaner. In other cases, the function names read better when they're qualified with "time"; the extra context it adds is helpful.
2021-08-05Time: remove RFC1123 supportGravatar MarkKoz-13/+0
It's not used anywhere and hasn't been for a very long time.
2022-01-08Fix snekbox tests with new allowed_mentionsGravatar Ben Soyka-4/+20
2022-01-08Restrict allowed mentions for !eval resultsGravatar Ben Soyka-2/+3
2022-01-04modlog: wait for guild init before using channel cacheGravatar Kronifer-0/+3
Not doing so could cause an error where get_channel would return none for the mod logs channel.
2022-01-01Infraction mod-log improvementsGravatar Izan-4/+5
- Add infraction id to infraction edit modlog - Add missing colon in "infraction applied" message - Utilise defined infraction id variable instead of indexing dict again
2021-12-29Add text indicating when user fetched by message (#2013)Gravatar TizzySaurus-16/+18
Co-authored-by: Xithrius <[email protected]>