aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeLines
* Merge pull request #1171 from python-discord/kwzrd/log-levelsGravatar Mark2020-09-23-2/+2
|\ | | | | Adjust verification & incidents log levels
| * Incidents: bump archive log to INFO levelGravatar kwzrd2020-09-23-1/+1
| |
| * Verification: reduce request dispatch log levelGravatar kwzrd2020-09-23-1/+1
| | | | | | | | Avoid information duplication in production logs.
* | Fix use of expanded infraction response for usernameGravatar MarkKoz2020-09-23-1/+1
|/ | | | Fixes BOT-9A
* Update format_user to remove username and add IDGravatar Joe Banks2020-09-23-4/+2
|
* Clean: fix mention in mod log messageGravatar MarkKoz2020-09-22-1/+1
| | | | Fixes BOT-99
* Avoid using discord.Object's repr as the username for infraction searchGravatar MarkKoz2020-09-22-0/+7
|
* Fix AttributeError for infraction user searches via the groupGravatar MarkKoz2020-09-22-1/+1
|
* Fix future date check in snowflake converterGravatar MarkKoz2020-09-22-1/+1
|
* Merge pull request #1126 from ↵Gravatar Mark2020-09-22-37/+22
|\ | | | | | | | | python-discord/feat/info/1125/user-cmd-whitelist-modmail Whitelist the modmail category for displaying verbose infraction info from the user command
| * Merge branch 'master' into feat/info/1125/user-cmd-whitelist-modmailGravatar MarkKoz2020-09-22-3054/+2635
| |\ | |/ |/|
* | Merge pull request #1061 from python-discord/feat/frontend/533/mod-log-namesGravatar Mark2020-09-22-207/+209
|\ \ | | | | | | Use mentions for users in mod logs and infraction search results
| * | Filtering: add missing space to log msgGravatar Mark2020-09-22-1/+1
| | |
| * | Fix type annotation for expanded infractionsGravatar MarkKoz2020-09-22-2/+1
| | | | | | | | | | | | | | | The `_utils.Infraction` alias does not cover nested data structures. Therefore, it's inappropriate for expanded infraction API responses.
| * | Merge branch 'master' into feat/frontend/533/mod-log-namesGravatar MarkKoz2020-09-22-3016/+2690
| |\ \ | |/ / |/| |
* | | Merge pull request #1168 from python-discord/feat/latencyGravatar Senjan212020-09-22-1/+69
|\ \ \ | | | | | | | | Latency cog for checking ping.
| * \ \ Merge branch 'master' into feat/latencyGravatar Xithrius2020-09-22-1463/+224
| |\ \ \ | |/ / / |/| | |
* | | | Merge pull request #1163 from ↵Gravatar Sebastiaan Zeeff2020-09-22-843/+168
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | python-discord/sebastiaan/features/use-async-rediscache-package Use `async-rediscache` package for our redis caches
| * \ \ \ Merge branch 'master' into sebastiaan/features/use-async-rediscache-packageGravatar Sebastiaan Zeeff2020-09-22-1136/+1003
| |\ \ \ \ | |/ / / / |/| | | |
* | | | | Merge pull request #1164 from python-discord/sebastiaan/bugs/duckpondGravatar Dennis Pham2020-09-21-630/+102
|\ \ \ \ \ | | | | | | | | | | | | Several improvements to duckpond
| * | | | | Use `has_any_role` decorator instead of old `with_role` decoratorGravatar Den42002020-09-21-2/+2
| | | | | |
| * | | | | Merge branch 'master' into sebastiaan/bugs/duckpondGravatar Den42002020-09-21-506/+901
| |\ \ \ \ \ | |/ / / / / |/| | | | |
* | | | | | Merge branch 'bug/1142/fix-everyone-ping' into masterGravatar Daniel Brown2020-09-21-62/+47
|\ \ \ \ \ \
| * \ \ \ \ \ Merge branch 'master' into bug/1142/fix-everyone-pingGravatar Kieran Siek2020-09-19-88/+808
| |\ \ \ \ \ \
| * | | | | | | Add everyone_ping filter.Gravatar kosayoda2020-09-08-11/+47
| | | | | | | |
| * | | | | | | Remove everyone_ping rule from antispam.Gravatar kosayoda2020-09-07-152/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The feature will be moved to the filtering cog.
| * | | | | | | Add test for everyone_ping rule.Gravatar kosayoda2020-09-05-0/+102
| | | | | | | |
| * | | | | | | Detect pings after removing codeblocks.Gravatar kosayoda2020-09-05-6/+9
| | | | | | | |
| | | * | | | | Lower duckpond threshold to increase activityGravatar Sebastiaan Zeeff2020-09-20-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There's not a lot of activity in our duckpond at the moment. To activate our duckies, I've decreased the duckpond threshold to 4. This means that a message will now be relayed once it's been ducked four times. Let's get all of our ducks in a row. Signed-off-by: Sebastiaan Zeeff <[email protected]>
| | | * | | | | Add command to relay a message to duckpondGravatar Sebastiaan Zeeff2020-09-20-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit adds a command that allows admins to manually relay a message to the duckpond, regardless of duck counts and the checks done in the reaction event handler. Signed-off-by: Sebastiaan Zeeff <[email protected]>
| | | * | | | | Use helper for duckpond's locked relay featureGravatar Sebastiaan Zeeff2020-09-20-15/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I've created a helper for duckpond's relay feature to allow me to use it separately from the command we're planning to add to the Cog. I opted not to include the lock in the original relay method to separate the logic more clearly. Signed-off-by: Sebastiaan Zeeff <[email protected]>
| | | * | | | | Remove unit tests for duck pondGravatar Sebastiaan Zeeff2020-09-20-548/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I've removed the unit tests for duckpond in concordance with the new policy for writing unit tests for the bot The tests were unnecessarily complicated, difficult to maintain, and slowed development. Signed-off-by: Sebastiaan Zeeff <[email protected]>
| | | * | | | | Fix relay race condition in duckpond using a lockGravatar Sebastiaan Zeeff2020-09-20-7/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Our duckpond suffered from a race condition: If multiple raw reaction events were received in quick succession and a message had enough ducks to take it over the duckpond threshold, the message would be relayed multiple times. The reason this happened is because the green checkmark emoji that stops a message from being relayed multiple times is only added after the message has been relayed. This means that multiple event triggers can make it past the green checkmark check before any of them has a chance to add a green checkmark. The solution was to create a relay lock that needs to be acquired before checking for the presence of a green checkmark and is only released after adding a green checkmark. This prevents multiple events from making it past the sentinel check. As our Cogs are potentially initialized before the event loop is created, the lock is load lazily when needed. Signed-off-by: Sebastiaan Zeeff <[email protected]>
| | | * | | | | Add channel blacklist for duckpondGravatar Sebastiaan Zeeff2020-09-20-4/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As announcements already get a lot of exposure and have a high risk of getting "ducked", duckpond will now ignore those channels and never relay those announcements to our duckpond. Signed-off-by: Sebastiaan Zeeff <[email protected]>
| | | * | | | | Ignore non-staff messages for our duckpondGravatar Sebastiaan Zeeff2020-09-20-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some of our members have expressed concern that their messages would be "ducked" by staff members and relayed to the staff-only duckpond. Since duckpond is supposed to be a funny, staff-only affair, I've made duckpond ignore messages from non-staff members. Signed-off-by: Sebastiaan Zeeff <[email protected]>
| | | * | | | | Determine eligible duckpond emojis dynamicallyGravatar Sebastiaan Zeeff2020-09-20-70/+27
| | |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of maintaining a list of duckpond IDs manually, it's a much better idea to detect ducky emojis dynamically using the new emoji name grouping we've introduced: All emojis that start with `ducky_` will now be counted as a duckpond ducky. The unicode duck emoji obviously still counts in addition to custom emojis with the `ducky_` prefix. Signed-off-by: Sebastiaan Zeeff <[email protected]>
| | | * | | | Use global namespace `bot` for our RedisSessionGravatar Sebastiaan Zeeff2020-09-19-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As we're now planning on using Redis in multiple applications, it's important to minimize the risk of namespace collisions between different applications. The `async-rediscache` packages allows us to set a global namespace on an application level. I've chosen "bot" as the namespace for this application, which means all individual namespaces will automatically be prefixed by `bot.` whenever they are accessed. Signed-off-by: Sebastiaan Zeeff <[email protected]>
| | | * | | | Remove vestigial RedisCache class definitionGravatar Sebastiaan Zeeff2020-09-19-681/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As we're now using the `async-rediscache` package, it's no longer necessary to keep the `RedisCache` defined in `bot.utils.redis_cache` around. I've removed the file containing it and the tests written for it. Signed-off-by: Sebastiaan Zeeff <[email protected]>
| | | * | | | Use async-rediscache package for our redis cachesGravatar Sebastiaan Zeeff2020-09-19-163/+167
| | |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I've migrated our redis caches over to the async-rediscache package that we've recently released (https://git.pydis.com/async-rediscache). The main functionality remains the same, although the package handles some things, like getting the active session, differently internally. The main changes you'll note for our bot are: - We create a RedisSession instance and ensure that it connects before we even create a Bot instance in `__main__.py`. - We are now actually using a connection pool instead of a single connection. - Our Bot subclass now has a new required kwarg: `redis_session`. - Bool values are now properly converted to and from typestrings. In addition, I've made sure that our MockBot passes a MagicMock for the new `redis_session` kwarg when creating a Bot instance for the spec_set. Signed-off-by: Sebastiaan Zeeff <[email protected]>
| | | * | | Updated dependencies to match with master and include aioping.Gravatar Xithrius2020-09-22-6/+17
| | | | | |
| | | * | | Whitelisted the bot_commands channel and all staff for other channels.Gravatar Xithrius2020-09-22-1/+3
| | | | | |
| | | * | | Replacing the round function with a format specifier.Gravatar Xithrius2020-09-21-1/+1
| | | | | | | | | | | | | | | | | | Co-authored-by: Dennis Pham <[email protected]>
| | | * | | Replacing the round function with a format specifier.Gravatar Xithrius2020-09-21-1/+1
| | | | | | | | | | | | | | | | | | Co-authored-by: Dennis Pham <[email protected]>
| | | * | | Replacing the round function with a format specifier.Gravatar Xithrius2020-09-21-1/+1
| | | | | | | | | | | | | | | | | | Co-authored-by: Dennis Pham <[email protected]>
| | | * | | Comment updated from "microseconds" to "seconds"Gravatar Xithrius2020-09-21-1/+1
| | | | | | | | | | | | | | | | | | Co-authored-by: Dennis Pham <[email protected]>
| | | * | | Description renamed to avoid verbosity.Gravatar Xithrius2020-09-21-1/+1
| | | | | |
| | | * | | Added period to docstring.Gravatar Xithrius2020-09-21-1/+1
| | | | | |
| | | * | | Created the Latency cog to measure ping in milliseconds.Gravatar Xithrius2020-09-21-0/+57
| | | | | |
| | | * | | Updated dependencies to include aioping.Gravatar Xithrius2020-09-21-114/+133
| |_|/ / / |/| | | |
* | | | | Merge pull request #1167 from Numerlor/eval-escape-pasteGravatar Mark2020-09-21-2/+3
|\ \ \ \ \ | | | | | | | | | | | | Upload eval output with codeblock escapes to pastebin