#dev-log
1 messages ยท Page 47 of 1
I don't understand how this change makes it more precise. Under what circumstances would a channel hidden from @everyone not have at least one staff role with read permissions?
It is probably insignificant, but it strikes me that calling the function 4 times is inefficient. This could all be determined within one pair of iterations, though perhaps at the cost of readability or cleanliness.
Moving this to a separate function like get_staff_channel_count would improve readability of the command's function; it's getting a bit large.
Isn't it a problem that this could contain duplicate channels?
Build 20200530.3 failed
Requested by
GitHub
Duration
00:00:51
Build pipeline
Bot
Did that in f42ddf6, but is this enough and good?
I think there's also a simple way to assert apply_infraction is called with the ban or kick coroutine. Since ban and kick are mocked, they'll always return the same exact mock when you call them.
Build 20200530.5 succeeded
Requested by
GitHub
Duration
00:02:09
Build pipeline
Bot
Build 20200530.6 succeeded
Requested by
GitHub
Duration
00:02:17
Build pipeline
Bot
Because it's now a lot shorter, it should all be on one line instead of being broken up.
Build 20200530.7 succeeded
Requested by
GitHub
Duration
00:02:28
Build pipeline
Bot
The space should also be moved to the infr_message rather than here. Otherwise, there will be a space before the full stop when failed == True.
Build 20200530.8 succeeded
Requested by
GitHub
Duration
00:02:07
Build pipeline
Bot
Build 20200530.9 succeeded
Requested by
GitHub
Duration
00:02:29
Build pipeline
Bot
right, shit, I had an "aghh why won't this work" moment where I swapped the two dicts in the list comp below. Originally I was checking for channels in the everyone_denied that were also in staff_allowed, which doesn't suffer a problem with duplicates. It should be swapped back.
It definitely is, I did it for readability reasons. There may be an approach that finds a better balance between readability and optimization
I don't understand how this change makes it more precise. Under what circumstances would a channel hidden from
@everyonenot have at least one staff role with read permissions?
This was mostly in reference to what @SebastiaanZ said about us potentially cherry picking which channels are visible in lurk mode. If we did that, we would make them read deny to @everyone and read allow to Developers, I imagine. There'd be no reason to have a staff role with read permissions.
This also re...
@MarkKoz
I don't understand how this change makes it more precise. Under what circumstances would a channel hidden from
@everyonenot have at least one staff role with read permissions?This was mostly in reference to what @SebastiaanZ said about us potentially cherry picking which channels are visible in lurk mode. If we did that, we would make them read deny to
@everyoneand read allow to Developers, I imagine. There'd be no reason to have a staff role with read permis...
fa3cd5f Prevent duplicates, and break into function. - lemonsaurus
@SebastiaanZ this has now been addressed, see conversation below.
Build 20200530.10 failed
Requested by
GitHub
Duration
00:02:16
Build pipeline
Bot
I know we had a discussion in the mods team about allowing moderators to see the code jam channels around the time the previous jam kicked off, but I don't quite recall the conclusion to that discussion
Pretty sure we decided against this. It's been fine to handle this in admins only. And yes, this is a silly bit of complexity for such an absolutely inessential feature, but I do think the code has been improved by this, overall.
8562ed2 Don't membership check in an itertools.chain. - lemonsaurus
Build 20200530.11 succeeded
Requested by
GitHub
Duration
00:02:07
Build pipeline
Bot
Build 20200530.12 succeeded
Requested by
GitHub
Duration
00:02:27
Build pipeline
Bot
The lock doesn't have to be created in an asynchronous context. It can and should be assigned in the cog's __init__ method. Then the filter can simply rely on it already existing.
I had a chat with @SebastiaanZ about my comment and I should clarify:
It can and should be assigned in the cog's
__init__method.
The lock must bind to the correct event loop, and so we can create it in the cog's __init__ because discord.py will initialise the event loop before the cog is instantiated. It is therefore safe (and convenient) for us to do so, but that doesn't mean that locks can always be instantiated as soon as possible.
Is the deletion of the return statement intentional?
Build 20200530.13 succeeded
Requested by
GitHub
Duration
00:02:26
Build pipeline
Bot
601ff03 AntiMalware Tests - Added unittest for message ... - MrGrote
9889f0f AntiMalware Tests - Added unittests for deletio... - MrGrote
90d2ce0 AntiMalware Tests - Added unittest for messages... - MrGrote
3913a8e AntiMalware Tests - Added unittest for the embe... - MrGrote
19c15d9 AntiMalware Tests - Added unittest for messages... - MrGrote
Okay, resolved with 0e12ff1.
Build 20200530.14 succeeded
Requested by
GitHub
Duration
00:01:59
Build pipeline
Bot
Build 20200530.15 succeeded
Requested by
GitHub
Duration
00:03:59
Build pipeline
Bot
Connected!
@CharlieADavies @Den4200 I have been working and implemented it.
Relevant Issues
Closes #377
Description
xkcd comics has an API that can be called and JSON response is returned.
JSON has the metadata like image URL, post date, title, etc.
Image URL is embedded into the Discord Embed.
Reasoning
Fetching metadata from the API implementation is suitable for the task.
Did you:
- [x] Join the Python Discord Community?
- [x] If dependencies have been added or updated, run
pipenv lock?...
Build 20200530.1 succeeded
Requested by
GitHub
Duration
00:00:52
Build pipeline
Seasonal Bot
Build 20200530.16 succeeded
Requested by
GitHub
Duration
00:02:30
Build pipeline
Bot
ce5fcda (Banning): Added logging and truncating to corr... - ks129
6ad86ac (Kick Command): Added logging and truncating to... - ks129
80e483a (Ban and Kick): Replaced force reason truncatin... - ks129
ec8cc8b (Ban and Kick): Applied simplification to reaso... - ks129
aad6737 (Mod Scheduler): Added reason truncations to Sc... - ks129
Build 20200530.17 succeeded
Requested by
GitHub
Duration
00:04:34
Build pipeline
Bot
Connected!
Current quick review. Full review tomorrow after testing.
Please refactor your comments. Current style with three - is not our code style. Add comments only when this has any meaning, like special notes etc. but not to just describe what code is doing (like no need to comment on what print hello world do).
This is already int in a dictionary. No need to convert it.
I think everything this should be just in docstring and this should send help message.
Does this even need to make an API request? Discord handles rich embedding of XKCD comics quite well already:

[python-discord/bot] New branch created: kwzrd/improve\-free
Previously, the tag was referencing the Available category. We now have a dedicated read-only channel with instructions, and it makes more sense to link the channel directly.
There is a considerable benefit in the fact that this link is now clickable.

I considered leaving an extra sentence also referencing the category as before, but I felt like it only led to unnecessary ...
Build 20200530.18 succeeded
Requested by
GitHub
Duration
00:02:27
Build pipeline
Bot
Build 20200530.19 succeeded
Requested by
GitHub
Duration
00:02:11
Build pipeline
Bot
Build 20200530.20 succeeded
Requested by
GitHub
Duration
00:02:21
Build pipeline
Bot
795dea3 Add multichannel !purge via commands.Greedy - lemonsaurus
[python-discord/bot] New branch created: multichannel\_purge
@wookie184 I don't see how this would work. We have 100+ channels, how is it supposed to know which ones you want? Are you gonna delete messages from log channels, announcements, staff channels? Do we have to maintain a list of which channels we should purge from?
I think just specifying them is fine for now.
We can now pass in as many channel mentions as we want after any !purge command - for example !purge all 5 #python-general #python-language
Closes #968.
5926f75 Remove a completely unacceptable newline. - lemonsaurus
Build 20200530.22 succeeded
Requested by
GitHub
Duration
00:02:01
Build pipeline
Bot
Build 20200530.23 succeeded
Requested by
GitHub
Duration
00:01:56
Build pipeline
Bot
@lemonsaurus That makes sense, I didn't really think that through fully.
Maybe accepting category names/ IDs as well as channels would allow for clearing from, for example, all topical channels would be possible, but I also agree that just channel names is fine for now, definitely much better than what we had before.
Accepting category IDs wouldn't be too bad, I agree. I don't think I'm gonna do it in #974 though.
No, and it's also a bad idea. Nice catch!
1cc1b38 Oops, add the return back. - lemonsaurus
Build 20200530.24 succeeded
Requested by
GitHub
Duration
00:02:29
Build pipeline
Bot
ce5fcda (Banning): Added logging and truncating to corr... - ks129
6ad86ac (Kick Command): Added logging and truncating to... - ks129
80e483a (Ban and Kick): Replaced force reason truncatin... - ks129
ec8cc8b (Ban and Kick): Applied simplification to reaso... - ks129
aad6737 (Mod Scheduler): Added reason truncations to Sc... - ks129
Build 20200530.25 succeeded
Requested by
GitHub
Duration
00:02:28
Build pipeline
Bot
b258f77 Removing the periodic ping from verification. - lemonsaurus
650e1b9 Merge branch 'master' into remove_periodic_ping - lemonsaurus
1cc1b38 Oops, add the return back. - lemonsaurus
3186188 Merge branch 'master' into remove_periodic_ping - kwzrd
32ce7a6 Merge pull request #971 from python-discord/rem... - kwzrd
[python-discord/bot] branch deleted: remove\_periodic\_ping
Build 20200530.26 succeeded
Requested by
GitHub
Duration
00:03:58
Build pipeline
Bot
Connected!
Could go over channel_counter.items() to avoid the lookup.
It could also be a list comp, but maybe it's complex enough to warrant a loop.
Looks like this checks whether a channel instance is in a set of channel ids.
In fact, I don't really understand why this check is here at all. Under what circumstances will the iterator feed the same channel twice? The comment talks about roles, I'm confused.
Super nit-pick, but since the variable names read so nicely we could do:
if role_can_ready and not everyone_can_ready:
Since they are both bools we don't risk accidentally getting something falsey.
target_channels = ", ".join(channel.mention for channel in channels)
There's a bug which causes it to delete an extra message. It should use ctx.message so it can be sure it deletes the invocation and not just any message matching the predicate.
This is unnecessary. str.join() with a single item will result in the same thing.
You're right. I was concerned that it may be None, but since I explicitly use is in the function, it should be always be a bool. In hindsight, it's misleading to return a bool cause a value of None doesn't indicate one way or another if a role can read.
You're right, it should be using the id. It's here because The role loop is nested within the channel loop. Once it finds a role with read permissions (which can be determined by checking if the channel has been added to the set), it doesn't need to check the rest of the roles for that channel.
OK I see where I went wrong. This should be a break and be inside the role loop.
Actually, just break right after adding to the set. Even easier.
b258f77 Removing the periodic ping from verification. - lemonsaurus
650e1b9 Merge branch 'master' into remove_periodic_ping - lemonsaurus
1cc1b38 Oops, add the return back. - lemonsaurus
3186188 Merge branch 'master' into remove_periodic_ping - kwzrd
32ce7a6 Merge pull request #971 from python-discord/rem... - kwzrd
Build 20200530.27 succeeded
Requested by
GitHub
Duration
00:02:15
Build pipeline
Bot
Build 20200530.28 succeeded
Requested by
GitHub
Duration
00:04:47
Build pipeline
Bot
Connected!
!source acceptdoesn't work - it triggers anInWhitelistCheckFailure. The source command should avoid triggering any checks.- Could you make aliases defined in
alias.pyresolve to their actual commands when used with!source? - Is it possible to make this work for the tag aliases? It could link to the markdown files.
I think this is clearer.
"""Display information and a GitHub link to the source code of a command or cog."""
Please use Pathlib to ensure cross-platform support.
I think the code is already descriptive enough to not warrant such documentation.
Maaaaybe the line number too, but this may end up cluttering the embed. I don't know. Feel free to try it and share some screenshots.
I think maybe is better to add this to footer?
Yes, sounds like that could be better. Could be displayed in the well known format x/y/z.py:123, where the number after the colon is the line number.
Build 20200531.1 succeeded
Requested by
GitHub
Duration
00:01:51
Build pipeline
Bot
Postgres backup completed!
This could go in a separate function to improve readability e.g. get_name_matches().
This could go in a separate function to improve readability e.g. should_send_name_alert()
Since this only really needs the author, the parameter should just directly accept a discord.Member.
Build 20200531.2 succeeded
Requested by
GitHub
Duration
00:02:29
Build pipeline
Bot
Build 20200531.3 succeeded
Requested by
GitHub
Duration
00:02:19
Build pipeline
Bot
I added aliases to the title of command source embed, but I can't display name with what user invoked command. Code will be very hard to follow then.
These review is now addressed.
@MarkKoz Addressed reviews.
Build 20200531.5 succeeded
Requested by
GitHub
Duration
00:02:06
Build pipeline
Bot
ce5fcda (Banning): Added logging and truncating to corr... - ks129
6ad86ac (Kick Command): Added logging and truncating to... - ks129
80e483a (Ban and Kick): Replaced force reason truncatin... - ks129
ec8cc8b (Ban and Kick): Applied simplification to reaso... - ks129
aad6737 (Mod Scheduler): Added reason truncations to Sc... - ks129
The
Usermodel is also created intest_active_infraction_migration.pywith anavatar_hashargument. Presumably this is fine since the tests pass. I think it's working with old migrations which use an older model for theUser.
Yes, since this uses an older migration, it would actually crash without it. So that's by design.
Build 20200531.6 succeeded
Requested by
GitHub
Duration
00:02:27
Build pipeline
Bot
Build 20200531.7 succeeded
Requested by
GitHub
Duration
00:02:24
Build pipeline
Bot
Build 20200531.9 succeeded
Requested by
GitHub
Duration
00:02:12
Build pipeline
Bot
ce5fcda (Banning): Added logging and truncating to corr... - ks129
6ad86ac (Kick Command): Added logging and truncating to... - ks129
80e483a (Ban and Kick): Replaced force reason truncatin... - ks129
ec8cc8b (Ban and Kick): Applied simplification to reaso... - ks129
aad6737 (Mod Scheduler): Added reason truncations to Sc... - ks129
Build 20200531.10 succeeded
Requested by
GitHub
Duration
00:02:21
Build pipeline
Bot
If you're up for it, this could use some tests.
I hate to say this but I'm not really up for this, at least not in the very near future.
If someone else wants to commit some tests for this, you're welcome to. Otherwise, since it's not at all a critical feature and it seems to work, we could probably merge this without tests.
If you insist on tests, I can probably write some in like a week or two when I've freed up some time. Sorry!
b225791 Fix a bad check in get_staff_channel_count. - lemonsaurus
Build 20200531.11 succeeded
Requested by
GitHub
Duration
00:02:25
Build pipeline
Bot
876b484 Add support for bool values in RedisCache - lemonsaurus
[python-discord/bot] New branch created: help\_channel\_rediscache
No, I don't insist. I approved, after all.
Let's still try to use ignore() when feasible. We don't need to search to get the ID for this message, so it's not a problem.
This won't work so well if the decorator is being used more than once simultaneously because they all share the same variable and one decorator could exit earlier than another.
Since you added the ignore_all decorator, this loop is obsolete.
Should use UTC for the times: utcnow and utcfromtimestamp.
Sorry to nitpick, but this is awkward to read since it isn't grammatically correct (should be are since words is plural). I suggest just dropping the is entirely: check_bad_words_in_name.
Build 20200531.12 succeeded
Requested by
GitHub
Duration
00:02:29
Build pipeline
Bot
Looks like channel.purge will return the messages, so you are right - we can just store the messages from the return values here and then use those for the log upload.
Build 20200531.13 failed
Requested by
GitHub
Duration
00:02:09
Build pipeline
Bot
Build 20200531.14 succeeded
Requested by
GitHub
Duration
00:02:08
Build pipeline
Bot
Build 20200531.15 succeeded
Requested by
GitHub
Duration
00:02:11
Build pipeline
Bot
Build 20200531.16 succeeded
Requested by
GitHub
Duration
00:02:29
Build pipeline
Bot
Since the switch to the purge() function, which is much faster, cancelling a clean operation has been broken. There is still a for loop that searches for messages. This is needed to get message IDs and ignore mod log events. All cancel does now is break out of this for loop; it does not stop purge().
self.cleaning is set to False after the loop ends. This causes any other ongoing clean operations to also break out of their loops. Since purge() still gets called, this results in o...
This is fragile but I think it's a decent solution given what you have to work with. It's more of a problem with the design of aliases than with this code. I did want to look into overhauling aliases (one idea was to use decorators on commands to create aliases), but for now, I think this code is OK.
The code looks solid and worked well when tested locally!
[python-discord/bot] branch deleted: multichannel\_purge
Build 20200531.17 succeeded
Requested by
GitHub
Duration
00:04:10
Build pipeline
Bot
Connected!
This parsing can be avoided:
- Implement my other suggestion regarding the tag cache
- Have the converter simply return the tag name
- Make
get_source_linkresponsible for fetching the file path for the tag - In here you will have the original tag name, so no parsing needed!
You need to account for the cog not being loaded.
Does this account for the different styles?
"""Hello"""
vs.
"""
Hello
"""
Build 20200601.1 succeeded
Requested by
GitHub
Duration
00:02:05
Build pipeline
Bot
The !kick command does not work and should be fixed. This is because the active kwarg is passed twice to post_infraction. The error is seen below.

Build 20200601.2 succeeded
Requested by
GitHub
Duration
00:03:03
Build pipeline
Bot
Postgres backup completed!
I do like this feature and want to see it added. If the regex module handles catastrophic expressions well, but re doesn't, then re support needs to be dropped. I am not too concerned about people being mislead by the extended features of regex. However, if possible, using re to check for successful compilation is a good idea. On the other hand, if re can also handle catastrophic expression, then the regex module is redundant.
Regarding execution time, let's keep also keep in...
It's a bad user experience to make them have to invoke the help command again to look at the docstring for !re search. Just copy the docstring over to this one.
I don't like the use of emojis to invoke commands. Emojis are general-purpose, so someone could unintentionally invoke this command.
"""Commands for exploring the mysterious world of regular expressions."""
test is not a clear name for the parameter. Perhaps simply named it string?
This parameter should also be a kw-only arg so it "consumes all" if the string has spaces. This means the pattern needs to be in quotes if it has spaces, but I think this is the best option we have.
I'm not sure on this idea, but you could let get_source_link raise an exception when the cog isn't loaded (though perhaps something more specific than the AttributeError on None that it would normally raise) and then catch that in source_command. What do you think about this? Would that be clearer or just more confusing?
I refactored this now. I found that converter already makes sure is cog there, so no check is required in function.
Build 20200601.3 succeeded
Requested by
GitHub
Duration
00:02:22
Build pipeline
Bot
I was looking through the code of silencer.py and I found this:
With this approach, in case the channel was unsilenced and re-silenced back, it might get unsilenced by this timer. This is a relatively rare occurrence as this would have to happen within...
Can I try to work on this?
This updates the lesbian logo in the animated directory, to address the concerns of a user in #meta.
I don't have the tools or knowledge to create the GIF - there are tons of free tools out there, but most of them seem limited in resolution, frame rate, or watermarking.
If anyone has any idea what to use for that, though, I'm happy to give it a stab.
It bothers me that the formatting of the svg file is a bit messy now. A simple way would have been to copy another icon that has 5 stripes, open the svg in a text editor, and change the fill colour of the stripes. That's how I made most of the icons once I had the "template" for each number of stripes.
For the GIF, I used photoshop. That's what the PSD is for. However, I understand Photoshop is not free.
I've updated the SVG as you suggested - I noticed that the way the two outer colours were shown in the other logos didn't match what I did, so I've fixed that as well.
I don't have Photoshop, but I do have Affinity Photo - maybe I can do it in that.
For the record, though, there's no PSD that I can see.
Yeah we don't have the PSDs in the repo anymore.
Closes #977
As described in #977 using asyncio.sleep isn't a good way to check if the silence duration has passed, since in some cases, it can cause channels to get prematurely unsilenced.
This solves that issue by using Scheduler from bot.utils.scheduling which has the ability to cancel on-going scheduled tasks. This also means that there can be a message on !unsilence saying that the channel is currently not silenced, which provides much better feedback than not sending anyth...
Build 20200601.4 failed
Requested by
GitHub
Duration
00:00:52
Build pipeline
Bot
There's a PSD in @MarkKoz's PR, #18 - should I use this, or were there changes between then and now?
That's alright - I see what you mean, Affinity has made it significantly more complicated. I'll do that.
I don't mind making the gif if your tool is giving you trouble.
Unfortunately, it turns out the Affinity suite doesn't actually support creating animated GIFs. Yikes.
If you wouldn't mind, I'd appreciate that.
I do not understand what you are trying to imply by "should be just in docstring" & I have read the other comments ]will fix them
Here it is. I didn't use git cause it'd take a while to clone the repo. I think the frame timings in the PSD are incorrect. I ended up opening the GIF instead and editing that.

Oh, nicely done \o/
Do you want to PR it to my fork, or should I just commit it here for you?
I forgot about the web interface, sorry. Unfortunately, I cannot upload it to your fork because File uploads require push access to this repository. I don't mind you just commit it yourself. Trying to take the path of least resistance.
Okay, I've done that. That should be everything, right?
Thank you! Sorry for giving you trouble about the SVG.
Not a problem at all, you were absolutely right!
[python-discord/branding] New branch created: pride\-banner\-png
Seasonalbot only supports PNG for simplicity.
Please squash when you merge, if possible. I did this via web interface, hence two commits.
[python-discord/branding] branch deleted: pride\-banner\-png
I thought about that. Is there any way to put the pattern or the string inside a code block?
I am not sure. I think discord.py does not consider backticks to be the same as quotes, which means you will need to parse all arguments yourself from a single string to accomplish this. But don't take my word for it, double check this.
Build 20200601.5 failed
Requested by
GitHub
Duration
00:00:50
Build pipeline
Bot
Build 20200601.6 succeeded
Requested by
GitHub
Duration
00:02:14
Build pipeline
Bot
Postgres backup completed!
[python-discord/site] Pull request review submitted: #356 No longer accept or track \`avatar\_hash\`
This will be a critical merge that is interdependent with the bot.
Build 20200602.1 succeeded
Requested by
GitHub
Duration
00:02:26
Build pipeline
Bot
[python-discord/site] branch deleted: remove\_avatar\_hash
7230449 Remove all sending of avatar_hash. - lemonsaurus
8e0cdb2 Fix failing tests related to avatar_hash - lemonsaurus
b7620e7 Merge branch 'master' into stop_sending_avatar_... - lemonsaurus
d0c0836 Merge branch 'master' into stop_sending_avatar_... - SebastiaanZ
a30917b Merge pull request #962 from python-discord/sto... - SebastiaanZ
[python-discord/bot] branch deleted: stop\_sending\_avatar\_hash
Build 20200602.1 succeeded
Requested by
GitHub
Duration
00:04:08
Build pipeline
Site
Build 20200602.2 succeeded
Requested by
GitHub
Duration
00:04:05
Build pipeline
Bot
Connected!
I'm going to take a stab at this. It led to some serious issues last week, and I think we should tackle this relatively soon-ish.
I'm not quite sure about what the best implementation for this would be, yet. If we go with a global lock and making sure the "deletion context"-specific infractions only happen once, the infractions from other contexts will still go through after the lock is released. Granted, this should already reduce to a single fail/success message per context, but I don't ...
Adds a !modmail tag, useful for when a member of the community asks how to contact staff.
Build 20200602.3 failed
Requested by
GitHub
Duration
00:00:45
Build pipeline
Bot
Build 20200602.4 succeeded
Requested by
GitHub
Duration
00:02:26
Build pipeline
Bot
I was unsure whether mentioning the roles directly pings them every time the command is invoked or not, so I left it as plain text for now.
@neonsea Tags is in embeds and in embeds, mentions doesn't ping anything/anyone.
Okay, thanks, changed to direct mentions.
Build 20200602.5 succeeded
Requested by
GitHub
Duration
00:02:30
Build pipeline
Bot
Issuing an help command like !help ' (a single single quote character as the help query) results in the following warning:
2020-06-02 21:52:38 | root | WARNING | Applied processor reduces input query to empty string, all comparisons will have score 0. [Query: ''']
The same goes for at least the queries:
[Query: 'ยด']
[Query: '"']
[Query: '`']
The warning message hints at that such a "query" will be reduces to an empty string and, in turn, to a comparison score of 0. ...
0571baa Convert the roles field on the user model from ... - j03b
fac0d15 Add migrations to switch user field to array - j03b
044fb26 Add validator to ensure roles passed to user mo... - j03b
967ac5c Remove primary key from user serializer - j03b
9c439d6 Alter signals to handle OAuth2 with groups and ... - j03b
[python-discord/site] New branch created: joseph/change\-roles\-field\-to\-postgres\-array
After observing incredibly high response times for the GET /bot/users we investigated how Django was querying the Postgres tables relevant and found that for every sync we make 59k queries to the database across tables with over 100,000 rows. We experienced errors since uWSGI was killing workers after 30 seconds and the bot was unable to sync until we removed user data in a similar fashion to our monthly data reviews.
This PR removes the api_user_roles table and converts the roles fiel...
Build 20200602.2 succeeded
Requested by
GitHub
Duration
00:02:00
Build pipeline
Site
Build 20200603.1 succeeded
Requested by
GitHub
Duration
00:04:01
Build pipeline
Bot
Connected!
Thanks for taking the time to do this after it was supposed to be a simple fix. Code looks and works great now.
I feel like we can also add a timestamp check to is_valid_user_id to be consistent with the is_valid_user_id method. This should be straight forward with the util function discord.py provides, but then again this form of validation is not very important
Do you have an example of a token like that?
Unsurprisingly I had no success finding any tokens online and all tokens I have available are direct timestamps but also quite new. Still, while not a big issue, this does potentially bring a few false positives like the DISCORD_EPOCH - TOKEN_EPOCH edge case which is invalid in the "new" format
I think this could just be used directly where its single use is with the two straight forward expressions; in my opinion it abstracts a bit too much unnecessarily.
As for the issue with this if it stays like it is, take_action's docstring nor the name of this function suggest that a message is sent so it may be confusing if the docstring or the code here is not read.
The image explaining the token format has an old token. I couldn't find any other old tokens. I think it's better to have false positives than false negatives, and this really is an edge case. On the other hand, old format tokens are going to be infrequent so we could just stop checking for them.
I feel like we can also add a timestamp check to is_valid_user_id to be consistent with the is_valid_user_id method.
This is impossible/redundant, depending on how you look at it. The snowflake format treats a timestamp of 0 as the discord epoch (i.e. timestamps are relative to the epoch). Since it's being parsed as an unsigned integer, the timestamp will always be at least 0.
The snowflake format treats a timestamp of 0 as the discord epoch (i.e. timestamps are relative to the epoch).
Ah right didn't consider that we do not have anything to check against (except limiting high values)
9b3ab7d Token remover: remove the delete_message func... - MarkKoz
05616ae Refactor the Help command. - mathsman5133
87f9fdd Minor formatting changes to align with current ... - mathsman5133
5ebb87d Add a special case for when the help command in... - mathsman5133
79d5b2d Few changes to keep formatting same as current - mathsman5133
d8384b2 Show a maximum of 8 commands per page rather th... - mathsman5133
Build 20200603.2 succeeded
Requested by
GitHub
Duration
00:02:14
Build pipeline
Bot
Postgres backup completed!
Thanks for doing this, @neonsea - I appreciate it!
On the other hand, if
recan also handle catastrophic expression, then theregexmodule is redundant.
reeasily freezes the interpreter if you run the example linked by @j03b
So I'm going to userejust for compatibility validation.
I think this would be better:
| hello123456world
| 0: 123456
| 1: 56
just showing the text might be ambiguous if a substring appears multiple times in a string.
However, we still have to figure out how to display zero-width matches :thinking:
I've been investigating regex a bit more and have found it is still very much susceptible to DoS attacks and should not be used with arbitrary user input.
I'll attach an example:
>>> import regex
>>> regex.match("^(([a-z])+.)+[A-Z]([a-z])+$", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa!")
... hang ...
I've been investigating
regexa bit more and have found it is still very much susceptible to DoS attacks and should not be used with arbitrary user input.I'll attach an example:
>>> import regex >>> regex.match("^(([a-z])+.)+[A-Z]([a-z])+$", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa!") ... hang ...
>>> regex.match("^(([a-z])+.)+[A-Z]([a-z])+$", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...
Good point, though, I'll add that as well.
Alternatively, we can use snekbox for execution, leaving DoS and other similar attacks out of the equation. Would require some effort to move the code there, though.
Build 20200603.3 succeeded
Requested by
GitHub
Duration
00:02:21
Build pipeline
Bot
async def match_plus_command(self, ctx: Context, pattern: ExtendedRegex, *, test: str) -> None:
async def match_command(self, ctx: Context, pattern: Regex, *, test: str) -> None:
TODO:
- [ ] somehow show zero-width groups (right now they just don't show up)
- [ ] support named groups (right now they show up as anonymous groups)

- [ ] possibly move the matching/searching to snekbox
Build 20200603.4 succeeded
Requested by
GitHub
Duration
00:02:26
Build pipeline
Bot
Description
Right now the .prideavatar command works with all avatar image formats, but only produces PNG images. The proposed change would modify this command to produce GIFs if the avatar format is a GIF. This change could potentially be implemented for other commands that modify the avatar, however I haven't tried any others.
Reasoning
It would be nice if commands that formatted your avatar worked completely with all avatar formats (especially ones which you need to pay ext...
Good suggestion. In fact, I was just thinking about this issue the other day.
I thought I had something that worked, but turns out GIFs in PIL decay to Image as easily as c-arrays decay to pointers :/ (Pretty much any conversion from the original file will turn the GIF into an Image). So this might take me a little longer than I thought.
Since you're working on it, I'll assign you to the issue.
I suggest using Scheduler inside cog, not with other class. One example is reminders.
Postgres backup completed!
Build 20200604.1 failed
Requested by
GitHub
Duration
00:01:02
Build pipeline
Bot
Note that this is still a WIP and not ready for review yet. I intentionally opened the PR as a draft to test against the CI while wrapping it up.
Build 20200604.2 failed
Requested by
GitHub
Duration
00:00:57
Build pipeline
Bot
Build 20200604.4 succeeded
Requested by
GitHub
Duration
00:02:33
Build pipeline
Bot
I specifically requested a review from @MarkKoz and @lemonsaurus since they were the most involved with the discussion of these changes a few weeks ago.
This change isn't directly related to the PR, but I think it's a good idea to ensure the correct number of pages are being created for the pagination tests, as it's relevant to all of them IMO. If needed, I can remove this.
Connected!
I'm somewhat undecided about whether it would be better to raise a RuntimeError or just truncate the remaining characters if add_line() contains a single word in line that contains more than scale_to_size characters. Since it would not occur from regular usage at all, I'm leaning towards an exception but I could definitely be persuaded otherwise.
I suggest using Scheduler inside cog, not with other class. One example is reminders.
I thought this was a bit cleaner, but yeah sure, I can do that. Another way would be to add this class to moderation/scheduler.py together with the InfractionScheduler and simply import it from there, so that the code of silence.py isn't that long.
So which approach should I ...
@ItsDrike silence.py is good enough for this. The only use case for this is silence. Inside scheduler.py is InfractionScheduler, that is used by many files.
[python-discord/bot] Pull request review submitted: #981 Improve LinePaginator to support long lines
This almost works. From testing with the infraction search command, I found some blank pages. The first page was blank and so was a page between the start of an infraction and its continuation page.
I don't find using \ to be particularly readable. I think it's better to do one of the following:
remaining_words = ...
return " ".join(reduced_words), remaining_words
# alternatively...
return (
...,
...,
)
This isn't actually being used anywhere inside the function. I think it's supposed to be used at line 204.
This is OK and simple to implement. However, I do wonder if we can come up with a cleaner way to convey this information e.g. putting it in the footer.
In a recent PR, we merged a commit that changed the order in which our members are notified of their infraction and we actually the infraction: Instead of sending the DM first and applying the infraction after, we now apply the infraction first and try to DM the member after.
However, in the case of ban/kick infractions, this means that we try to send a DM to a member that has just been kicked off the server. That will obviously not work, as the bot can only send DMs to users it shares a s...
Build 20200604.5 succeeded
Requested by
GitHub
Duration
00:02:50
Build pipeline
Bot
Alright, I'll go with truncation then and update the docstring accordingly.
Hmm, good point. I think I'll go with the first approach then. I personally find the current approach to be decently easy to read, but I agree that it would improve readability with something like this (as suggested above):
remaining_words = " ".join(remaining_words) if len(remaining_words) > 2 else None
return " ".join(reduced_words), remaining_words
Oops, good catch. I had intended to add it there but forgot to.
From testing with the infraction search command, I found some blank pages. The first page was blank and so was a page between the start of an infraction and its continuation page.
Hmm, that's odd. I didn't pick it up in my initial local server tests of the implementation but after clearing out the infraction history and adding a few pages worth of infraction notes, I did see the missing blank page at the start. I'll have to look further into the cause and see if I can add some additional...
I'm mostly just not a fan of truncating at specific point in the message and potentially cutting something off, but in the case of a single continuous word that exceeds scale_to_size it likely wouldn't cut off anything important.
I'm just realizing that this has a bit of a logical flaw: it doesn't account for the space characters. I'll have to adjust this approach slightly.
Build 20200605.1 succeeded
Requested by
GitHub
Duration
00:03:56
Build pipeline
Site
Postgres backup completed!
758edf0 Fix AttributeError for category check - MarkKoz
[python-discord/bot] New branch created: bug/backend/stats\-category\-check
Not all channels will have a category attribute. This may be fine in production, but it does cause periodic errors when testing locally.
Build 20200605.1 succeeded
Requested by
GitHub
Duration
00:02:14
Build pipeline
Bot
[python-discord/bot] Pull request review submitted: #981 Improve LinePaginator to support long lines
Apart from the stuff the two of you have commented on, I don't see anything particularly offensive here. I haven't done a feature test of this yet.
One thing I'd like to mention though @aeros is that the git stuff here seems a little hasty. I'd like to see a fuller PR description (embedding images is great when it's a bot feature), I'd like to see commit messages that describe the commits, and I think your first commit here is much bigger than it probably should be.
I don't think you s...
I think \ should be avoided in 99% of cases. I also prefer one of @MarkKoz's suggestions here.
You're a bit generous with the line endings here (it fits on a single line that will only reach column 70), but I don't particularly mind.
56fabe7 Remove very generous newline in role validator - j03b
Build 20200605.3 succeeded
Requested by
GitHub
Duration
00:02:17
Build pipeline
Site
0571baa Convert the roles field on the user model from ... - j03b
fac0d15 Add migrations to switch user field to array - j03b
044fb26 Add validator to ensure roles passed to user mo... - j03b
967ac5c Remove primary key from user serializer - j03b
9c439d6 Alter signals to handle OAuth2 with groups and ... - j03b
[python-discord/site] branch deleted: joseph/change\-roles\-field\-to\-postgres\-array
Build 20200605.4 succeeded
Requested by
Joseph Banks
Duration
00:04:17
Build pipeline
Site
I'll work on this. As discussed with Mark yesterday, I'll revert back to old behavior of sending a DM first and trying to apply the infraction later. This means that we may send a DM and have the infraction fail, but that's impossible to avoid for kicks/bans and we'd need a considerable refactor to specialize the order based on the infraction type.
The latter may still be something we'd like to do, but I think we should fix this first and look at refactoring the infraction flow later. Ther...
3c305da Send infraction DM before applying infraction - SebastiaanZ
[python-discord/bot] New branch created: sebastiaan/issues/982\-infraction\-dm\-order
I've "reverted" the change that reversed the order of DM'ing a user about their infraction and applying the actual infraction. A recent PR reversed the order to stop us from sending DMs when applying the
infraction failed.
However, in order to DM a user, the bot has to share a guild with the recipient and kicking them off of our server first does not help with that. That's why I reverted the change and reverted some other minor changes made in relation to this change.
This PR closes #9...
Build 20200605.2 succeeded
Requested by
GitHub
Duration
00:02:31
Build pipeline
Bot
Build 20200605.3 succeeded
Requested by
GitHub
Duration
00:02:19
Build pipeline
Bot
Tested locally and successfully DMs users
[python-discord/bot] branch deleted: sebastiaan/issues/982\-infraction\-dm\-order
@ks129 PR looks good, but can you edit the body to be a bit more descriptive?
This looks good and I'm happy to approve. The new information will be nice to have. I agree that tests aren't critical for this feature, and we can add them later on, if we want to.
I've done a code review & tested but I haven't yet had the time to go through all the conversation here to make sure everything has been resolved, and I don't feel comfortable merging it without doing that first. Feel free to merge though - I'll get around to it later tonight if no one does by then.
@j03b Is now description better?
Build 20200605.4 succeeded
Requested by
Joseph Banks
Duration
00:04:24
Build pipeline
Bot
Connected!
I've made a couple of adjustments, but yeah, that's better. PR body clarity is quite important for searching down the line & understanding full reasoning behind a change.
Currently, the flow with which we register infractions may take up to four requests to our API. I'd like to propose some changes that should bring this number of API requests down to one in most situations. This is especially handy in situations where a lot of infractions are issued in a really short time frame, such as during a raid, to not overload our API.
Note: The changes proposed in this issue also require changes to our API endpoints
Background
Let's take a "mute" infract...
7230449 Remove all sending of avatar_hash. - lemonsaurus
8e0cdb2 Fix failing tests related to avatar_hash - lemonsaurus
795dea3 Add multichannel !purge via commands.Greedy - lemonsaurus
5926f75 Remove a completely unacceptable newline. - lemonsaurus
b7620e7 Merge branch 'master' into stop_sending_avatar_... - lemonsaurus
Build 20200605.5 succeeded
Requested by
GitHub
Duration
00:02:09
Build pipeline
Bot
aa46d01 Clean up channel counts and add staff channels. - lemonsaurus
171c1e2 Adding staff member count to !server. - lemonsaurus
73e07df Merge branch 'master' into staff_count_server - lemonsaurus
89752c5 More precise staff-channel check. - lemonsaurus
f59e634 Fix busted test_information test. - lemonsaurus
[python-discord/bot] branch deleted: staff\_count\_server
Build 20200605.6 succeeded
Requested by
GitHub
Duration
00:03:56
Build pipeline
Bot
Connected!
I'm going to close this for the time being due to inactivity and lack of communication.
Feel free to re-open if you feel like finishing this in the future.
699760a Refactor help_channels.py to use RedisCache. - lemonsaurus
This PR should ensure that help channel-related data is persisted across bot restarts.
To achieve this, we make two changes.
RedisCache now supports Booleans as values
For the unanswered cache, we need to know whether or not a channel has been answered, and so it was relevant to store a boolean in the RedisCache. There was no support for this, so I added some. It seems like a feature we might want in the future for other things anyway.
Refactoring help_channels.py
The rest is...
Build 20200605.7 succeeded
Requested by
GitHub
Duration
00:02:30
Build pipeline
Bot
Looks good, happy to approve.
Build 20200605.8 succeeded
Requested by
GitHub
Duration
00:02:23
Build pipeline
Bot
I agree with joe, by the way: the more relevant information you put into the PR description, the easier it'll be for us to review.
Build 20200606.1 succeeded
Requested by
GitHub
Duration
00:04:01
Build pipeline
Bot
Connected!
Thanks for the reviews Mark and Leon. I should have time to address the feedback in the next few days.
I'd like to see a fuller PR description (embedding images is great when it's a bot feature)
I'm usually in the habit of keeping the PR description minimal and taking the time to explain features in something like a "What's New" document (since that's more visible, typically). But since we just have the PR descriptions here, I'll try to put more effort into that in the future.
I...
Is it feasible to store it as 0/1 instead? Then it becomes bool(int(value)). I prefer that simplicity over dealing with actual strings and relying on a separate method.
Something irks me about storing timestamps as strings. Using a POSIX timestamps (i.e. relative to the epoch) seems more reliable. By the way, should this be in UTC or does it not really matter as long as it's also decoded the same way?
Use an if-else instead of returning early. That is slightly easier to follow.
if await self._unsilence(ctx.channel):
await ctx.send(f"{Emojis.check_mark} unsilenced current channel.")
else:
await ctx.send(f"{Emojis.cross_mark} current channel is not silenced.")
# Because `self.unsilence` explicitly cancels this scheduled task, it is shielded
Using wait_until just complicates things cause it requires a datetime. No reason for that here; you can just stick to asyncio.sleep and pass the minutes (it's more convenient to convert minutes into seconds here rather than outside).
3845d01 Add snekbox to the Docker compose file - MarkKoz
[python-discord/bot] New branch created: snekbox\-compose
A feature relies on it so I don't see why it contributors should have to set up snekbox separately. It's also currently undocumented so this will help until some docs are written.
Build 20200606.2 succeeded
Requested by
GitHub
Duration
00:02:09
Build pipeline
Bot
I think instead suppressing this should use try-except with some logging.
Maybe should better to use just get and make None check instead first contains and then get.
Postgres backup completed!
@aeros
Makes sense it would be at odds with the cpython workflow.
Yeah, we neither squash, nor keep a changelog document, so commits and PR bodies are our opportunity to present the changes to the reviewers.
You are also welcome to force push to your feature branch here, although don't do it after opening your PR unless you have a very good reason, since it messes with the reviews
I disagree. We want to delete a mapping (channel -> claimant) that may not exist, so we either delete (goal accomplished) or we observe that it did not exist in the first place (goal accomplished). The latter situation is less likely now that we're using caching, but we're okay with it happening here. The goal is to not have the mapping anyway.
I agree; this is a potential race condition, as both the contains check and the get action are awaited. If another task "runs" after the contains was requested from Redis but before get is request from Redis, it could change the state we've just checked for.
Using a POSIX timestamps (i.e. relative to the epoch) seems more reliable
I don't really mind either approach, but I'm fine with changing it to do this.
By the way, should this be in UTC
I can't see that it should matter. Can you think of an edge case where it would?
I think we use UTC based time everywhere in the bot, it would be nice for consistency and in case if debugging.
sure, but we're still turning that int into a string to store it in redis. But it might remove the reliance on strtobool, so I guess it'd be fine.
That's not true; we both use datetime.datetime.now and datetime.datetime.utcnow and even in this very extension, datetime.datetime.now is used. Both return naive datetime objects without tz information and they both currently return the same time. Granted, the latter could change if were to change the local time settings of the VPS.
I could change these all to utcnow since they are more consistent.
Sentry wants us to upgrade. I'm inclined to indulge it.

There is a security alert that asks us to upgrade Django to 2.2.13 today, so let's get that done.

Maybe a beach ball for the o in code, a parasol, that sort of thing?
I'll give it a try today.
The Game Jam is over, and we need to replace the banner on the front page with a new Summer Code Jam banner.
This banner doesn't exist yet, but will be created in https://github.com/python-discord/branding/issues/52
Once that's done, I'll handle this.
Sentry has an integration for aiohttp, which will give us more relevant data collection for this repo to Sentry. I'll add this today.
Sentry is asking us to add integrations for these two tools, which will help give us more precise and interesting data in our Sentry events.
I can see no reason why we shouldn't, so I'll handle this today.

Build 20200606.3 failed
Requested by
GitHub
Duration
00:00:59
Build pipeline
Bot
Build 20200606.4 failed
Requested by
GitHub
Duration
00:02:00
Build pipeline
Bot
Build 20200606.5 failed
Requested by
GitHub
Duration
00:02:09
Build pipeline
Bot
Build 20200606.6 succeeded
Requested by
GitHub
Duration
00:02:07
Build pipeline
Bot
@MarkKoz It should be fixed now
7230449 Remove all sending of avatar_hash. - lemonsaurus
8e0cdb2 Fix failing tests related to avatar_hash - lemonsaurus
aa46d01 Clean up channel counts and add staff channels. - lemonsaurus
171c1e2 Adding staff member count to !server. - lemonsaurus
73e07df Merge branch 'master' into staff_count_server - lemonsaurus
Build 20200606.8 succeeded
Requested by
GitHub
Duration
00:02:13
Build pipeline
Bot
Interesting how different opinions we have on this. My approach would have been isoformat and fromisoformat using UTC, the string representation requires importing dateutil which is fine of course, but it still feels like an extra step (and I personally don't know what str(dt_instance) looks like at all).
I agree that this is a nice use case for suppress, I do not see the need to log whether the key existed or not since it doesn't affect any logic further down the line.
93be87c Enable the 'redis' / 'aiohttp' Sentry integrations - lemonsaurus
Build 20200606.9 succeeded
Requested by
Leon Sandรธy
Duration
00:03:38
Build pipeline
Bot
Connected!
0169319 Bump django from 2.2.11 to 2.2.13 - dependabot[bot]
Bumps django from 2.2.11 to 2.2.13.
Commits
8093aaa [2.2.x] Bumped version for 2.2.13 release.
07e59ca [2.2.x] Fixed CVE-2020-13254 -- Enforced cache key validation in memcached ba...
6d61860 [2.0.x] Fixed CVE-2020-13596 -- Fixed potential XSS in admin ForeignKeyRawIdW...
7e1084e [2.2.x] Added release date for 2.2.13.
2b69680 [2.2.x] Refs #31485 -- Backported jQuery upgrade to 3.5.1.
8301bc9 [2.2.x] Fixed E128, E741 flake8 warnings.
c7bab8d [2.2.x] Fixed ...
[python-discord/site] New branch created: dependabot/pip/django\-2\.2\.13
Build 20200606.1 succeeded
Requested by
GitHub
Duration
00:02:14
Build pipeline
Site
Build 20200606.10 succeeded
Requested by
GitHub
Duration
00:02:19
Build pipeline
Bot
Overall I think this is a good idea in the few edge cases this could happen in, just a few points.
The module had almost full direct coverage before, so I think it'd be good to include tests for the new branches and the method and the previous tests checked against the new behaviour.
Also, make sure to run lint and tests locally to keep the history clean
I feel like it would look better if the cancel task came before or after the .remove_channel and .discard, as those do the same job and make sense to be together
Would was not be more fitting here?
[python-discord/seasonalbot] New branch created: sentry\_aiohttp
This PR makes two small changes:
- Adds the AioHttpIntegration to the
sentry_sdk.initcall - Bumps all versions in the lockfile.
We're bumping the versions because Sentry is complaining that we're not using the latest version of its sdk.
I've tested this commit, and the bot still runs fine, but I didn't test it very thoroughly. Feel free to do a quick feature review of this if you're reviewing.
Closes: #417
Build 20200606.1 failed
Requested by
GitHub
Duration
00:00:54
Build pipeline
Seasonal Bot
Build 20200606.2 succeeded
Requested by
Joseph Banks
Duration
00:03:35
Build pipeline
Site
Correct me if I'm wrong, but why are we using suppress here? If a key that does not exist is requested to be deleted in Redis it should not raise a KeyError, in the RedisCache docs that @lemonsaurus wrote it states that deleting non-existent keys will be silent.
Why should it be a class? Isn't it just doing the same thing in a longer approach?
Build 20200606.11 succeeded
Requested by
GitHub
Duration
00:02:14
Build pipeline
Bot
[python-discord/public-stats] branch deleted: dependabot/npm\_and\_yarn/websocket\-extensions\-0\.1\.4
[python-discord/public-stats] New branch created: add\-linting
Add a GitHub action to lint with ESLint and Flake8 on PR or push.
e34ccca Adjust flake8 configuration and remove violations - j03b
c89b114 GitHub actions screamed because I manually inst... - j03b
[python-discord/public-stats] branch deleted: add\-linting
I've looked around and found the following:
It's definitely built for aiohttp server, mentioning things like REMOTE_ADDR, all the tests of it are from a server side so I don't think this is necessary.
This PR should just bump the versions.
Alright, I can do that, but I've noticed you replaced ctx with callback, should I just pass lambda: ctx.invoke(self.unsilence) or should I only go with ctx.invoke and passing the self.unsilence from _scheduled_task or did you have something else in mind?
Pass in ctx.invoke(self.unsilence) without awaiting it. ctx.invoke is a coroutine function, which means it returns a coroutine object. A coroutine object is awaitable, hence satisfying the annotation t.Awaitable. Perhaps coroutine is a better name than callback but I think it's clear enough either way.
Yes but that will produce RuntimeWarning if I unsilence prematurely since it won't be awaited
The above was just an example from a different module, not as a direct suggestion.
I think the names are fine with how they are now if you don't want to change the structure, so just need to adjust the syntax and add a docstring
Oh, that's clever, so should I go with that, or as @Numerlor said, keep it as it was and only turn it into a class?
Sorry, I forgot what I was looking at for a second ๐ . You don't need to pass a coroutine. This would only really be beneficial if you needed to support different coroutines, as was the case in the help channel cog.
Build 20200606.12 succeeded
Requested by
GitHub
Duration
00:02:10
Build pipeline
Bot
Build 20200606.3 succeeded
Requested by
Leon Sandรธy
Duration
00:03:31
Build pipeline
Site
Postgres backup completed!
Adding the scheduler was a good idea for this feature. I've tested everything out and it all seems to work. Thanks!
Missing a bit of coverage, specifically in _scheduled_task. I'm not too concerned about it though.
Markdown is not escaped properly in some docs

Illustrated in the 2nd to last line
Build 20200607.1 failed
Requested by
GitHub
Duration
00:00:53
Build pipeline
Bot
Build 20200607.2 succeeded
Requested by
GitHub
Duration
00:02:13
Build pipeline
Bot
Build 20200607.3 succeeded
Requested by
GitHub
Duration
00:02:14
Build pipeline
Bot
[python-discord/django-simple-bulma] Issue opened: #46 Alternative variables dict in BULMA\_SETTINGS
In some cases, a website will want to have two themes, e.g. a dark theme and a light theme. To do this while using this plugin is tricky because all the scss variables are compiled at startup. But here's what we can do:
- If an
alt_variablesdict is present inBULMA_SETTINGS, we compile two css files,bulma.cssandbulma_alt.css - We create a template tag for adding this other css file as well, something like
{% bulma_alt %}
Now the client can simply add this second dict of v...
There's been some requests for a dark theme, and we came up with a feasible way this could be implemented.
First, let's solve the actual theming on django-simple-bulma instead of here. I've created an issue for this, and until this issue is solved, this issue will be blocked.
https://github.com/python-discord/django-simple-bulma/issues/46
Second, we just create an alternative theme by altering the variables passed into BULMA_SETTINGS, and then ensuring we have the right bulma class...
09a1b52 Summarize over time frames - j03b
[python-discord/public-stats] New branch created: summarize\-to\-nice\-time\-frames
This summarises over time frames leading to nicer consistent interval instead of like "1 hour and 50 minutes".
There are a other few UX changes like expanding the bars on in use help channel to fit the interval so they have a more hoverable radius. As well as this the point hover radius has increased so the cursor does not have to touch a line as closely to get a tooltip trigger.
On the Python side of things a huge removal of duplicated code has been done, docstrings have been rewritten...
[python-discord/public-stats] branch deleted: summarize\-to\-nice\-time\-frames
[python-discord/branding] New branch created: pride\-black
I also created an SVG for the banner and used it to clean up the pride and evergreen banners.
[python-discord/public-stats] New branch created: caching
This PR achieves two forms of caching:
- Assign correct cache control headers to force downstream cache systems to retain response data
- Add an internal cache for graphite queries to ensure that data is cached for a maximum of 300 seconds until a new query is run, both improving speed and resource utilisation.
[python-discord/branding] branch deleted: pride\-black
aa46d01 Clean up channel counts and add staff channels. - lemonsaurus
171c1e2 Adding staff member count to !server. - lemonsaurus
73e07df Merge branch 'master' into staff_count_server - lemonsaurus
89752c5 More precise staff-channel check. - lemonsaurus
f59e634 Fix busted test_information test. - lemonsaurus
Build 20200607.4 succeeded
Requested by
GitHub
Duration
00:02:18
Build pipeline
Bot
Build 20200607.5 succeeded
Requested by
GitHub
Duration
00:03:53
Build pipeline
Bot
Connected!
Build 20200607.1 failed
Requested by
Leon Sandรธy
Duration
00:01:56
Build pipeline
Site
Build 20200607.2 succeeded
Requested by
Leon Sandรธy
Duration
00:03:51
Build pipeline
Site
Previously tracked here: https://github.com/python-discord/organisation/issues/255
Basic proposal
Recently, we have introduced a new #incidents channel, which now hosts all incident reporting from the @Helpers+ team. Moderators are encouraged to use 3 status emojis to signal their involvement, if any, with the incident at hand:

To make things easier for moderators, ...
Postgres backup completed!
This is a draft PR to action #992.
Incidents automation
I'm opening a draft super early because I want to keep a checklist here to track my progress. Please do not pay extensive attention to the diff until taken out of draft status (but feel free to talk to me if you see me do something stupid).
Progress
- [x] Add incident signaling emojis to the emoji server
- [x] Register new emojis in the config & load them into constants at runtime
- [x] Create an
#incidentschannel in...
Build 20200608.1 succeeded
Requested by
GitHub
Duration
00:02:08
Build pipeline
Bot
We've discussed some minor updates to the interface in the dev-core channel.
When a report is created the investigating icon <img src="https://cdn.discordapp.com/emojis/714224190928191551.png?v=1" height="15" style="vertical-align: middle;"/> is added as a reaction to the report.
<img width="921" alt="Screenshot 2020-06-09 at 00 12 26" src="https://user-images.githubusercontent.com/20439493/84089052-e7d01480-a9e5-11ea-943e-933df44c4c81.png">
Once a moderator clicks this reaction to m...
Build 20200609.1 succeeded
Requested by
Joseph Banks
Duration
00:03:53
Build pipeline
Bot
Connected!
378ef81 Help channels: fix claim timestamp being local - MarkKoz
62cb3f7 Help channels: add a function to get in use time - MarkKoz
04b37cd Help channels: add a function to schedule coold... - MarkKoz
b49f3e5 Help channels: use cache to remove cooldowns or... - MarkKoz
be78a86 Help channels: revise inaccurate comment - MarkKoz
Build 20200609.2 succeeded
Requested by
GitHub
Duration
00:02:11
Build pipeline
Bot
Thoughts of changing this the following?
if unaswered:
...
elif unanswered is not None:
...
I made a change to use the cache to remove expired cooldowns or re-schedule active cooldowns when the bot restarts. See b49f3e5.
Nice to see the cache being put to use. Excellent work. Only spotted one issue with the timestamps which I fixed myself.
Postgres backup completed!
I get the sense that few members appropriately make use of the ability to claim multiple channels. This feature made more sense when the system was first designed because members couldn't close their own channel. Now, it just adds complexity to the code that isn't worth keeping around if no one is relying on this feature. It would be simpler to remove the cooldown when the channel goes dormant rather than having a separate task scheduled for a different time.
Should this ability be removed...
Overall a nice tag to have, however I'm not sure about the implementation of the actual cooldown code.
Rate-limit what? Probably worth mentioning commands here.
Cooldowns are used in discord.py to rate-limit command execution.
I'm not incredibly well versed, but why this approach instead of the decorator based approach? For beginners that may come across easier.
05616ae Refactor the Help command. - mathsman5133
87f9fdd Minor formatting changes to align with current ... - mathsman5133
5ebb87d Add a special case for when the help command in... - mathsman5133
79d5b2d Few changes to keep formatting same as current - mathsman5133
d8384b2 Show a maximum of 8 commands per page rather th... - mathsman5133
Build 20200610.1 succeeded
Requested by
GitHub
Duration
00:02:19
Build pipeline
Bot
Build 20200610.2 succeeded
Requested by
Joseph Banks
Duration
00:03:59
Build pipeline
Bot
Connected!
This isn't for specifically ratelimiting commands. It's to manage your own custom cooldowns, whether it be emojis in chat, links, or anything else.
True, but the point of this is for custom cooldowns. Would !customcooldown or !customcd be a better tag?
Postgres backup completed!
I think customcooldown would be a more suitable name (we tend to avoid abbreviations where possible), we can add a cooldown tag in future if we want.
67702dc ModLog: ignore DMs in the message delete listener - MarkKoz
758edf0 Fix AttributeError for category check - MarkKoz
93be87c Enable the 'redis' / 'aiohttp' Sentry integrations - lemonsaurus
c88b5d1 Merge branch 'master' into bug/backend/stats-ca... - Den4200
f9df6e2 Merge pull request #983 from python-discord/bug... - Den4200
Build 20200610.3 succeeded
Requested by
GitHub
Duration
00:02:13
Build pipeline
Bot
Build 20200610.4 succeeded
Requested by
Joseph Banks
Duration
00:05:02
Build pipeline
Bot
Connected!
Would it be a good idea to include something specific to Discord.py in the name? Reading the name I initially thought it would be about the user help cooldowns or something.
Don't really need to assert this.
The tests are good for the most part. I pointed out some weaknesses which I think are a result of the code not being in small enough units. I suggest you separate the code out into functions like this (in addition to the command function):
def create_category(...):
...
def get_overwrites(...):
...
def create_channels(...):
...
def add_roles(...):
...
This gets repeated a lot. You could alleviate this by creating a partial function in setUp and giving it default values. You'd still be able to overwrite the defaults when you call the partial.
The mock doesn't need to be reset. Because it's created in setUp, which is called right before each test, it will be a fresh, new mock.
Fair. I'll edit the tag and comment to be a little more descriptive.
I'm concerned that the example is using other relatively advanced concepts such as a cog (a class) and cog_check. We have to consider who the audience is. I think the main idea could still be communicated using simpler code, like use a check for a command outside a cog.
Does anyone else think this is a valid concern?
@MarkKoz That seems like a perfectly valid concern, and I could update that.
Build 20200610.6 succeeded
Requested by
GitHub
Duration
00:02:03
Build pipeline
Bot
A couple of code comments
To go with the above suggestion:
bucket = message_cooldown.get_bucket(message)
When this is outside the class I'm not sure we should give it such an abstract name.
message_cooldown = commands.CooldownMapping.from_cooldown(1.0, 60.0, commands.BucketType.user)
Build 20200610.7 succeeded
Requested by
GitHub
Duration
00:02:26
Build pipeline
Bot
Final code suggestion
I think this section could be a little nicer in that we should trigger some action, maybe:
await message.channel.send("Not ratelimited!")
Thank you for contributing to Python Discord!
Please check out the following documents:
- Join the Discord server! - If you have not already, join the Discord server and introduce yourself in our #dev-contrib channel.
- Python Discord Contributor Wiki - A set of resources about setting up our services
- Python Discord Code of Conduct - Code of conduct for our commu...
Build 20200610.8 succeeded
Requested by
GitHub
Duration
00:02:03
Build pipeline
Bot
Build 20200610.9 succeeded
Requested by
GitHub
Duration
00:02:08
Build pipeline
Bot
05616ae Refactor the Help command. - mathsman5133
87f9fdd Minor formatting changes to align with current ... - mathsman5133
5ebb87d Add a special case for when the help command in... - mathsman5133
79d5b2d Few changes to keep formatting same as current - mathsman5133
d8384b2 Show a maximum of 8 commands per page rather th... - mathsman5133
Build 20200610.10 succeeded
Requested by
GitHub
Duration
00:02:16
Build pipeline
Bot
3527b58 Converters: handle ValueError when year for dur... - MarkKoz
9692093 Test for out of range datetime in the Duration ... - MarkKoz
298389f Remove redundant parenthesis from test values - MarkKoz
837bc23 Use await instead of asyncio.run in converter t... - MarkKoz
1e4766d Fix exception message assertions in converter t... - MarkKoz
[python-discord/bot] branch deleted: bug/backend/906/converter\-year\-range
Build 20200610.11 succeeded
Requested by
Joseph Banks
Duration
00:03:53
Build pipeline
Bot
Connected!
Similar to our other mod alerts, it may be useful to include an image here to stay similar.
The send_log_message function supports this in the thumbnail argument:
https://github.com/python-discord/bot/blob/b4688f5d9113dafe7e307cc276b27f32f2700475/bot/cogs/moderation/modlog.py#L90
Better worded comment
# Check whether the users display name contains any words in our blacklist
Comment could probably be a little more descriptive:
# Redis cache mapping a user ID to the last timestamp a bad nickname alert was sent
[bot] Branch bug/utility/829/non\-py\-code\-detection was force-pushed to `aa06685`
Build 20200611.1 failed
Requested by
GitHub
Duration
00:00:52
Build pipeline
Bot
Build 20200611.2 succeeded
Requested by
GitHub
Duration
00:02:27
Build pipeline
Bot
Build 20200611.6 succeeded
Requested by
GitHub
Duration
00:02:02
Build pipeline
Bot
Build 20200611.5 succeeded
Requested by
GitHub
Duration
00:02:20
Build pipeline
Bot
Build 20200611.7 succeeded
Requested by
GitHub
Duration
00:02:22
Build pipeline
Bot
Build 20200611.8 succeeded
Requested by
GitHub
Duration
00:02:30
Build pipeline
Bot
Build 20200611.10 succeeded
Requested by
GitHub
Duration
00:02:24
Build pipeline
Bot
Build 20200611.9 succeeded
Requested by
GitHub
Duration
00:02:36
Build pipeline
Bot
Postgres backup completed!
Build 20200611.11 succeeded
Requested by
GitHub
Duration
00:03:13
Build pipeline
Bot
Build 20200611.13 succeeded
Requested by
GitHub
Duration
00:02:37
Build pipeline
Bot
Build 20200611.14 failed
Requested by
Joseph Banks
Duration
00:00:46
Build pipeline
Bot
Build 20200611.1 failed
Requested by
Joseph Banks
Duration
00:01:29
Build pipeline
Site
Build 20200611.15 succeeded
Requested by
Joseph Banks
Duration
00:04:17
Build pipeline
Bot
Connected!
Build 20200611.2 succeeded
Requested by
Joseph Banks
Duration
00:04:11
Build pipeline
Site
16f160f Add cooldown channel to config-default.yml - j03b
[python-discord/bot] New branch created: add\-cooldown\-channel
This PR adds the constants for the cooldown channel so that when users are on help cooldown instead of just having write permissions revoked in the help available category they will not see help channels and will instead see a cooldown channel:
1412d01 Add cooldown channel to EXCLUDED_CHANNELS tuple - j03b
Build 20200611.17 succeeded
Requested by
GitHub
Duration
00:02:17
Build pipeline
Bot
You should include the field in the Channels class of constants.py as well.
ab63cff Add cooldown to Channels in constants.py - j03b
Build 20200611.18 succeeded
Requested by
GitHub
Duration
00:02:16
Build pipeline
Bot
Build 20200611.19 failed
Requested by
GitHub
Duration
00:01:19
Build pipeline
Bot
Build 20200611.20 failed
Requested by
GitHub
Duration
00:02:19
Build pipeline
Bot
16f160f Add cooldown channel to config-default.yml - j03b
1412d01 Add cooldown channel to EXCLUDED_CHANNELS tuple - j03b
ab63cff Add cooldown to Channels in constants.py - j03b
3b03509 Merge pull request #995 from python-discord/add... - MarkKoz
[python-discord/bot] branch deleted: add\-cooldown\-channel
Build 20200611.21 succeeded
Requested by
GitHub
Duration
00:04:29
Build pipeline
Bot
Connected!
3527b58 Converters: handle ValueError when year for dur... - MarkKoz
9692093 Test for out of range datetime in the Duration ... - MarkKoz
298389f Remove redundant parenthesis from test values - MarkKoz
837bc23 Use await instead of asyncio.run in converter t... - MarkKoz
1e4766d Fix exception message assertions in converter t... - MarkKoz
Build 20200611.22 succeeded
Requested by
GitHub
Duration
00:02:07
Build pipeline
Bot
Thanks for simplifying. Good call on using on_message; that's even simpler than my idea of using a check with a command. Just have some minor requests now.
I think it's worth mentioning what this return value is. It's hard to tell what "retry after" means if one hasn't encountered that term before.
Why does the URL have no scheme?
How about this?
**Cooldowns in discord.py**
I like the idea proposed, but we need to take a new issue into account that we observed twice in the last two days: Trolls opening and closing channels at a rapid rate. This may have happened before as well, as it was more or less "luck" that we observed the last event; the observation made us look into the logs, which revealed another event from another members just 1.5 day earlier. Both times, a user opened and closed about 20 channels within a few minutes.
This is obviously not only di...
I did raise this issue in https://github.com/python-discord/bot/issues/867#issuecomment-609511788, I think the cooldown should remain after going dormant with the new additional api calls involved and a higher influx of new users that potentially may want to do something distruptive.
I think it'd be better to decrease the cooldown to 5 minutes when a channel goes dormant to cover the cases where someone gets an issue solved quickly but then gets a new one after their channel is closed. If th...
Build 20200611.23 succeeded
Requested by
GitHub
Duration
00:02:01
Build pipeline
Bot
2d36b0a Filtering: Implement bad words detection in nic... - ks129
9ee9554 Filtering: Refactor bad names checking - ks129
0e12ff1 Filtering: Create lock in __init__ - ks129
4bee4f5 Filtering: Use POSIX instead ISO format to stor... - ks129
33a0306 Filtering: Rename bad_words_in_name to `check... - ks129
Build 20200611.24 succeeded
Requested by
Joseph Banks
Duration
00:03:58
Build pipeline
Bot
Connected!
Connected!
The Unicode escapes are formatted in code blocks. When the embed tries to also render a literal backtick, this ends up interfering with the code blocks and creating a mess.

Build 20200612.1 succeeded
Requested by
GitHub
Duration
00:04:06
Build pipeline
Bot
Connected!
Postgres backup completed!
Build 20200612.2 succeeded
Requested by
GitHub
Duration
00:02:25
Build pipeline
Bot
Build 20200612.3 succeeded
Requested by
GitHub
Duration
00:02:39
Build pipeline
Bot
@MarkKoz Commit log is now fixed thanks to @neonsea who made fixes. (sorry about actions log, these force-pushes and target branch changes, I tried to fix problems with these)
d520203 Incidents: define allowed roles and emoji - kwzrd
3195d16 Incidents: define method stubs for message even... - kwzrd
781d8f8 Incidents: implement add_signals helper - kwzrd
e8bb1aa Incidents: implement on_message listener & gu... - kwzrd
5b6b2de Incidents: implement & schedule `crawl_incident... - kwzrd
Build 20200612.4 succeeded
Requested by
GitHub
Duration
00:02:17
Build pipeline
Bot
5762e57 Incidents: abstract incident checking into a he... - kwzrd
166fc5f Incidents: implement own_reactions helper - kwzrd
f7756b0 Incidents: implement has_signals helper - kwzrd
b7f61a4 Incidents: move add_signals to module namespace - kwzrd
9a540a3 Incidents: make crawl_incidents smarter - kwzrd
Build 20200612.5 succeeded
Requested by
GitHub
Duration
00:01:55
Build pipeline
Bot
Build 20200612.7 succeeded
Requested by
GitHub
Duration
00:02:11
Build pipeline
Bot
Build 20200612.6 succeeded
Requested by
GitHub
Duration
00:02:19
Build pipeline
Bot
Build 20200612.9 succeeded
Requested by
GitHub
Duration
00:02:18
Build pipeline
Bot
Build 20200612.10 failed
Requested by
GitHub
Duration
00:01:42
Build pipeline
Bot
Build 20200612.11 succeeded
Requested by
GitHub
Duration
00:02:19
Build pipeline
Bot
Build 20200612.12 succeeded
Requested by
GitHub
Duration
00:02:19
Build pipeline
Bot
Build 20200612.13 succeeded
Requested by
GitHub
Duration
00:02:26
Build pipeline
Bot
Build 20200612.14 succeeded
Requested by
GitHub
Duration
00:02:23
Build pipeline
Bot
Build 20200612.15 succeeded
Requested by
GitHub
Duration
00:02:16
Build pipeline
Bot
2d36b0a Filtering: Implement bad words detection in nic... - ks129
9ee9554 Filtering: Refactor bad names checking - ks129
0e12ff1 Filtering: Create lock in __init__ - ks129
4bee4f5 Filtering: Use POSIX instead ISO format to stor... - ks129
33a0306 Filtering: Rename bad_words_in_name to `check... - ks129
Build 20200612.16 succeeded
Requested by
GitHub
Duration
00:02:16
Build pipeline
Bot
For a quick status update: I'm now fairly happy with the implementation and have started to move towards writing tests.
Good changes. Just some minor things left.
"""Create a Code Jam category if it doesn't exist and return it."""
The return type doesn't seem accurate since I see some roles in the dictionary too.
You only need the guild from the context (assuming you change the other 2 functions), so take the guild directly rather than the context.
Build 20200612.17 succeeded
Requested by
GitHub
Duration
00:02:17
Build pipeline
Bot
46e770b Escape markdown in charinfo embed - MarkKoz
[python-discord/bot] New branch created: bug/frontend/996/charinfo\-md\-escape
The embed displays the original character. If it's a markdown char, it would interfere with the embed's actual markdown. The backtick was especially troublesome.
Fixes #996
Build 20200612.18 succeeded
Requested by
GitHub
Duration
00:02:09
Build pipeline
Bot
Using retry_after in the message demonstrates what the variable means in a clean, succinct way compared to a comment. The f-string may confuse some, but I think it's a worthy trade-off.
retry_after = bucket.update_rate_limit()
if retry_after:
await message.channel.send(f"Slow down! Try again in {retry_after} seconds.")
After resolving the urls the end up looking like this on mobile
<img src="https://cdn.discordapp.com/attachments/635950537262759947/716777420241502248/Screenshot_20200601-001300_Discord.jpg" height=500>
On desktop it's a normal codeblock with a link.
Is this behaviour fine?
Stripping of the backticks would have to be done after they were added in because of how docs are structured if we went with links without codeblock, or the urls can just return text with no linking involved
When an automatic deletion happens for example with a token or an attachment, the user's message is currently lost.
Assuming the DMs are open, in cases like the 2 above where the deletion was not for something like spam, sending the deleted contents would make it a bit more friendly towards the user
One one hand, the back ticks don't look too bad on mobile. On the other hand, if they're already links, they're distinguished enough to not need to be in code blocks too. I could go either way but leaning towards keeping the code block.
[python-discord/bot] branch deleted: bug/frontend/996/charinfo\-md\-escape
Build 20200612.19 succeeded
Requested by
Joseph Banks
Duration
00:04:08
Build pipeline
Bot
Connected!
As Mark said the _scheduled_task function is missing coverage so it'd be nice if you're up to it, but it's not functionally that important and can't really break much; otherwise this looks good.
Build 20200613.1 succeeded
Requested by
GitHub
Duration
00:04:04
Build pipeline
Bot
Connected!
Works great.
I can't give a very thorough review of the tests but I think it'd be convenient to add plaintext contents in comments next to the b64 test cases to get an idea of the data being passed around
[python-discord/bot] branch deleted: bug/filters/928/non\-ascii\-token
b366d65 Token remover: catch ValueError when non-ASCII ... - MarkKoz
f03ae8e Token remover: reduce duplicated code in on_me... - MarkKoz [d193a93](https://github.com/python-discord/bot/commit/d193a93828582965eb361dc6f3185291fff649a7) Test on_message_edit of token remover uses on_m... - MarkKoz [0bfd003](https://github.com/python-discord/bot/commit/0bfd003dbfc5919220129f984dc043421e535f8c) Add a test helper function to patch multiple at... - MarkKoz [e8bd69a`](https://github.com/python-discord/bot/commit/e8bd69a6c556d78eca1a1eb2adfa26248273a1cd) Test token remover takes action if a token is f... - MarkKoz
Build 20200613.2 succeeded
Requested by
GitHub
Duration
00:04:00
Build pipeline
Bot
Connected!
Build 20200613.3 succeeded
Requested by
GitHub
Duration
00:02:26
Build pipeline
Bot
Build 20200613.4 failed
Requested by
GitHub
Duration
00:02:21
Build pipeline
Bot
Build 20200613.5 succeeded
Requested by
GitHub
Duration
00:02:12
Build pipeline
Bot
Build 20200613.6 succeeded
Requested by
GitHub
Duration
00:02:25
Build pipeline
Bot
Build 20200613.7 failed
Requested by
GitHub
Duration
00:02:04
Build pipeline
Bot
Build 20200613.8 failed
Requested by
GitHub
Duration
00:02:02
Build pipeline
Bot
Build 20200613.9 succeeded
Requested by
GitHub
Duration
00:02:09
Build pipeline
Bot
Postgres backup completed!
6 more questions added for the quiz command on the category Evergreen. I'll add more later.
Note that only a JSON has been edited.
Reasoning
I've added more questions because they were too few.
- [x] Join the Python Discord Community?
- [ ] If dependencies have been added or updated, run
pipenv lock? - [ ] Lint your code (
pipenv run lint)? - [x] Set the PR to allow edits from contributors?
Build 20200613.1 succeeded
Requested by
GitHub
Duration
00:01:01
Build pipeline
Seasonal Bot
Thank you for contributing to Python Discord!
Please check out the following documents:
- Join the Discord server! - If you have not already, join the Discord server and introduce yourself in our #dev-contrib channel.
- Python Discord Contributor Wiki - A set of resources about setting up our services
- Python Discord Code of Conduct - Code of conduct for our commu...
Build 20200613.10 succeeded
Requested by
GitHub
Duration
00:02:16
Build pipeline
Bot
Build 20200613.11 succeeded
Requested by
GitHub
Duration
00:02:37
Build pipeline
Bot
Description
.caesarcipher or its alias .caesar, can be used to cipher the given text, given an integer offset.
Reasoning
I've recently noticed that there was no caesar cipher command specifically in the Fun cog of the seasonalbot, and I think it would be a fair addition.
Proposed Implementation
The command will be implemented in the [Fun](https://g...
I think this would be fun to have. Could it somehow provide an about (or similar) subcommand to explain how a Caesar cipher works? This could have good educational value. Feel free to start working on it, if you haven't already.
Build 20200613.12 succeeded
Requested by
GitHub
Duration
00:02:19
Build pipeline
Bot
Build 20200613.13 succeeded
Requested by
GitHub
Duration
00:02:35
Build pipeline
Bot
Build 20200613.14 succeeded
Requested by
GitHub
Duration
00:02:08
Build pipeline
Bot
Build 20200613.15 succeeded
Requested by
GitHub
Duration
00:02:24
Build pipeline
Bot
I'm currently looking into making .caesarcipher a command group and adding an about subcommand. However, one of my concerns is the semantics of the command, which is currently:

What do you think about utilizing an encrypt and decrypt subcommands instead?
Postgres backup completed!
[bot] Branch bug/utility/829/non\-py\-code\-detection was force-pushed to `cb0529b`
Build 20200614.1 succeeded
Requested by
GitHub
Duration
00:02:27
Build pipeline
Bot
Here's what I currently have:
exts
โโโ backend
โย ย โโโ sync
โย ย โย ย โโโ __init__.py
โย ย โย ย โโโ cog.py
โย ย โย ย โโโ syncers.py
โย ย โโโ __init__.py
โย ย โโโ config_verifier.py
โย ย โโโ error_handler.py
โย ย โโโ logging.py
โโโ filters
โย ย โโโ __init__.py
โย ย โโโ antimalware.py
โย ย โโโ antispam.py
โย ย โโโ filtering.py
โย ย โโโ security.py
โย ย โโโ token_remover.py
โย ย โโโ webhook_remover.py
โโโ info
โย ย โโโ __init__.py
โย ย โโโ doc.py
โย ย โโโ help.py
โย ย โโโ information.py...
This is annoying. It uses the root logger, so it's not possible to suppress the warning. The error comes from fuzzywuzzy. Its default processor replaces all non-letters and non-numbers with whitespace using this regex for the substition (?ui)\W. strip() is called later, which makes it an empty string.
Three solutions I can think of:
- Specify a custom processor (or
None) to avoid removal of symbols. - Redundantly invoke the default processor before the fuzzy match to be able ...
Sentry Issue: BOT-3A
There are over 500 events of this in Sentry. The events tend to be clumped within a relatively small time range of several hours, and these clumps occur weeks or months apart.
My theory is that a user was unwatched but there was a consumption ongoing for them. So despite being popped from the watched_users dictionary, by other methods (like send_header) attempting to ret...
Build 20200615.1 succeeded
Requested by
GitHub
Duration
00:04:07
Build pipeline
Bot
Connected!
[bot] Branch bug/mod/bot\-4r/modlog\-member\-update was force-pushed to `95e866b`
Sentry Issue: BOT-4R
AttributeError: 'Role' object has no attribute 'get'
File "discord/client.py", line 312, in _run_event
await coro(*args, **kwargs)
File "bot/cogs/moderation/modlog.py", line 511, in on_member_update
new = value.get("new_value")
Unhandled exception in on_member_update.
The iterable_item_removed and iterable_item_added diffs only contain th...
Build 20200615.2 succeeded
Requested by
GitHub
Duration
00:02:11
Build pipeline
Bot
[bot] Branch bug/mod/bot\-4r/modlog\-member\-update was force-pushed to `35fc846`
Build 20200615.3 succeeded
Requested by
GitHub
Duration
00:02:26
Build pipeline
Bot
09f53ca Check infraction reason isn't None before short... - MarkKoz
[python-discord/bot] New branch created: bug/mod/bot\-68/ban\-strips\-none
With the recent changes to truncate reasons, infractions will fail to apply if a reason isn't provided. The fix is to only shorten the reason if it isn't None.
08c96f9 Fix check for bot actor in infractions - MarkKoz
Build 20200615.5 succeeded
Requested by
GitHub
Duration
00:02:22
Build pipeline
Bot
Postgres backup completed!
[python-discord/bot] New branch created: bug/backend/bot\-50/sync\-ignore\-guilds
Sentry Issue: BOT-50
There's no reason to sync users from other guilds like the emoji guilds. It was causing errors because it tried to sync roles specific to those guilds which did not exist in the database.
Build 20200615.6 succeeded
Requested by
GitHub
Duration
00:02:31
Build pipeline
Bot
4b1b8fd Bump flake8 from 3.7.9 to 3.8.3 - dependabot-preview[bot]
[python-discord/flake8-annotations] New branch created: dependabot/pip/flake8\-3\.8\.3
Bumps flake8 from 3.7.9 to 3.8.3.
Commits
181bb46 Release 3.8.3
3d68da9 Merge branch 'doctests-flag-desc' into 'master'
e817c63 Help clarify the option behaviour
b6d3fca Merge branch 'issues/665' into 'master'
9b8f908 fix JobsArgument --help output
94304de Merge branch 'issue-662' into 'master'
a68d4d0 processor: Catch SyntaxError also when generating tokens for a file
4071645 Release 3.8.2
b9fe4d6 Merge branch 'extend_exclude_is_files' into 'master'
31c2f...
Some users and I have mentioned that the invite link on the website is a bit hard to get to. Since the site is made to go along with the discord server, it would make sense to make the invite link easier to get to.
As it is right now, when you get to the home page on a computer, the invite link is in the top right:

This might be a little harder ...
Build 20200615.7 succeeded
Requested by
GitHub
Duration
00:02:13
Build pipeline
Bot
c7373fa Token remover: ignore DMs - MarkKoz
2fa7429 Token remover: move bot check to on_message - MarkKoz
3aecf14 Token remover: exit early if message already de... - MarkKoz
0ad19a4 Webhook remover: ignore DMs and bot messages - MarkKoz
94a4f8e Webhook remover: exit early if message already ... - MarkKoz
[python-discord/bot] New branch created: bug/filters/bot\-58/removers\-ignore\-dms
Sentry Issue: BOT-58
DMs cannot be deleted, so don't bother trying. I also made a change to catch NotFound exceptions when deleting the message, in case someone managed to delete it manually before the bot could get to it.
Build 20200615.8 succeeded
Requested by
GitHub
Duration
00:02:16
Build pipeline
Bot
Sentry Issue: BOT-53
ResponseCodeError: Status: 400 Response: {'deletedmessage_set': [{}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {'id': ['deleted message with this id already exists.']}, {'id': ['deleted message with this id already exists.']}, {'id': ['deleted message with this id already exists.']}, {'id': ['deleted message with this id alread...
[python-discord/bot] Issue opened: #1005 Author of a filtered message somehow becomes the bot itself
Sentry Issue: BOT-5E
AttributeError: 'ClientUser' object has no attribute 'send'
File "discord/client.py", line 312, in _run_event
await coro(*args, **kwargs)
File "bot/cogs/filtering.py", line 114, in on_message
await self._filter_message(msg)
File "bot/cogs/filtering.py", line 184, in _filter_message
await self.notify_member(msg.author, _filter["notification_msg"]...
OK, I won't notify you again about this release, but will get in touch when a new version is available.
If you change your mind, just re-open this PR and I'll resolve any conflicts on it.
[python-discord/flake8-annotations] branch deleted: dependabot/pip/flake8\-3\.8\.3
Sentry Issue: BOT-5F
NotFound: 404 Not Found (error code: 10007): Unknown Member
File "bot/cogs/moderation/scheduler.py", line 151, in apply_infraction
await action_coro
File "bot/cogs/moderation/infractions.py", line 212, in action
await user.add_roles(self._muted_role, reason=reason)
File "discord/member.py", line 641, in add_roles
await req(guild_id, user_id, role.id, rea...
This happens because antispam changes the author here
Only patching the context author may be adequate.
Sentry Issue: BOT-47
AttributeError: 'NoneType' object has no attribute 'fetch_message'
File "discord/client.py", line 312, in _run_event
await coro(*args, **kwargs)
File "bot/cogs/moderation/modlog.py", line 730, in on_raw_message_edit
message = await channel.fetch_message(event.message_id)
Unhandled exception in on_raw_message_edit.
It tries to use get_channel(), but `No...
Sentry Issue: BOT-4F
InvalidStateError: Result is not set.
File "discord/ext/commands/bot.py", line 726, in reload_extension
self._remove_module_references(lib.__name__)
File "discord/ext/commands/bot.py", line 554, in _remove_module_references
self.remove_cog(cogname)
File "discord/ext/commands/bot.py", line 540, in remove_cog
cog._eject(self)
File "discord/ext/commands/c...
Since it seems related, I'll also tack on that infractions should only be posted after the action has been taken on the user (e.g. mute role added, nickname changed, etc.). This order allows for the infraction to not be posted if the action fails.
I generally agree with all of your proposals. However, I have some questions below. I also worry that the features I will quote also increase complexity of the API (more so its behaviour than its interface).
Alternatively, we could decide that a more severe infraction (longer duration/permanent) should replace a shorter infraction automatically.
Additionally, if the second infraction has a later expiry date, we could also make that one automatically "replace" the infraction with a c...
