aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeLines
* Merge pull request #1721 from python-discord/enhance/backend/time-util-refactorGravatar Hassan Abouelela2022-01-22-207/+283
|\ | | | | Refactor time utilities
| * Merge branch 'main' into enhance/backend/time-util-refactorGravatar Hassan Abouelela2022-01-22-119/+90
| |\ | |/ |/|
* | Merge pull request #2043 from python-discord/add-bot-coreGravatar wookie1842022-01-17-111/+88
|\ \ | | | | | | Add bot-core as a dependency
| * \ Merge branch 'main' into add-bot-coreGravatar wookie1842022-01-17-8/+2
| |\ \ | |/ / |/| |
* | | Merge pull request #2050 from Nipa-Code/fix-hyperlinkGravatar Hassan Abouelela2022-01-17-1/+1
|\ \ \ | | | | | | | | Fix pastebin hyperlink to use correct markdown syntax
| * | | Fix pastebin hyperlink to use correct markdown syntaxGravatar Nipa-Code2022-01-17-1/+1
|/ / / | | | | | | | | | | | | Fix format from `[link](text)` to `[text](link)` so that the link will be formatted as it should be.
* | | Shorten the `TXT_EMBED_DESCRIPTION` message (#2048)Gravatar Steele Farnsworth2022-01-16-8/+2
| | |
| * | Use codeblock regex from bot-core in snekbox cogGravatar Chris Lovering2022-01-09-15/+1
| | |
| * | Move single-use message ID regex to inside file that uses itGravatar Chris Lovering2022-01-09-4/+2
| | | | | | | | | | | | This moves the regex closer to the place actually using the regex, and removes the need for a regex.py file entirely.
| * | use regex from bot-core for discord invitesGravatar Chris Lovering2022-01-09-16/+4
| | |
| * | Add bot-core as a dependancyGravatar Chris Lovering2022-01-09-76/+81
|/ /
| * Time: revise docstringsGravatar MarkKoz2022-01-09-7/+9
| |
| * Scheduling: add Arrow to schedule_at's type annotationsGravatar MarkKoz2022-01-09-1/+3
| |
| * Converters: use datetime.timezone instead of dateutil.tzGravatar MarkKoz2022-01-09-3/+2
| | | | | | | | They're equivalent for UTC. Get rid of the extra import.
| * TalentPool: fix typo in error messageGravatar MarkKoz2021-09-21-2/+2
| |
| * Time: fix format_with_duration's 2nd arg's defaultGravatar MarkKoz2021-09-21-0/+3
| | | | | | | | It wasn't passing the current time when `other_timestamp` was None.
| * Time: put region comments around overloadsGravatar MarkKoz2021-08-23-0/+2
| |
| * Time: check timestamp for None only rather than if it's falsyGravatar MarkKoz2021-08-07-4/+4
| | | | | | | | | | Integers and floats which are 0 are considered valid timestamps, but are falsy.
| * Time: return strings from until_expiration instead of ambiguous NoneGravatar MarkKoz2021-08-07-10/+9
| | | | | | | | | | None was returned for two separate cases: permanent infractions and expired infractions. This resulted in an ambiguity.
| * Fix create_user_embed testsGravatar MarkKoz2021-08-07-0/+9
| | | | | | | | | | | | | | Mock User.created_at and User.joined_at because `arrow.get()` doesn't work with Mock objects. The old implementation of `time.discord_timestamp` accepted mocks because it just did `int()` on any type it didn't explicitly check for.
| * Time: use typing.Literal for precision param of humanize_deltaGravatar MarkKoz2021-08-06-5/+6
| |
| * Time: add overload to pass relativedelta kwargs to humanize_deltaGravatar MarkKoz2021-08-06-4/+32
| |
| * Time: add overload to pass 2 timestamps to humanize_deltaGravatar MarkKoz2021-08-06-30/+105
| | | | | | | | | | | | | | Remove the need for the caller to create a `relativedelta` from 2 timestamps before calling `humanize_delta`. This is especially convenient for cases where the original inputs aren't `datetime`s since `relativedelta` only accepts those.
| * Time: remove DISCORD_TIMESTAMP_REGEXGravatar MarkKoz2021-08-05-11/+6
| | | | | | | | There's a saner way to parse the timestamp that relied on this regex.
| * Time: support more timestamp formats as argumentsGravatar MarkKoz2021-08-05-73/+63
| | | | | | | | | | | | | | | | | | Remove the burden of conversion from the caller to clean up and simplify the call sites. Handle timestamp conversions internally with arrow.get. Remove format_infraction and get_time_delta because they're now obsolete. Replace the former with discord_timestamp and the latter with format_relative.
| * Time: rename format_infraction_with_durationGravatar MarkKoz2021-08-05-22/+22
| | | | | | | | It's not necessarily tied to infractions anymore.
| * Time: remove timedelta and relativedelta support from discord_timestampGravatar MarkKoz2021-08-05-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.
| * Time: remove broken enum type check in discord_timestampGravatar MarkKoz2021-08-05-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.
| * Time: remove absolute param from format_infraction_with_durationGravatar MarkKoz2021-08-05-8/+1
| | | | | | | | | | It's not used anywhere. Furthermore, a humanised duration with negative values wouldn't make sense.
| * Time: replace discord_timestamp calls with format_relativeGravatar MarkKoz2021-08-05-6/+6
| | | | | | | | | | Use the latter where the former was being called with the relative format type.
| * Time: rename time_since to format_relativeGravatar MarkKoz2021-08-05-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.
| * Time: qualify uses of functions with the module nameGravatar MarkKoz2021-08-05-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.
| * Time: remove RFC1123 supportGravatar MarkKoz2021-08-05-13/+0
|/ | | | It's not used anywhere and hasn't been for a very long time.
* empty commit for CIGravatar Joe Banks2022-01-08-0/+0
|
* Merge pull request #2041 from python-discord/eval-mentionsGravatar ChrisJL2022-01-08-6/+23
|\
| * Fix snekbox tests with new allowed_mentionsGravatar Ben Soyka2022-01-08-4/+20
| |
| * Restrict allowed mentions for !eval resultsGravatar Ben Soyka2022-01-08-2/+3
|/
* modlog: wait for guild init before using channel cacheGravatar Kronifer2022-01-04-0/+3
| | | Not doing so could cause an error where get_channel would return none for the mod logs channel.
* Merge pull request #2036 from python-discord/fix-bot-2034Gravatar ChrisJL2022-01-02-4/+5
|\ | | | | Infraction mod-log improvements
| * Infraction mod-log improvementsGravatar Izan2022-01-01-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
* Add text indicating when user fetched by message (#2013)Gravatar TizzySaurus2021-12-29-16/+18
| | | Co-authored-by: Xithrius <[email protected]>
* Strip gotcha tag (PR #2000)Gravatar Shom7702021-12-29-0/+17
| | | * adding strip-gotcha tag
* Include message counts in all channels (#2016)Gravatar ChrisJL2021-12-28-14/+45
| | | Co-authored-by: Xithrius <[email protected]>
* Merge pull request #1889 from Kronifer/url-parsingGravatar ChrisJL2021-12-26-278/+394
|\ | | | | feat: added url parsing to the filter
| * feat: changed to tldextractGravatar Kronifer2021-12-26-286/+394
| |
| * feat: added url parsing to filters with support for relative URLsGravatar Kronifer2021-12-26-2/+10
|/
* Add missing infraction id parameter & change ctx.bot to self.bot (#2028)Gravatar TizzySaurus2021-12-26-2/+2
|
* Merge pull request #2027 from python-discord/fix-dm-sent-featureGravatar Joe Banks2021-12-26-1/+3
|\
| * Add missing `bot` parameter to callGravatar Izan2021-12-26-1/+3
|/
* Merge pull request #1951 from python-discord/add-dm_sent-fieldGravatar Johannes Christ2021-12-26-12/+45
|\ | | | | Display whether DM was sent to user when listing infraction(s).