aboutsummaryrefslogtreecommitdiffstats
path: root/tests/helpers.py (unfollow)
Commit message (Collapse)AuthorLines
2021-12-08Reduce threshold before fuzzy matching to 2Gravatar Chris Lovering-2/+2
Commands such as !ot, !if, !xy are commonly used as shortcuts to their respective tags. We recently upped the threshold before fuzzy matching to 3 characters, which broke these shortcuts. This commit reduces that threshold down to 2, so users who are used to those commands can still use them.
2021-12-08Use hardcoded rules url instead of constructing it from constsGravatar Numerlor-5/+4
Discord does validation on the embed url which may fail for valid local urls
2021-12-08Move static content site commands to tags and remove the site cogGravatar Numerlor-94/+24
2021-12-08Remove the site help commandGravatar Numerlor-16/+0
2021-12-08Move the rules command to the Information cogGravatar Numerlor-37/+38
2021-12-08Correct typo in loglineGravatar Johannes Christ-1/+1
2021-12-07Make snekbox url an env varGravatar Chris Lovering-1/+1
An issue with snekbox in our cluster has meant that we want to send requests to an external service temporarily while we get this fixed. Making this an env var means we can change this whenever needed in future without leaking the external service's url.
2021-12-06Build an intermediate list for speed in filtering cogGravatar Chris Lovering-1/+1
2021-12-06Also run name filters against a cleaned version of the normalised nameGravatar Chris Lovering-4/+5
2021-12-06Return early when getting name matchesGravatar Chris Lovering-9/+7
Ss soon as we get a match for a bad name, return it, rather than running it against the rest of the filters.
2021-12-06Check if we recently alerted about a bad name before running all filter ↵Gravatar Chris Lovering-2/+6
tokens again
2021-12-06Normalise names before checking for matchesGravatar Chris Lovering-3/+11
2021-12-05fix: parse whitespace out of pep titlesGravatar onerandomusername-1/+4
2021-12-03Patch d.py's message convertor to infer channelID from the given contextGravatar Chris Lovering-0/+29
Discord.py's Message convertor is supposed to infer channelID based on ctx.channel if only a messageID is given. A 'refactor' (linked below) a few weeks before d.py's archival broke this, so that if only a messageID is given to the convertor, it will only find that message if it's in the bot's cache. Co-authored-by: Hassan Abouelela <[email protected]>
2021-12-03Attepmt to fetch un-cached nomination threads on archiveGravatar Chris Lovering-2/+5
Fixes BOT-1R0 Fixes #1992 The time between a vote passing and the helper being helpered can sometimes be >7 days, meaning the thread may have auto-archived by then. We should deal with this by trying to fetch the threead from the API if it's not cached.
2021-12-03Update PEP Repo URLGravatar Hassan Abouelela-1/+1
The PEP github repo changed branch from master, to main, breaking our code. Switch the ref from master to main in our code.
2021-12-02remove default thread archive time as discord.py supports that alreadyGravatar onerandomusername-7/+1
2021-12-02set three_day to 4320, the number of minutes in 3 daysGravatar aru-1/+1
2021-12-01Redirect subscribe command output to bot commandsGravatar Chris Lovering-10/+7
Instead of silently failing in channels other than bot commands for non-staff, the bot now instead redirects the command output to bot commands and pings the user. To facilitate this, I had to change the ctx.reply to a ctx.send since the invocation message may be in a different channel.
2021-12-01Sort subscribe roles alphabeticallyGravatar Chris Lovering-1/+3
2021-12-01Dynamic views for command help embeds (#1939)Gravatar Boris Muratov-51/+141
Dynamic views for command help embeds Adds views for commands to navigate groups. For subcommands, a button is added to show the parent's help embed. For groups, buttons are added for each subcommand to show their help embeds. The views are not generated when help is invoked in the context of an error.
2021-12-01Remove redundant Union in a type hintGravatar Chris Lovering-1/+1
2021-12-01Use presence of a nominee as check for pending reviewsGravatar Chris Lovering-1/+1
2021-12-01Always return a review string for a given nominationGravatar Chris Lovering-8/+5
2021-12-01Fix emoji reaction error in reviewerGravatar Chris Lovering-2/+2
Using a :eyes: style emoji string in a ctx.add_reaciton call will error. Discord expects either a unicode emoji, or a custom emoji.
2021-12-01Ensure a nomination archival emoji isn't from the botGravatar Chris Lovering-0/+3
This is most relevant in local dev testing where the Emojis.check_mark could be the same as the Emojis.incident_actioned or Emojis.incident_unactioned, which would cause the bot to attempt to archive the post_review invocation if it was posted in the nomination voting channel.
2021-12-01Supress NotFound when archiving a nominationGravatar Chris Lovering-3/+6
This supresses both the mesage deleteions and the thread archive, so that if they are removed before the code can get to them, it does not raise an error.
2021-12-01Update nomination message regexGravatar Chris Lovering-2/+1
2021-12-01Manage nomination threadsGravatar Chris Lovering-1/+14
This change creates a thread while posting the nomination, and then archives it once the nomination is concluded.
2021-12-01Refactor make_review to return nominee tooGravatar Chris Lovering-9/+9
2021-12-01Add thread archive time enum to constantsGravatar Chris Lovering-0/+12
2021-11-30Subscribe command replies to invocation to keep contextGravatar Chris Lovering-1/+1
2021-11-30Add lock emoji to highlight unavailable self-assignable rolesGravatar Chris Lovering-1/+1
2021-11-30Swap remove and unavailable colours for subscribe commandGravatar Chris Lovering-2/+2
2021-11-30Sort unavailable self-assignable roles to the end of the listGravatar Chris Lovering-0/+3
2021-11-30Allow roles to be assignable over multiple monthsGravatar Chris Lovering-23/+72
This includes a refactor to use a dataclass for clearer implementation. Along with that, this changes the roles so that they're always available, but un-assignable roles are in red and give a different error.
2021-11-30Delete the subscribe message after 5 minutesGravatar Chris Lovering-1/+6
2021-11-30Use new get_logger helper utilGravatar Chris Lovering-3/+2
2021-11-30Stop listening for events when message is deletedGravatar Chris Lovering-0/+2
2021-11-30Add 10s member cooldown to subscribe commandGravatar Chris Lovering-0/+1
2021-11-30Ensure the user interacting is still in guild before changing rolesGravatar Chris Lovering-0/+4