aboutsummaryrefslogtreecommitdiffstats
path: root/tests/helpers.py (unfollow)
Commit message (Collapse)AuthorLines
2020-07-15Fix docstring and commentsGravatar Senjan21-13/+7
2020-07-15Added command&system to purge all messages up to given messageGravatar Senjan21-1/+39
2020-07-15Oops, these prints shouldn't be here.Gravatar Leon Sandøy-3/+0
https://github.com/python-discord/bot/issues/1041
2020-07-15How did that except except block get in?Gravatar Leon Sandøy-3/+0
Weird. https://github.com/python-discord/bot/issues/1041
2020-07-15Create a UserMentionOrID converter.Gravatar Leon Sandøy-1/+24
When we're using the !reply command, using a regular UserConverter is somewhat problematic. For example, if I wanted to send the message "lemon loves you", then I'd try to write `!reply lemon loves you` - however, the optional User converter would then try to convert `lemon` into a User, which it would successfully do since there's like 60 lemons on our server. As a result, the message "loves you" would be sent to a user called lemon.. god knows which one. To solve this bit of ambiguity, I introduce a new converter which only converts user mentions or user IDs into User, not strings that may be intended as part of the message you are sending. https://github.com/python-discord/bot/issues/1041
2020-07-15Ves' refactorGravatar Leon Sandøy-15/+16
Co-authored-by: Sebastiaan Zeeff <[email protected]>
2020-07-15Add some stats for DMs sent and received.Gravatar Leon Sandøy-0/+3
https://github.com/python-discord/bot/issues/1041
2020-07-15Add the user ID to the username in dm relays.Gravatar Leon Sandøy-1/+1
Without this, it is difficult to know precisely who the user that is DMing us is, which might be useful to us. https://github.com/python-discord/bot/issues/1041
2020-07-15Restore DM user caching.Gravatar Leon Sandøy-6/+22
This reverts commit 042f472a
2020-07-15Document new kwarg in docstringGravatar kosayoda-0/+2
2020-07-14HelpChannels: remove cooldown info from available messageGravatar MarkKoz-3/+0
Users can no longer see available channels if they're on cooldown. They will instead see a special "cooldown" channel which will explain what's going on.
2020-07-14Suppress NotFound when removing help cmd reactionsGravatar MarkKoz-7/+6
The message may be deleted somehow before the wait_for times out. Fixes #1050 Fixes BOT-6X
2020-07-15Remove caching of last_dm_user.Gravatar Leon Sandøy-25/+20
If you're typing up a reply and the bot gets another DM while you're typing, you might accidentally send your reply to the wrong person. This could happen even if you're very attentive, because it might be a matter of milliseconds. The complexity to prevent this isn't worth the convenience of the feature, and it's nice to get rid of the caching as well, so I've decided to just make .reply require a user for every reply. https://github.com/python-discord/bot/issues/1041
2020-07-14Remove redundant kwarg in !kick and !shadow_kickGravatar kosayoda-2/+2
The kwarg `active=False` is already being passed in `apply_kick`, therefore passing it in the parent callers result in a TypeError. Fixes #976 Fixes BOT-5P
2020-07-14Achieve feature parity with talentpoolGravatar kosayoda-2/+17
2020-07-14Add command to list nominees by oldest firstGravatar kosayoda-0/+11
2020-07-14Accept argument to order nominees by oldest firstGravatar kosayoda-2/+6
2020-07-14Pass argument as kwarg to preserve functionalityGravatar kosayoda-1/+1
2020-07-14Allow ordering watched users by oldest firstGravatar kosayoda-1/+7
2020-07-14fix misaligned indentationGravatar Slushie-37/+37
2020-07-13Whitelisting some popular communitiesGravatar Leon Sandøy-0/+10
The following communities are whitelisted by this commit: - Django - Programming Discussions - JetBrains Community - Raspberry Pi - Programmers Hangout - SpeakJS - DevCord - Unity - Programmer Humor - Microsoft Community Most of these are partners, or otherwise friendly communities that aren't worth pinging mods over.
2020-07-13Store last DM user in RedisCache.Gravatar Leon Sandøy-12/+22
Also now catches the exception if a user has disabled DMs, and adds a red cross reaction. https://github.com/python-discord/bot/issues/667
2020-07-13edit snekbox tests to work with filteringGravatar Slushie-0/+12
2020-07-13check for the filter_cog in case it is unloadedGravatar Slushie-1/+3
2020-07-13Remove redundant clean_content variable.Gravatar Leon Sandøy-5/+2
https://github.com/python-discord/bot/issues/667
2020-07-13rename the `_filter_eval` function to be a public functionGravatar Slushie-2/+2
2020-07-13Don't run on_message if self.webhook is None.Gravatar Leon Sandøy-1/+1
https://github.com/python-discord/bot/issues/667
2020-07-13Only mods+ may use the commands in this cog.Gravatar Leon Sandøy-0/+6
https://github.com/python-discord/bot/issues/667
2020-07-13Add avatar_url in python_news.pyGravatar Leon Sandøy-0/+2
https://github.com/python-discord/bot/issues/667
2020-07-13Better docstring for DMRelay cog.Gravatar Leon Sandøy-1/+1
https://github.com/python-discord/bot/issues/667
2020-07-12Fix rescheduling of edited infractionsGravatar MarkKoz-1/+1
It was attempting to schedule a dictionary instead of a coroutine. Fixes #1043 Fixes BOT-6Y
2020-07-13Revert "Ping @Moderators in ModLog"Gravatar Leon Sandøy-15/+20
Let's continue to use "@everyone" for now, and add an explicit allow for it so that it successfully pings people. There's a full justification for this in the pull request. https://github.com/python-discord/bot/issues/1038
2020-07-12Add a way to respond to DMs.Gravatar Leon Sandøy-0/+29
This shouldn't be used as a replacement for ModMail, but I think it makes sense to have the feature just in case #dm-log provides an interesting use-case where responding as the bot makes sense. It's a bit of a curiosity, and Ves hates it, but I included it anyway. https://github.com/python-discord/bot/issues/667
2020-07-12Fix DuckPond tests now that send_webhook is gone.Gravatar Leon Sandøy-39/+12
Some of the tests were failing because they were expecting send_webhook to be a method of the DuckPond cog, other tests simply were no longer applicable, and have been removed. https://github.com/python-discord/bot/issues/667
2020-07-12Only relay DMs, and only from humans.Gravatar Leon Sandøy-0/+4
https://github.com/python-discord/bot/issues/667
2020-07-12Replace channel ID with webhook ID for dm_log.Gravatar Leon Sandøy-4/+2
https://github.com/python-discord/bot/issues/667
2020-07-12Relay all DMs and embeds to #dm-log.Gravatar Leon Sandøy-0/+67
https://github.com/python-discord/bot/issues/667
2020-07-12Refactor python_news.py to use webhook util.Gravatar Leon Sandøy-43/+31
https://github.com/python-discord/bot/issues/667
2020-07-12Remove pointless comment Gravatar Leon Sandøy-1/+1
This comment violates the DRY principle. Co-authored-by: Sebastiaan Zeeff <[email protected]>
2020-07-12Refactor Duck Pond embed sender to be a util.Gravatar Leon Sandøy-22/+42
https://github.com/python-discord/bot/issues/667
2020-07-12Add the #dm_log ID to constants.Gravatar Leon Sandøy-0/+2
https://github.com/python-discord/bot/issues/667
2020-07-12Allow role pings in Syncers and help_channels.pyGravatar Leon Sandøy-2/+9
Now that we're running Discord 1.4.0a, we need to explicitely allow all the role mentions for sends that don't use ping one of the globally whitelisted role pings, which are Moderators, Admins and Owners. We were pinging roles other than Mods+ in exactly two cases: - Inside the Syncers, whenever we ask for sync confirmation (if the number of roles or users to sync is unusually high) - In the help_channels.py system, whenever we max out help channels and are unable to create more. This commit addresses both of these. GitHub #1038 https://github.com/python-discord/bot/issues/1038
2020-07-12Ping @Moderators in ModLogGravatar Leon Sandøy-14/+14
Instead of pinging @everyone, let's just ping the people who actually need to see the mod alerts or the modlogs, which would be the mods. `@everyone` is currently not permitted by our allowed_mentions setting, so this also restores pings to those channels. GitHub #1038 https://github.com/python-discord/bot/issues/1038
2020-07-09Update discord.py to fix issue with overwritesGravatar MarkKoz-3/+3
Fixes BOT-6T
2020-07-09Update range-len.mdGravatar Steele Farnsworth-4/+0
Removed all blank lines to improve how it's rendered on Discord; thanks @kwzrd for rendering this!
2020-07-09Add missing variable assignment to stop NameErrors occurringGravatar Slushie-0/+1
2020-07-09Fix missing hypenGravatar slushiegoose-1/+1
Co-authored-by: Leon Sandøy <[email protected]>
2020-07-08Removed hard line breaksGravatar swfarnsworth-7/+3
2020-07-08Call the filter eval command after receiving an eval resultGravatar Slushie-1/+6
2020-07-08Create a filtering function to filter eval resultsGravatar Slushie-52/+120