aboutsummaryrefslogtreecommitdiffstats
path: root/tests/helpers.py (unfollow)
Commit message (Collapse)AuthorLines
2022-11-26Handle Images As Starter MessagesGravatar Hassan Abouelela-1/+5
In the case of an image or other media as the starter message, the formatted message in the help DM will be empty, which is invalid for the embed. We populate the field with some more useful text in this case. Signed-off-by: Hassan Abouelela <[email protected]>
2022-11-26Check If Thread Is Closed In PaginationGravatar Hassan Abouelela-55/+38
Similar to 555ed4e9, the pagination utility needs to catch when it's trying to act on an archived thread. Signed-off-by: Hassan Abouelela <[email protected]>
2022-11-26Check If Thread Is Closed In wait_for_deletionGravatar Hassan Abouelela-1/+8
The wait_for_deletion utility would try to remove reactions from a message after the timeout expires, which would normally be fine. In threads however, they can be closed while waiting for the timeout to expire. In such a case, the bot will try to remove the reactions after the channel has been closed and fail. A special exception was added for this case to do nothing, since this is only a QoL feature. Signed-off-by: Hassan Abouelela <[email protected]>
2022-11-26Catch Failure In Pining Help Starter MessageGravatar Hassan Abouelela-2/+7
The old method for detecting deleted opener messages does not seem to work, probably because the message is fetched from a cache or similar. Instead we simply try/except pinning the message and pass if the pinning failed. Signed-off-by: Hassan Abouelela <[email protected]>
2022-11-26Don't Remove Cooldown Role From Non-Existing UsersGravatar Hassan Abouelela-0/+9
We try to remove the cooldown role from users before checking if the user is still in the server, which can cause an error since the thread object will just contain `None` as the user. Signed-off-by: Hassan Abouelela <[email protected]>
2022-11-26Handle Discord API Not Being ReadyGravatar Hassan Abouelela-3/+7
When discord sends us the thread create event in help channels, it is not ready to perform other operations on the thread such as getting or pinning messages. This causes it to error out when we try to do these actions and claim that those channels don't exist. Instead, we sleep for a short time to try and wait for it to be ready. Signed-off-by: Hassan Abouelela <[email protected]>
2022-11-26Simplify Help Thread Warning LogGravatar Hassan Abouelela-1/+1
The current warning log includes the thread name, which means the log message varies wildly between threads. This causes issues with sentry since the actual error message gets trimmed, and sentry fails to group issues from this log as they appear as different messages. Signed-off-by: Hassan Abouelela <[email protected]>
2022-11-25Send DM message to help post opener sooner in the processGravatar Chris Lovering-1/+2
This is to give Discord time to make the thread actually avaiulable to be posted in for the send_opened_post_message call Closes #2334 Closes BOT-3AW
2022-11-25Pin the user's starter message on help post creationGravatar Chris Lovering-0/+4
2022-11-25Add hf as an alias for the help-forum command groupGravatar Chris Lovering-1/+1
2022-11-25Add a filter for help chanel post namesGravatar Chris Lovering-2/+25
It is expected that this code will be delete whent he new fitler cog is added, and we start filtering on thread names genericly.
2022-11-25Use a redis cache to determine if a help session was answeredGravatar Chris Lovering-4/+8
2022-11-25Remove modlog ignore for help chanelsGravatar Chris Lovering-7/+1
This was due to the hlep channels causing many events top be pushed to modlog due to how the old system worked. Now that we use a forum chanel, this is no longer the case.
2022-11-25Use helper util to determine if snekbox is being invoked in a help postGravatar Chris Lovering-2/+3
2022-11-25Use help channel util from help channels cogGravatar Chris Lovering-11/+2
This removes the need for the old helper entirely
2022-11-25Update help channel system to use forum channelsGravatar Chris Lovering-1162/+263
This leverages Discord's new forum chanel feature, which removes the need for a lot of our custom logic, simplifying the help channel cog significantly.
2022-11-25Remove unused cachesGravatar Chris Lovering-21/+0
2022-11-25Update constants for new forum channel help systemGravatar Chris Lovering-56/+4
2022-11-17Edited several tags (#2322)Gravatar Keyacom-19/+34
* Edited several tags
2022-11-10Add further clarification to intents.mdGravatar thegamecracks-3/+5
- References discord.Intents documentation for detail on available intents and which features they impact - Explicitly describes no requirements for standard intents - Adds a code comment explaining the intents being enabled
2022-11-10Update intents.mdGravatar thegamecracks-6/+4
- More generally describes features enabled by intents - Adds a disclaimer for discord.py v2.0.0 requiring intents - Adds distinction between standard and privileged intents - Replaces `members` intent in code snippet with `message_content` in accordance with the usage of `commands.Bot`
2022-11-10Fix reference link in customcooldown.mdGravatar thegamecracks-1/+1
2022-11-10Change discord.py links in tags to use stable versionGravatar thegamecracks-5/+5
The `latest` version of docs follows discord.py's development branch, which may include changes to documentation that are not relevant/accessible to typical users of the library.
2022-11-01Address PR comments and fix typGravatar Owen Campbell-4/+2
2022-10-31Simplify REPL exampleGravatar Keyacom-2/+0
2022-10-30Update slicing.mdGravatar Keyacom-22/+17
Did things according to what was proposed by @swfarnsworth, and the following: - Fixed the REPL example (assignments never return) - The word "slicing" at the start was not capitalized in the proposal, even though it started a sentence. I fixed that.
2022-10-28Pass args to the Python version switch buttonGravatar Karlis Suvi-5/+10
2022-10-28Bump PSQL version in docker-composeGravatar mbaruh-1/+1
2022-10-27remove blank line between different rule keywordsGravatar Amrou Bellalouna-1/+1
2022-10-25Reverse changes to invalid arg breakGravatar Ionite-5/+8
2022-10-25Update tests to work with rules arg fixGravatar Ionite-4/+3
2022-10-25Add args split max limitGravatar Ionite-1/+1
2022-10-25Parse all words instead of breakingGravatar Ionite-3/+2
Co-authored-by: ChrisJL <[email protected]>
2022-10-25Remove comment, arg parse bugGravatar Ionite-3/+0
2022-10-25Update tests for new single string formatGravatar Ionite-12/+12
2022-10-25Added new star expression fixGravatar Ionite-20/+14
2022-10-25Updated fixGravatar Ionite-1/+7
2022-10-25Made arg fix compatible with testsGravatar Ionite-5/+6
2022-10-25Temporary fix for greedy parsing freezingGravatar Ionite-1/+4
2022-10-23Refactor some commands to avoid unnecessary API callsGravatar wookie184-48/+34
Also fixed a docstring and renamed a variable
2022-10-23remove the "n° " from rules helpGravatar Amrou Bellalouna-1/+1
2022-10-23remove Information Cog loading logGravatar Amrou Bellalouna-1/+0
2022-10-23reinstate the docstrings of "rules" and update it upon cog loadGravatar Amrou Bellalouna-8/+10
2022-10-23Various improvements and fixesGravatar wookie184-19/+22
2022-10-23set rules command's help upon cog_loadGravatar Amrou Bellalouna-6/+20
2022-10-22Move Security cog to backend extensionGravatar mbaruh-1/+1
2022-10-22Fix testsGravatar wookie184-19/+22
2022-10-22Remove mark_reviewed command, cleanup and bug fixesGravatar wookie184-64/+41
Bugs fixed were just ones introduced in my last commit :(
2022-10-22Use pydantic to model nominations and split API handling into a new fileGravatar wookie184-175/+250
2022-10-20remove int from search_value's type unionGravatar Amrou Bellalouna-6/+6