#dev-log
1 messages ยท Page 51 of 1
I left it in because it is neat for debugging
Perfect, this looks great.
The FontAwesome Django plugin is coming mid-2020 according to their website. We might want to reevaluate how we handle this then.
Yeah, we've discussed that in the community. We'll evaluate it once it's out.
If we're going to leave it in, we should probably at least document it so that our users will know that it's "neat for debugging". I don't have a very strong opinion on whether to remove it or document it, I'll leave it for you to decide.
063ae2b Unnominate banned users from the talent pool - MarkKoz
[python-discord/bot] New branch created: bug/mod/1065/unnominate\-banned
There really is nowhere for me to exercise my devilish coding practices ๐
Fixes #1065
Example history for a banned user:

Build 20200815.6 succeeded
Requested by
GitHub
Duration
00:02:39
Build pipeline
Bot
I wish there was a more Pythonic way to write this
I feel you and I actually didn't mean for it to be like that. I saw that I redefined handle_event on every iteration, and without even thinking more about it moved it above the loop. If i had noticed the hide() and show() calls in the function, I wouldn't have expected this to work, but since it did I actually didn't notice this horror before you pointed it out.
I wish there was a more Pythonic way to write this
I feel you and I actually didn't mean for it to be like that. I saw that I redefined handle_event on every iteration, and without even thinking more about it moved it above the loop. If i had noticed the hide() and show() calls in the function, I wouldn't have expected this to work, but since it did I actually didn't notice this horror before you pointed it out.
So, callbacks will have access to this, right, but would `element...
The sad thing is that if they just included this one CSS rule in Bulma, it would have almost the same behaviour and there would be no need for 40 lines of js
.dropdown:not(.is-hoverable) .dropdown-trigger:focus-within + .dropdown-menu {
display: block;
}
Postgres backup completed!
this looks better, but if I'm reading this correctly, if the element already has the is-active class, we still try to add that class before returning true. What happens when you try to add a class that an element already has - will it end up with two of that class, or will it just do nothing?
Either way, it would be tidier if it just returned true right away, so here's a suggestion for how that might look.
const show = () => {
if (element.classL...
The sad thing is that if they just included this one CSS rule in Bulma, it would have almost the same behaviour and there would be no need for 40 lines of js
Bulma is quite receptive to pull requests - you could always open one to them and see what jgthms says?
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 20200816.1 succeeded
Requested by
GitHub
Duration
00:03:01
Build pipeline
Bot
This would be a great update. I definitely support this.
This seems like a solid way of handling; it's easy and hopefully won't break easily. I think any sort of ban should end a nomination, so there's no need to make it more complicated by separating tempbans from permbans like we did with Big Brother.
I made one comment that's not related to anything you wrote; you just moved it in your refactor. I think I originally wrote those lines and I disagree with how I did it back then.
Reading this code again (I think I wrote it), I wonder why I put the defaults before the user__id dict in the ChainMap. The lookup order is from left to right, not right to left, meaning that the default values in api_default_params now take precedence over the specific values inserted as params.
It may not matter too much in this version, as I don't think our defaults will ever include a user__id field, but if we ever add something to the second dictionary hoping to "override" a...
[python-discord/django-simple-bulma] New tag created: v2\.0\.0
da7424f Correct FontAwesome version - lemonsaurus
2abc41d Subheaders in Customization - lemonsaurus
Build 20200816.2 succeeded
Requested by
Leon Sandรธy
Duration
00:04:40
Build pipeline
Bot
Connected!
Updating to v2.0.0, and it looks like the submodules you're using now aren't included in the tarball. Since I get the following error when attempting to run django.
FileNotFoundError: [Errno 2] No such file or directory: '/home/bpepple/.local/share/virtualenvs/metron-UZX73b7p/lib/python3.6/site-packages/django_simple_bulma/bulma/sass'
Pulled the tarball down from the release page, and verified the bulma folder is empty.
We used to have a tag called !ask which was designed to tell people the basics of how to ask a good question.

The problem was that we saw a lot of users abusing this tag. As soon as someone asked a less-than-perfect question in our community, other members would throw themselves at the keyboard to !ask that stupid user right in their stupid face.
This didn't harmonize wel...
I've had a short look for alternative characters, but couldn't not find anything that looked better in an embed title. I think these look good enough to be in there.
Thanks, this will actually solve quite a few bugs. The "patch context only" approach seems like the easiest to solve it. There's still the chance that someone will add something that uses ctx.message.author in new code added to the moderation extension, but we can deal with that down the line.
Glancing at your setup.py and I see you're using 'package_data', which if I remember correctly works only with bdist and not sdist. I believe you need to add a 'MANIFEST.in' for sdist, and the 'package_data' will be used for bdist.
If you don't get to it before tonight, I can probably work-up a quick pull request.
Build 20200816.3 succeeded
Requested by
GitHub
Duration
00:02:48
Build pipeline
Bot
No need to assign message to variable. Put send directly to call. Also no need to pass custom client.
If the client parameter of wait_for_deletion is not specified, the function itself will set the client parameter, but as an instance of discord.Member, rather than an instance of discord.Client or a subclass of it.. What's the problem with this? discord.Member object has no attribute wait_for, and this attribute is actually used in the function, no matter what.
Points of interest:
https://github.com/python-discord/bot/blob/4df3089d8d03f54cdbd14d7683149ae7931036c1/bot/utils/m...
If someone wants to fix this, go ahead! If nobody wants to fix this, I have no problem in fixing this.
I don't agree with this, using a name makes this more readable compared to doing the whole await expression within an argument. Although an another name may be more fitting since doc_embed is already used to describe the embed object in the same scope.
What names do you suggest? I kept it the same because it's still an embed... but not technically.
Build 20200816.4 succeeded
Requested by
GitHub
Duration
00:02:50
Build pipeline
Bot
Looks like you're right, sorry for any inconvenience caused.
I don't have time to look into this today but I'll try to get it sorted out ASAP. If you or anyone else reading this has any ideas or would like to open a PR with a fix, that'd be much appreciated.
cd189e1 Checkout submodules before building - lemonsaurus
[python-discord/django-simple-bulma] New tag created: v2\.0\.1
22d8983 Recursive submodule checkout - lemonsaurus
[python-discord/django-simple-bulma] New tag created: v2\.0\.2
@bpepple I believe this should be resolved now.
The problem was that we were not checking out the submodules in the GitHub Actions workflow that was responsible for building the source distribution.
Could you verify that everything works as expected in release 2.0.2, when you get a chance?
[python-discord/django-simple-bulma] New tag created: v2\.0\.3
Could you verify that everything works as expected in release 2.0.2, when you get a chance?
Did a quick update, and that looks like it fixed it. If there are any another problems in regard to this release I'll open another bug.
Build 20200816.5 succeeded
Requested by
GitHub
Duration
00:02:57
Build pipeline
Bot
Thanks @bpepple, we really appreciate you taking the time to report these bugs to us!
Postgres backup completed!
f489a87 Changed from json to yaml config so comments ca... - Xithrius
1075d3c Updated dependencies to include yaml config par... - Xithrius
b7779d9 Changed from json to yaml extraction of channel... - Xithrius
3f3f713 Revert "Changed from json to yaml config so com... - Xithrius
9c994c2 Auto stash before revert of "Changed from json ... - Xithrius
Build 20200817.1 failed
Requested by
GitHub
Duration
00:01:04
Build pipeline
Seasonal Bot
Build 20200817.2 succeeded
Requested by
GitHub
Duration
00:00:54
Build pipeline
Seasonal Bot
People now can contribute to the list of conversation starters for Python-related channels here.
I've put together a quick implementation at https://gist.github.com/Numerlor/e57096cedd06dd536cdddff86be2661f, since we have control over the output there I've decided to simply ignore the information we don't need during the parsing.
Should we also handle version 1 inventories? The implementation is simple (although I haven't tested it) but none of the bot's current inventories use that version and I've only managed to find one when searching.
Description
Http code 418 is reported to be invalid, even though its defined here. A cat exists for the status code too.
Steps to Reproduce
Send .statuscat 418 to Seasonalbot.
Expected Behaviour
Sends an embed with this image in it, and a header of Status: 418.
Actual Behaviour
Code not found:
serialisation. This feels nicer than dealing with multiple caches and also removes worries of them falling out of sync.
Since I was already working on caching, I implemented caching of the unsilence times too. This means mod...
Build 20200818.3 succeeded
Requested by
GitHub
Duration
00:02:51
Build pipeline
Bot
Postgres backup completed!
This line triggers me a little bit. I don't really see why you have to do this. active_nomination['id'] in the patch call wouldn't really be that bad, and the [x] = y syntax just looks deeply wrong to me no matter how many times I come across it.
Minor nitpicks, but overall this looks great to me. Feel free to address whatever you agree with, and leave the rest as-is.
Seems reasonable to me. I don't really see any reason not to swap these?
{"user__id": str(user_id)},
self.api_default_params,
Might be worth adding a comment to explain why this import is now here. It's not immediately intuitive.
It mostly looks fine, but I have a few changes to request.
- Please justify or change the frequent use of explicit relative imports. I don't think we have enough complexity in our package layout for the imports to end up being that verbose, and PEP8 recommends that we use absolute imports as much as possible in cases where this is true.
- Maybe we should default to just importing all the extensions instead of maintaining this long list of load_extensions calls in
__main__. For extensions ...
Why is this necessary? I really dislike dot imports.
kinda gross, but I'm not sure turning it into more lines would really help readability much.
[python-discord/bot] branch deleted: bug/filters/1005/antispam\-ctx\-patch
[python-discord/bot] branch deleted: bug/filters/1099/dupe\-offensive\-msg
Build 20200819.1 succeeded
Requested by
GitHub
Duration
00:04:51
Build pipeline
Bot
Connected!
Connected!
Build 20200819.2 succeeded
Requested by
GitHub
Duration
00:04:39
Build pipeline
Bot
I didn't test kicking cause I didn't want actual users to be kicked from the test server, but apart from that, everything seems to work.
@MarkKoz Thanks for the review!
Out of interest, how did you reach this state? I think it shouldn't be possible unless the first task fails.

I don't have an exact answer but basically I changed durations from hours/days to smaller units and forgot to change a couple spots.
ff91b76 Verification: add missing word to task status m... - kwzrd
Alright, that's fine then. I noticed a word was missing from that message; I pushed a commit to amend that.
Build 20200819.3 succeeded
Requested by
GitHub
Duration
00:03:02
Build pipeline
Bot
Have you considered using a dictionary to define this mapping? This is probably fine, but it feels a little unnatural to me.
Is the activity.emoji.id check here to filter custom emoji? I think it could use an in-line comment. It's a little indirect.
Neat way to use walrus. But I think you want to specify a default for getattr. This way can raise.
I'd probably personally make badges a list & then join the elements on a " ", but this is fine too.
Addressed by f150e69.
I don't feel strongly about it, but there are some nice things about relative imports:
- They tend to be shorter
- Easier to read (contentious, I guess)
- Easier to write (mentioning this for completeness sake; it's not really a valid argument on its own)
- More room to import many things without breaking into multiple lines
- Sorting imports puts relative ones at the end. This makes it more convenient to find the most relevant objects to the curr...
The !wolfram command group is nice and gets a bit of use (about 55 usages in the past two weeks), but it does not really belong in this bot.
Get rid of the Wolfram extension in this bot, and add the extension to Seasonalbot instead. This will probably require moving certain environment variables (like the wolfram API key), which you'll need the help of a Core Dev to do.
Build 20200819.4 succeeded
Requested by
GitHub
Duration
00:03:23
Build pipeline
Bot
Build 20200819.5 succeeded
Requested by
GitHub
Duration
00:04:59
Build pipeline
Bot
Connected!
Build 20200819.6 succeeded
Requested by
GitHub
Duration
00:04:30
Build pipeline
Bot
Connected!
These are very nice enhancements. I'm surprised there's no premium or boost info, but that can be saved for another time.
This is a great refactor.
[python-discord/django-simple-bulma] New comment on issue #6: Support configuration of Bulma modules
@JonasUJ made the point that Bulma actually officially supports modularity in its documentation, so I'll reopen this.
Build 20200819.1 failed
Requested by
GitHub
Duration
00:02:06
Build pipeline
Snekbox
Build failing because pre-commit cannot find shellcheck
Test shell scripts with shellcheck.......................................Failed
- hook id: shellcheck
- exit code: 127
/root/.cache/pre-commit/repo_gx8xowx/pre_commit_hooks/shellcheck: 13: /root/.cache/pre-commit/repo_gx8xowx/pre_commit_hooks/shellcheck: shellcheck: not found
7329d4a CI: install shellcheck in the test container - MarkKoz
Build 20200819.2 failed
Requested by
GitHub
Duration
00:01:52
Build pipeline
Snekbox
Now I don't know why it fails. Maybe cause it's an older version (0.5.0). Shellcheck 0.7.1 doesn't complain locally.
Test shell scripts with shellcheck.......................................Failed
- hook id: shellcheck
- exit code: 1
In scripts/check_dockerfiles.sh line 22:
if [[ -v build_cache["${branch}"] ]]; then
^-- SC1009: The mentioned syntax error was in this if expression.
^-- SC1073: Couldn't parse this test expression. Fix to allow more checks.
...
Build 20200820.1 failed
Requested by
GitHub
Duration
00:01:18
Build pipeline
Snekbox
Okay, I give up on ShellCheck. I can't install from the tarball cause the container doesn't have xz to decompress it. I could install xz but this just isn't worth it any more. I should honestly rewrite the shell scripts in Python anyway.
Build 20200820.2 succeeded
Requested by
GitHub
Duration
00:02:11
Build pipeline
Snekbox
Build 20200820.3 succeeded
Requested by
GitHub
Duration
00:02:13
Build pipeline
Snekbox
Shell scripts may be fun in a masochistic kind of way, but they feel fragile and are unpleasant to maintain. This is a Python project under the name of a Python community, so let's be sane and use Python for these scripts.
I dislike that the following code exists when it is already defined in the config
https://github.com/python-discord/snekbox/blob/7a212edd8357d24e2dd88bc455418aaa895bc3c8/snekbox/nsjail.py#L23-L24
https://github.com/python-discord/snekbox/blob/7a212edd8357d24e2dd88bc455418aaa895bc3c8/snekbox/nsjail.py#L28
https://github.com/python-discord/snekbox/blob/7a212edd8357d24e2dd88bc455418aaa895bc3c8/scripts/.profile#L2
https://github.com/python-discord/snekbox/blob/7a212edd8357d24e2dd88bc455418a...
Currently any and all reminders can be deleted by any member. This needs to be fixed ASAP so that members can only delete their own reminders.
Postgres backup completed!
Opens up the bot/reminders/id path for GET fetching of reminders by id
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 20200820.1 succeeded
Requested by
GitHub
Duration
00:02:17
Build pipeline
Site
Restricts reminder delete and edit methods to only their authors or users with the admin roles.
blocked by https://github.com/python-discord/site/pull/374
fixes: #1115
Build 20200820.1 succeeded
Requested by
GitHub
Duration
00:03:02
Build pipeline
Bot
Build 20200820.2 succeeded
Requested by
GitHub
Duration
00:01:55
Build pipeline
Site
Created lemon_sweat as both svg and png
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 Code of Conduct Code of conduct for our community
- Python Discord Contributor Wiki - A set of resources about setting up our services
I like it. And the PR looks good to me.
@gustavwilliam one minor tip when making PRs for visual stuff like this is to include images in the PR description. In this case, it wouldn't hurt to include the emoji in the PR description, and even better to show it in different sizes (like screenshots from discord showing it in a message).
I think maybe we should fix it by removing it.
But if we have to keep it, it certainly shouldn't have a black outline. None of the others do.
@lemonsaurus Thanks. I'll keep that in mind for future PRs.
The API doesn't support queries by IDs like this. It has to be passed as a parameter. Furthermore, this may 404, which you should catch.
Oh I didn't see the site PR. Well, that API change wasn't really necessary cause you could have passed it as a param.
Still, you should catch the 404.
The error handler has custom api 404 handling which should be sufficient here https://github.com/python-discord/bot/blob/a2c05febd122db2d8f4e7d4743a08aef7c2fe5e0/bot/cogs/error_handler.py#L234-L239
The api didn't allow ids for filtering, so since it'd have to be changed anyway I decided to do it directly instead of a filter since ids are unique.
It does allow IDs for filtering. Anyway, good point on the 404. This is good to go then.
Build 20200820.3 succeeded
Requested by
GitHub
Duration
00:03:36
Build pipeline
Site
4752160 Make client parameter mandatory for wait_for_de... - MarkKoz
[python-discord/bot] New branch created: bug/1112/backend/wait\-for\-deletion\-client
A client instance is necessary for the core feature of this function. There is no way to obtain it from the other arguments. The previous code was wrong to think discord.Guild.me is an equivalent.
Fixes #1112
Build 20200820.2 succeeded
Requested by
GitHub
Duration
00:02:43
Build pipeline
Bot
Just had this issue again, but with a slightly different traceback.
ResponseCodeError: Status: 400 Response: {'deletedmessage_set': [{'embeds': {'0': ["Tag embed must contain one of the fields {'image', 'description', 'video', 'title', 'fields'}."]}}, {'embeds': {'0': ["Tag embed must contain one of the fields {'image', 'description', 'video', 'title', 'fields'}."]}}, {'embeds': {'0': ["Tag embed must contain one of the fields {'image', 'description', 'video', 'title', 'fields'}."]}}, {...
Works fine but figured I'd mention it since you changed it in all the other places, this usage still passes the client as a kwarg:
https://github.com/python-discord/bot/blob/47521608d573c97597df7b97bf42b0142f79e98c/bot/cogs/doc.py#L396
[python-discord/bot] New branch created: bug/mod/1094/watch\-leaked\-token
Fixes #1094
Also added an ignore for webhook tokens in the code block help embed thingy. It was already ignoring bot tokens.
Works fine but figured I'd mention it since you changed it in all the other places, this usage still passes the client as a kwarg:
Oh well.
[python-discord/bot] branch deleted: bug/1112/backend/wait\-for\-deletion\-client
Build 20200820.3 succeeded
Requested by
GitHub
Duration
00:02:45
Build pipeline
Bot
Build 20200820.4 succeeded
Requested by
GitHub
Duration
00:04:31
Build pipeline
Bot
Connected!
Build 20200820.5 succeeded
Requested by
GitHub
Duration
00:02:37
Build pipeline
Bot
Connected!
Build 20200820.6 succeeded
Requested by
Joseph Banks
Duration
00:04:47
Build pipeline
Bot
Connected!
Build 20200820.7 succeeded
Requested by
Joseph Banks
Duration
00:04:28
Build pipeline
Bot
Build 20200820.1 failed
Requested by
Joseph Banks
Duration
00:01:01
Build pipeline
Seasonal Bot
Build 20200820.2 failed
Requested by
Joseph Banks
Duration
00:01:07
Build pipeline
Seasonal Bot
Build 20200820.3 succeeded
Requested by
Joseph Banks
Duration
00:02:49
Build pipeline
Seasonal Bot
Connected!
Postgres backup completed!
This issue has been resolved.
[python-discord/bot] New branch created: kwzrd/fix\-1095
I'm struggling to think of a nice way to solve this. I've pushed two commits, 9d13ba2 and 419c560, which adjust the tests to what I think they should be like. The tests now fail. But I'm not sure how to fix the cache itself.
Moving the boolean check before the loop would technically be possible but bool is not always in prefixes, depending on which partial calls the method. And if it isn't, then we'd want to reach the raise TypeError. So we'd have to check both whether the passed typ...
Right now, we're syncing users in a hugely inefficient way. When we request the users, we get a giant 90,000 item reply, and when we send users we're sending them one at a time with 90,000 requests.
Let's not do either of these things.
This will be a cross-platform change, so see the corresponding bot issue here.
Use DRF pagination
On the User endpoint, enable DRF pagination and send something like 10000 items at a ti...
Currently when we sync the users to the site, we sync all 90,000 users one at a time. This is pretty much the single worst way we could possibly do this, so let's make it smarter.
See the related site-side changes required for this here: https://github.com/python-discord/site/issues/375
Paginated retrievals
In https://github.com/python-discord/site/issues/375, I propose adding pagination to the user endpoint via DRFs built-in pagination feature. This means we'll need to make a smart...
On mobile (Android, not sure about iOS), an opening bracket without a matching closing bracket causes the Markdown renderer to interpret everything in between as a link title. The mobile renderer ostensibly uses the earliest opening bracket it finds while the desktop renderer uses the latest. It renders as a link because later on, there is link Markdown which is used for the following post's title. This is what that looks like on mobile:

[python-discord/site] New branch created: add\_deployment\_info
Fixes 372.
This is a small change that simply adds the git SHA as a source comment in all views.

This is a useful bit of information that we can use to verify that the right version of the site is actually running on our server.
Build 20200821.1 succeeded
Requested by
GitHub
Duration
00:02:11
Build pipeline
Site
Build 20200822.1 failed
Requested by
GitHub
Duration
00:01:38
Build pipeline
Site
Build 20200822.2 failed
Requested by
GitHub
Duration
00:01:20
Build pipeline
Site
If, for example, __init__ is written in a commit message that gets sent #dev-log, it'll end up as the text "init", but underlined.
I don't know if this happens when it's surrounded by backticks (we'll find out now), but it at least happens for plain text. Here is a screenshot of it in action:
These webhooks are not made by our bot - they're directly from GitHub. To fix this, we'd need to create a web service that intercepts webhooks and then relays modified versions, which is a relatively large amount of work for such a minor issue.
80bdfa7 We need .git in the docker container for the SHA. - lemonsaurus
Build 20200822.3 failed
Requested by
GitHub
Duration
00:01:18
Build pipeline
Site
Build 20200822.4 failed
Requested by
GitHub
Duration
00:01:23
Build pipeline
Site
Build 20200822.5 failed
Requested by
GitHub
Duration
00:01:57
Build pipeline
Site
Build 20200822.6 failed
Requested by
GitHub
Duration
00:02:02
Build pipeline
Site
52d7ae0 omit resources.py from coverage reports. - lemonsaurus
Build 20200822.7 succeeded
Requested by
GitHub
Duration
00:02:09
Build pipeline
Site
Build 20200822.1 succeeded
Requested by
GitHub
Duration
00:01:02
Build pipeline
Seasonal Bot
Is this redundant? It causes the comment to show up twice for wiki pages
<body class="site">
<!-- Git hash for this release: 52d7ae050d32df7ceda6888f8a60590ceb0e37dc -->
<main class="site-content">
<!-- Git hash for this release: 52d7ae050d32df7ceda6888f8a60590ceb0e37dc -->
<nav class="navbar is-primary" role="navigation" aria-label="main navigation">
This seems redundant. Is this for coverage or something?
88d364b Remove the SHA from the wiki base.html - lemonsaurus
oh. my mistake, I was sure the wiki base didn't extend the other base. Removing it.
Ignoring the line with # pragma: no cover seems better than writing a function to get it to stop complaining. I don't know how to write a proper test for this anyway (like testing that the templates use it or something).
sorry, I misread this part. you're saying why not just import the constant
Well, we could do that, I guess I mostly made this because it feels misleading to call it a util if it's not even a function, but that's not much of a justification.
Build 20200822.8 succeeded
Requested by
GitHub
Duration
00:02:05
Build pipeline
Site
How about calling it constants.py then?
originally this function had all three lines of code, but then I realized it would be super wasteful to check the SHA every time this was called, so I moved it up to the top of the file. And now we're just left with, well, this.
a71c38f Move the SHA into constants.py. - lemonsaurus
Maybe this should be "private" but I'm not too fussed at this point.
Build 20200822.9 succeeded
Requested by
GitHub
Duration
00:01:59
Build pipeline
Site
Postgres backup completed!
Alright. Seems like we'll just have to live with that. It probably won't bother anyone too much.
bot/cogs/help.py uses its own message cleanup (help_cleanup) rather than the premade message cleanup (wait_for_deletion) on bot/utils/messages.py. I reviewed and edited the code, and there is no difference.
Add sleepy lemoji.
Screenshot from Discord:

Image:

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 Code of Conduct Code of conduct for our community
- Python Discord Contributor Wiki - A set of resources about setting up our services
Issue #1122. bot/cogs/help.py uses its own cleanup called help_cleanup rather than the premade cleanup (wait_for_deletion) from bot/utils/messages.py. This is an inconsistency because all messages with cleanup use wait_for_deletion.
Build 20200822.1 succeeded
Requested by
GitHub
Duration
00:02:35
Build pipeline
Bot
ee4efbb Define a Command subclass with root alias support - MarkKoz
f455a79 Bot: add root alias support - MarkKoz
36ec4b3 Patch d.py decorators to support root aliases - MarkKoz
027ce8c Bot: fix AttributeError for commands which lack... - MarkKoz
c6a20ef Replace alias command definitions with root_ali... - MarkKoz
[python-discord/bot] New branch created: feat/backend/707/alias\-decorator
Postgres backup completed!
Build 20200823.1 succeeded
Requested by
GitHub
Duration
00:00:58
Build pipeline
Seasonal Bot
075110f Address review comments from @kwzrd - jb3
This seems like a good start, we can add more topics down the line as people suggest them.
Build 20200823.1 succeeded
Requested by
GitHub
Duration
00:02:59
Build pipeline
Bot
Build 20200823.2 succeeded
Requested by
GitHub
Duration
00:00:55
Build pipeline
Seasonal Bot
Build 20200823.3 succeeded
Requested by
Joseph Banks
Duration
00:02:32
Build pipeline
Seasonal Bot
Connected!
Build 20200823.2 succeeded
Requested by
GitHub
Duration
00:02:52
Build pipeline
Bot
Build 20200823.3 succeeded
Requested by
GitHub
Duration
00:02:37
Build pipeline
Bot
Build 20200823.4 failed
Requested by
GitHub
Duration
00:04:23
Build pipeline
Bot
uh oh
Build 20200823.4 succeeded
Requested by
GitHub
Duration
00:01:36
Build pipeline
Bot
Connected!
Closes #707
Feature overview
A new keyword argument has been added to the discord.ext.commands.GroupMixin.command decorator. The kwarg root_aliases allows a sequence of alias names to be specified which are meant to act as top-level commands. For example,
@site_group.command(name="rules", aliases=("r", "rule"), root_aliases=("rules", "rule"))
Help command
These aliases also show up in the help command (they're sorted too)
.
The suggestion is to therefore to whitelist Modmail channels as mod channels. As these channel...
I don't particularly see the need to exclude #incidents or #incidents-archive, since no one is going to invoke commands in those channels. For the !infractions command group, we just whitelist the entire ModMail category, along with the mod channels:
https://github.com/python-discord/bot/blob/f97a5a62ab2f8e9af8a426b1ac6d9bf4896a75da/bot/cogs/moderation/management.py#L285-L297
For the user command, we currently have this:
https://github.com/python-discord/bot/blob/f97a5a62ab2f8e9af8a426...
yeah, just use in_whitelist_check, and whitelist the whole information extension. There's no reason we shouldn't have it in modmail threads.
A for loop seems a little bit more idiomatic here, but IMO either approach is fine in this case.
Postgres backup completed!
I would like to try this one
Build 20200824.1 succeeded
Requested by
GitHub
Duration
00:02:52
Build pipeline
Bot
Some notes on a not getting banned from Discord front:
- If we trip the anti-spam system we will receive an error similar to
discord.errors.Forbidden: 403 Forbidden (error code: 20026): Your bot has been flagged by our anti-spam system for abusive behavior. Please reach out to our team by going to https://dis.gd/report and selecting "Appeal an Action Trust and Safety took on my bot" as the Report Type. - This should cancel the DM process and alert the entire administration team since it w...
Add lemonsaurus lemoji.
Screenshot in discord:

Image:

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 Code of Conduct Code of conduct for our community
- Python Discord Contributor Wiki - A set of resources about setting up our services
Postgres backup completed!
Using the check is uglier IMO
show_verbose = in_whitelist_check(
ctx,
channels=constants.MODERATION_CHANNELS,
categories=[constants.Categories.modmail],
redirect=None,
fail_silently=True,
)
vs.
show_verbose = (
ctx.channel.id in constants.MODERATION_CHANNELS
or getattr(ctx.channel, "category_id", None) == constants.Categories.modmail
)
[python-discord/bot] New branch created: feat/info/1125/user\-cmd\-whitelist\-modmail
Fixes #1125
I also did a small refactor that switches out the command's redirect code with a in_whitelist_check.
Build 20200825.1 failed
Requested by
GitHub
Duration
00:02:21
Build pipeline
Bot
It could also be return len(itertools.takewhile(lambda c: c == " ", content)), but I'll change it to a for loop.
[bot] Branch bug/utility/829/non\-py\-code\-detection was force-pushed to `a955b61`
Build 20200825.3 succeeded
Requested by
GitHub
Duration
00:02:34
Build pipeline
Bot
When issuing an infraction in #mod-alerts, the bot message doesn't display the infractions total - contrary to how it works in #mods. Looking at the behavior of the !user command on the channel, it does seem to be considered a mod channel, so it's most likely a bug.
This ties into #1125 as the same should be there after the category is whitelisted
[python-discord/bot] New branch created: bold\_link
A small attempt to hopefully make people click more on the link to the guide on asking good questions by bolding it.
Current embeds:


Build 20200825.4 succeeded
Requested by
GitHub
Duration
00:02:50
Build pipeline
Bot
Build 20200826.1 succeeded
Requested by
GitHub
Duration
00:04:20
Build pipeline
Bot
Connected!
Build 20200826.2 succeeded
Requested by
GitHub
Duration
00:02:17
Build pipeline
Bot
ee4efbb Define a Command subclass with root alias support - MarkKoz
f455a79 Bot: add root alias support - MarkKoz
36ec4b3 Patch d.py decorators to support root aliases - MarkKoz
027ce8c Bot: fix AttributeError for commands which lack... - MarkKoz
c6a20ef Replace alias command definitions with root_ali... - MarkKoz
[python-discord/bot] branch deleted: feat/backend/707/alias\-decorator
Build 20200826.3 succeeded
Requested by
GitHub
Duration
00:04:36
Build pipeline
Bot
Connected!
Postgres backup completed!
I think we should try make it as easy as possible for users to re-join in this message.
KICKED_MESSAGE = f"""
Hi! You have been automatically kicked from Python Discord as you have failed to accept our rules \
within `{KICKED_AFTER}` days. If this was an accident, please feel free to join us again at https://discord.gg/python.
"""
Quick code comment, and treat the above comment as requested changes as well.
Yea, good idea. I'm tempted to define it in the config, probably under Guild.invite.
By doing that, we are editing out the ping to our core developers, which could result in confusion as to why a ping occurred. Not editing the ping out would be clearer as well as more consistent considering our sync check doesn't edit out the ping either.
Doesn't seem like there is any use in specifying everyone to False since the messages won't be controlled by users nor will they actually ping the @everyone role
Am I supposed to write tests for the implemented changes or will there be a seperate issue for that?
Added invite in 53189e8, but I had to put it on the next line. The invite does not embed properly if followed by a dot.

I think an extra newline may look tidier.
KICKED_MESSAGE = f"""
Hi! You have been automatically kicked from Python Discord as you have failed to accept our rules \
within `{KICKED_AFTER}` days. If this was an accident, please feel free to join us again!
{constants.Guild.invite}
"""
Build 20200826.4 succeeded
Requested by
GitHub
Duration
00:02:46
Build pipeline
Bot
Build 20200826.5 succeeded
Requested by
GitHub
Duration
00:02:44
Build pipeline
Bot
closes #375
Implementation
Pagination
- Using built in PageNumberPagination with the default page size being 10,000 user objects(dicts) per page.
- 2 query parameteres to control page number and page size.
Bulk Update
- New endpoint: /bot/users/bulk_patch
- A UserListSerializer for
UserSerializerhas been implemented to support bulk updates.(ref to docs: [drf-Customizing multiple update](https://www.django-rest-framework.org/api-guide/serializers/#customizing...
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 20200826.1 failed
Requested by
GitHub
Duration
00:02:01
Build pipeline
Site
Build 20200826.6 succeeded
Requested by
GitHub
Duration
00:02:45
Build pipeline
Bot
Build 20200826.2 failed
Requested by
GitHub
Duration
00:02:04
Build pipeline
Site
Currently the site requires 100% test coverage, so yes you will have to write and adjust tests.
By the way, it seems like we may already support bulk input in this endpoint - see the BulkSerializerMixin that we use in the serializer. So it might only be pagination that's required.
I was planning to handle this issue myself, but if you're confident you can handle it you're welcome to it.
Build 20200826.7 succeeded
Requested by
GitHub
Duration
00:02:30
Build pipeline
Bot
@jb3 We now stop kicking users on suspicious 403 and alert admins:

Screenshot is misleading ~ it will happen for 403s that are not 50_007, but I didn't know how to produce those in testing.
See 1d6d845 for implementation details. It may have to be adjusted, but I just don't know how to do it better.
@scragly This pull request is very stale. It looks like it's like 98% done, so it'd be a shame to have to close it. I really wish you'd find some time to finish it, but otherwise I'm considering whether we should just merge it even with the reviews unaddressed. I mean, having this feature with a few bugs is probably better than never having it.
I should have a bit of time today to address the reviews and to bring the changes up to date with master. I'll try jump on after breakfast too get it sorted.
Build 20200826.3 failed
Requested by
GitHub
Duration
00:01:42
Build pipeline
Site
This has grown very stale. Can someone on the @python-discord/core-developers team review this so we can get it merged?
@ks129 sorry for the long wait. Can you fix the failing builds? We will try to get this merged already.
looks good. Let's get this merged.
@ks129 Sorry, but you're gonna need to resolve some conflicts here before we can merge. Let me know when this is done and I'll merge it.
Okay, before I really jump into this review, I need you to take a look at the BulkSerializerMixin and figure out whether we still need it. It looks like it was implemented specifically to solve bulk input, and we even have a dependency just for that. So I'd like you to justify your approach over that approach, and consider whether this PR should remove the dependency that includes the BulkSerializerMixin.
To be clear, I'm not saying you should necessarily be using BulkSerializerMixin instead, but you need to at least figure out what it does and how it does it so we can make an informed decision about whether to keep it or get rid of it.
@ikuyarihS, I think it's enough to check if the Command was invoked with arguments since if that's a single tag, no following arguments will be provided
I'm not sure I buy this line of reasoning. some moderation commands (like !silence) do not take arguments. I think prefering commands over tags is probably the right suggestion.
@F4zii Do you have time to get this wrapped up? It looks like it's fallen victim to Covid19 and we should try to nurse it back to health and get it merged.
A partial review for now, but I'm not sure when I'm able to finish it, so I decided to submit it for now. I'll continue later.
I think this is fine like this.
After what looks like a very intense review process, I think this is now looking quite good. Let's try to get it merged already, it's not good that our most important features are completely untested while duckpond has 8000 tests. @kwzrd would you be able to take a second look at this?
Line 21 DELETE_EMOJI = Emojis.trashcan is no longer used and can be deleted. Not sure why the linter didn't pick this up.
Interestingly, paginated outputs won't show a delete emoji if there's only one page (e.g. !help Moderation). But that's a separate issue.
It's because it uses the staff channels constant rather than the mod channels constant.
6efd6e5 Fix infraction counts being shown in wrong chan... - MarkKoz
The staff channels constant is no longer used anywhere. Should it be deleted?
Build 20200827.1 failed
Requested by
GitHub
Duration
00:02:16
Build pipeline
Bot
Build 20200827.2 succeeded
Requested by
GitHub
Duration
00:02:46
Build pipeline
Bot
Connected!
Build 20200827.1 failed
Requested by
GitHub
Duration
00:01:41
Build pipeline
Site
Build 20200827.2 failed
Requested by
GitHub
Duration
00:01:31
Build pipeline
Site
Build 20200827.3 failed
Requested by
GitHub
Duration
00:01:33
Build pipeline
Site
Build 20200827.4 failed
Requested by
GitHub
Duration
00:01:28
Build pipeline
Site
The Situation
The Python Discord is a huge guild and mistakes do happen and can't always be prevented.
However what can be prevented is lack of an explanation or confusion for people when these disruptive messages do get sent out.

(Today has only lasted for 1 hour and 34 minutes so far and there are already 87 mentions way after the ping event)
If you look...
Build 20200827.5 failed
Requested by
GitHub
Duration
00:01:22
Build pipeline
Site
Build 20200827.6 failed
Requested by
GitHub
Duration
00:01:42
Build pipeline
Site
Build 20200827.7 failed
Requested by
GitHub
Duration
00:01:33
Build pipeline
Site
This is an extremely rare event and special case, I don't think we particularly need this.
The @ everyone recovery mode can also mute channels and lock vc automatically so mods don't have to struggle to quickly close things as they get out of hand.
There's already a similar feature planned for Rattlesnake, our closed source anti-raid bot.
Build 20200827.8 failed
Requested by
GitHub
Duration
00:01:44
Build pipeline
Site
Build 20200827.9 failed
Requested by
GitHub
Duration
00:01:44
Build pipeline
Site
Postgres backup completed!
Build 20200827.10 failed
Requested by
GitHub
Duration
00:01:33
Build pipeline
Site
I agree, this is extremly rare, and very well a waste of resources, if someone wants to make this, go ahead, i just dont see as this being something the primary bot devs should focus on.
Not a developer, but this looks fine and dandy to me!
Build 20200827.3 succeeded
Requested by
GitHub
Duration
00:02:50
Build pipeline
Bot
@lemonsaurus @ks129 My feedback on this PR has been addressed but a somewhat out-of-scope change was made here that I'm not entirely excited about & @sco1 agreed that it's sub-optimal when we spoke about it some time back.
I requested only that the newlines are removed from the string because they are later on stripped by the shorten, and so the result string looks different than what the literal implies, which is misleading. @ks129 made a more adventurous attempt at keeping the newlines...
The issue:
Currently, if someone puts down an @everyone ping, a mod has to come and respond to it to tell the person not to ping 95k+ people. Now, this usually works fine, but accidents happen, and things can end up happening like lemon accidentally pinging everyone, because android doesn't have a check for that (we're not upset lemon!).
Proposed solution:
We add a auto-respond to the bot, sort of like in the attachment auto-respond, that contacts the user to explain why they shoul...
I managed to simplify the code in the bulk update PR, I no longer need to override the to_internal_value function, I just had to define an id field explicitly as mentioned in the docs(which I missed before).
Coming to the drf-bulk package, we are only using it for multiple creations, this can be easily achieved by overriding the create method in ModelViewSet as mentioned in the docs(I tested it and works fine, takes around 7-10 lines of code).
So, I would say that we can get r...
- This should be implemented as a filter.
- Automatically deletes the message with the fake everyone ping in it, because we don't want any idiot owners quoting those messages by accident :grin:
- Mutes the user for 10 minutes, similar to what we do for spam detectors.
- Posts a message to the channel with a ping of the user and a message similar to what's in OPs description.
- Maybe we don't need to link the pinned message, lol.
Okay @RohanJnr - Then I think you should get rid of the bulk plugin.
I just thought linking the pinned message would help people realize what happens when more 95k+ people get pinged :lemon_pleased:.
I think this link is not good idea, but yes, this should have filter and I can create it, when someone else don't do this.
Connected!
Currently there are two internal tasks: one that manages users periodically (give role or kick), and one that pings @Unverified every n hours. When I was designing this initially I wanted there to be a command which will allow us to start or stop the tasks, and persist this setting in Redis, so that they will remember whether to run or not if the bot restarts. However, at the time it felt like we didn't need to keep track of these settings on per-task basis, either both tasks are running (m...
The link was more of a joke, but I could also implement this to the bot.
I think since you created the issue, @MrAwesomeRocks, you can handle it if you want it.
I prefer the second option (kill both tasks) because it's the simplest. The role task just adds a role, which is useless on its own (i.e. when the kick task isn't also running). Once the role task is restarted in the future, it'll process all the users it missed while it was off, so there's no benefit to keeping it running while the kick task is off.
I agree with Mark in that case, second option would be ideal.
30cbde7 AntiSpam: ignore custom emojis in code blocks - MarkKoz
[python-discord/bot] New branch created: bug/filters/1130/ignore\-codeblock\-emoji
In code blocks, custom emojis render as text rather than as images. Therefore, they probably aren't being spammed and should be ignored.
Fix #1130
Build 20200827.4 succeeded
Requested by
GitHub
Duration
00:02:54
Build pipeline
Bot
@lemonsaurus How does the current spam filter work? Could you send one of the current filter files?
@lemonsaurus There's a section in the config file talking about ping everyone, is this implemented anywhere?

So I have to:
- Add my rule to the config file.
- Write my rule to:
- Get relevant messages
- Read the everyone role from the config file
- Check if the everyone role is mentioned in the config file
- Add my rule to this dict
@lemonsaurus
Build 20200827.5 succeeded
Requested by
Joseph Banks
Duration
00:04:38
Build pipeline
Bot
Connected!
Build 20200828.1 succeeded
Requested by
GitHub
Duration
00:02:40
Build pipeline
Bot
Build 20200828.2 succeeded
Requested by
GitHub
Duration
00:04:43
Build pipeline
Bot
Connected!
Postgres backup completed!
Build 20200828.1 failed
Requested by
GitHub
Duration
00:01:11
Build pipeline
Site
Build 20200828.2 failed
Requested by
GitHub
Duration
00:01:44
Build pipeline
Site
Build 20200828.3 succeeded
Requested by
GitHub
Duration
00:02:11
Build pipeline
Site
There's a migration conflict you need to fix. @lemonsaurus has pointed out previously that merges can be avoided by simply changing the dependency of your migration to the latest migration (assuming there are no actual conflicts). Correct me if I'm wrong.
Won't this reset the names from the first query back to unused? The exclude is only filtering by other_names. I think it needs to filter by both queryset and other_names.
I really had a feeling there must be a simpler way to do it. I played around with a bunch of ideas and ultimately came up with this:
queryset = self.get_queryset().order_by('used', '?')[:random_count]
if any(obj.used for obj in queryset):
self.get_queryset().update(
used=Case(
When(name__in=(obj.name for obj in queryset), then=Value(True)),
default=Value(False)
)
)
else:
self.get_queryset().filter(
name__in=(obj...
It's redundant to write "test" in the docstring of a test function. It's also awkward to use "does". If I were to use "test", I'd write it as
Test if this returns a 401 response when not authenticated.
Can also use "that" instead of "if". Anyway, as I said, I'd really opt for something along the lines of
Should return a 401 response code when not authenticated.
or
Returned a 401 response code because of no authentication.
Some extensions use index.sass as an entry point instead of _all.sass.
This fixes a compilation error of bulma-tooltip I experienced in a docker container, but that I couldn't replicate outside of it.
Checks fail on code that is fixed in this unmerged commit https://github.com/python-discord/django-simple-bulma/pull/62/commits/e1cc3236c5eddfa271bc60cc80eb892eb3a5e95f
I welcome any simplification - I shared your gut feeling that there had to be a simpler way, but didn't have a great suggestion.
I think your approach looks smart, but it would require a few comments to not be scary. Especially the if clause.
I sort of agree with @MarkKoz, although docstrings should be imperative mood - so something like Return a 401 response when not authenticated seems more in line with PEP257 to me.
@JonasUJ can you just add that commit into this branch then?
I can't believe I missed this typo.
Postgres backup completed!
Build 20200829.1 failed
Requested by
GitHub
Duration
00:01:55
Build pipeline
Site
Build 20200829.2 succeeded
Requested by
GitHub
Duration
00:02:17
Build pipeline
Site
@MarkKoz Done, I fixed that. And interesting, on the setup function, this message Cog loaded: Help is logged as an information message, but there is no need, because on the bot/bot.py file, add_cog was overrided to log what cog was loaded.
Build 20200829.1 succeeded
Requested by
GitHub
Duration
00:03:01
Build pipeline
Bot
Relevant Issues
Closes #1114 in the Python Discord bot repository.
Description
I've migrated the Cog from here to seasonalbot/bot/exts/evergreen/wolfram. No changes in the cog, but slight changes in how the constants are created. No .yml file is used for configuring environment variables.
Reasoning
I copy pasted the cog from one repository...
Build 20200829.1 succeeded
Requested by
GitHub
Duration
00:00:53
Build pipeline
Seasonal Bot
8b10533 Completely gutted the wolfram command. - Xithrius
[python-discord/bot] New branch created: remove\-wolfram
Closes #1114
Moved wolfram.py to seasonalbot/bot/exts/evergreen/wolfram.py. More info mentioned in this PR.
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 20200829.2 succeeded
Requested by
GitHub
Duration
00:04:14
Build pipeline
Bot
46ef497 (Off-topic Channel Names): Added new field to m... - ks129
a3d2938 (Off-topic Channel Names Viewset): Added docume... - ks129
81516be (Off-topic Channel Names Viewset Tests): Added ... - ks129
1f66694 (Off-topic Channel Names Viewset Tests): Added ... - ks129
02315e7 (Off-topic Channel Names Viewset Tests): Added ... - ks129
Build 20200829.3 succeeded
Requested by
GitHub
Duration
00:04:00
Build pipeline
Site
@MarkKoz @Senjan21 I agree & went with option 2 but for clarity: kicking users and adding the @Unverified role is handled by the same task (above referred to task task 1). Task 2 only pings.
Build 20200829.3 succeeded
Requested by
GitHub
Duration
00:02:57
Build pipeline
Bot
6b7ecab Revert "Off-topic channel names non random sele... - jb3
[python-discord/site] New branch created: revert\-348\-off\-topic\-non\-random
Reverts python-discord/site#348
Build 20200829.4 succeeded
Requested by
GitHub
Duration
00:01:56
Build pipeline
Site
Build 20200829.5 succeeded
Requested by
GitHub
Duration
00:03:44
Build pipeline
Site
Build 20200829.4 succeeded
Requested by
GitHub
Duration
00:02:55
Build pipeline
Bot
Just a few minor things and it should be good to go.
Could this be put in alphabetical order?
These two should be cast into integers.
Instead of copying over utils, you can use the arrow module.
cooldown = arrow.utcnow().shift(seconds=int(user_rate)).humanize(only_distance=True)
Build 20200829.2 failed
Requested by
GitHub
Duration
00:00:56
Build pipeline
Seasonal Bot
Build 20200829.3 succeeded
Requested by
GitHub
Duration
00:00:58
Build pipeline
Seasonal Bot
f2550a0 Accidently commited tokens. All have been reset. - Xithrius
Everyone Ping Auto-Responder
Closes #1131
The result of sending an @everyone ping would look like this:

The user would also get DMed the default message for an anti-spam rule:

Also, this filter detects all cases of ...
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 20200829.4 succeeded
Requested by
GitHub
Duration
00:00:58
Build pipeline
Seasonal Bot
Build 20200829.5 failed
Requested by
GitHub
Duration
00:00:49
Build pipeline
Bot
Build 20200829.5 succeeded
Requested by
GitHub
Duration
00:00:52
Build pipeline
Seasonal Bot
Build 20200829.6 succeeded
Requested by
GitHub
Duration
00:02:41
Build pipeline
Bot
Build 20200829.6 succeeded
Requested by
GitHub
Duration
00:01:30
Build pipeline
Seasonal Bot
Issue
When using a command like !rule [rules...] or !pep , there is no way for the user to delete the response sent by the bot.
This is would be relevant when entering the wrong argument (for example !rule 4 instead of !rule 5), you just want to check something real quick or you get the output wasn't what you expected.
Proposed solution
Add a "trash can" reaction to let the user delete the response from the bot. This would be the default for all commands, with the **...
See #348 for more information. This PR got reverted because of mess with migrations. Fixed it here.
Build 20200830.1 succeeded
Requested by
GitHub
Duration
00:02:07
Build pipeline
Site
Postgres backup completed!
Build 20200830.1 succeeded
Requested by
GitHub
Duration
00:02:44
Build pipeline
Bot
Build 20200830.2 succeeded
Requested by
GitHub
Duration
00:02:42
Build pipeline
Bot
Changed the message to show the full member count, not just thousands:

Notes:
- This value will be the actual member count.
- The number will also have a comma every three digits.
I have a few minor suggestions here.
I don't like the It will not have good results part of this, that feels like we're saying it's okay to ping 95000 people but it won't get you the results you were hoping for.
Instead of this second line, maybe we can give this embed a headline. For example, you could use a random headline from bot.constants.NEGATIVE_REPLIES?
Please don't use cryptic, abbreviated variable names like this.
Feels weird to me that we're pinging the user before the embed. It makes the embed sandwiched between two plaintext lines, and also makes us ping the user twice instead of just once. I don't think we need it.
await last_message.channel.send(embed=embed)
By It will not have good results, I was trying to say that people would get upset if you pinged them.
I'll look at bot.constants.NEGATIVE_REPLIES, didn't know that existed.
The bot now responds like this:

Build 20200830.3 succeeded
Requested by
GitHub
Duration
00:02:37
Build pipeline
Bot
I'd suggest to make this as embed title
NEGATIVE_REPLIES now moved to title of embed instead of bold.

Build 20200830.4 succeeded
Requested by
GitHub
Duration
00:02:28
Build pipeline
Bot
@MrAwesomeRocks
Remember to resolve conversations in this thread when you've addressed them.
@lemonsaurus
Didn't know about that. All the conversations have been resolved.
You've implemented this as a frequency filter, which I find a bit weird. It's not really relevant for our community to be able to configure this filter to allow only 2 @everyone per 10 seconds, for example. I can't see why anyone would ever need that.
Perhaps we can just simplify this pull request by removing the frequency aspect completely from this filter, and removing the corresponding configuration option, too.
@lemonsaurus
The issue is, to implement this as an anti-spam rule, in anitspam.py, there is this code that checks for those two config options:
for required_key in ('interval', 'max'):
if required_key not in config:
log.error(
f"`{required_key}` is required but was not "
f"set in rule `{name}`'s configuration."
)
validation_errors[name] = f"Key `{required_key}` is required but not set for rule `{name}`"
...
Currently the dm-relay message username will not include the user ID if only an attachment is sent, so it looks like this:

Whereas it should look like this:

This is because it uses [bot.utils.messages.send_attachments](https://github.com/python-discord/bot/blob/1bd5c...
Build 20200830.2 succeeded
Requested by
GitHub
Duration
00:03:50
Build pipeline
Site
The current solution will punish me if I send a message containing @everyone as a markdown codeblock, which is unfortunate because there is clearly no intention to ping, e.g. when discussing this feature.
I also believe this will not react to pings constructed as ``.
I do not believe this comment is necessary, it just repeats what the code says. Similar above with "Make embed".
Build 20200830.5 succeeded
Requested by
GitHub
Duration
00:04:51
Build pipeline
Bot
Connected!
okay, after looking at antispam.py a bit, I guess refactoring to allow non-frequency spam filters seems like it was would be out of scope.
I guess we will go with this solution.
Build 20200831.1 succeeded
Requested by
GitHub
Duration
00:02:50
Build pipeline
Bot
- Switched to regex to avoid punishing users for codeblocks.
- Also now catches
<@&{guild_id}>style pings. - Deleted the redundant comments.
- Changed the message to be less like a frequency anti-spam rule:

Postgres backup completed!
There are at least 5-6 requests every day in python discord, asking how to install python, which version of python they want to install, why "pip" is not working and someone directly pinging the help channel without doing any research for their errors. While I don't think we can deal with people trying to get spoonfed but at least, we do something about the "pip", python versions, and how to install python and IDEs.
We could create tags for how to install Python, how to install packages... See the issue #810.
Describe the bug
When using type comments and having ANN101disabled, I received a ANN001 Missing type annotation for function argument for method containing a self argument.
In contrast, using type hints no error is raised.
Is this intended?
To Reproduce
.flake8:
[flake8]
max-line-length = 88
ignore = E501, E203, W503, ANN101, ANN102
A.py:
class A:
def __init__(self): # type: () -> None
self._var = 1
@property
...
c89a9ea Bump black from 19.10b0 to 20.8b1 - dependabot-preview[bot]
[python-discord/flake8-annotations] New branch created: dependabot/pip/black\-20\.8b1
Bumps black from 19.10b0 to 20.8b1.
Changelog
Sourced from black's changelog.
20.8b1
Packaging
explicitly depend on Click 7.1.2 or newer as Black no longer works with versions
older than 7.0
20.8b0
Black
re-implemented support for explicit trailing commas: now it works consistently within
any bracket pair, including nested structures (#1288 and duplicates)
Black now reindents docstrings when reindenting code around it (#1053)
Black now shows colored d...
Greetings, thanks for the report.
Yes, this is the expected behavior. Setting the ANN101 flag does not inject an annotation for self, but rather just ignores the code when yielding errors to flake8. For type comments, this means that def sum(self, a): # type: (int) -> int is interpreted as hinting self as int, rather than a, resulting in the ANN001 error being yielded.
This type of scenario is what we had in mind for the [partial type comment caveat](https://github.com/py...
Will bump manually on the dev branch, as this is making new formatting changes & angering the CI gods.
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/black\-20\.8b1
My regex was catching some incorrect strings, such as ```markdown
My regex was catching some incorrect strings, such as
```@everyone
here is some text
here is more text```
Now the regex doesn't catch those incorrect strings.
Build 20200831.2 succeeded
Requested by
GitHub
Duration
00:03:15
Build pipeline
Bot
line 38: at the end im pretty sure there doesn't need to be a comma, probably just nit picking here :)
This diff is a good example of how the trailing comma is useful. Because line 37 did not have the trailing comma, it had to be changed in order to add another element.
Build 20200831.1 succeeded
Requested by
GitHub
Duration
00:02:10
Build pipeline
Site
Tested after update from master as well.
Bug:
If you DM an attachment of a certain type (seems to only happen for smaller files or non image/video files, not exactly sure) to the bot, instead of relaying it to the dm-log channel as expected, the message is seemingly ignored.
Cause:
I did some detective work and found out this error was being raised by this function when the attachment was DMed to the bot:
...
Build 20200831.2 succeeded
Requested by
GitHub
Duration
00:04:03
Build pipeline
Site
Currently the antimalware cog file filter triggers on messages from the bot, and also on webhook messages. So for the example somebody tries to send an attachment from python using !int eval, it will be caught by the filter

Also, if somebody sends a non-whitelisted attachment to the bot, (and it isn't ignored because of #1139), it will be relayed to dm-log but then caught by the ...
Alright, i was just thinking it might not need to be there, im just someone who works in environments where using as least space as possible is the goal. :)
We've been getting that 415 for a long time and no one has ever figured out why. A 415 response doesn't even make sense, but that's Discord for you. I believe use_cached is enabled because some other code does try to log attachments for deleted messages. If 415 is the standard response for when a cached asset couldn't be retrieved, then that error should be ignored in send_attachments.
How about supporting arbitrary kwargs to pass on to send()? An explicit username kwarg is kinda odd since it will only be useful if a webhook is given as the destination. It's not too bad though.
The only way I see a decorator working is if the command returns the message it sends so that the decorator can retrieve it and call wait_for_deletion.
I don't strongly oppose this, but I'd rather not implement this. The purpose of the eval command is to make it convenient for users to evaluate code while they're in the Discord client. If users already leave the client to write code and upload it to a paste site, then they can go through the extra trouble to run their code themselves and paste the output. In this work flow, I doubt someone would have uploaded code without running it first anyway.
This is a relatively incomplex feature, bu...
So what is your proposed solution to this? Is it to create tags as AtieP suggested?
Remove ImagePaginator too since it's no longer being used by anything nor is the likelihood of it being used again the future high enough to warrant keeping it around.
Since this is mostly copied, whatever license its under should be probably followed. This license is for unittest. The mock module does not have its own license, only a comment that says its maintained by Michael Foord. Maybe the PSF license should be followed. I don't know, this is not straight forward.
All of kwzrd's concerns about punishing users who put @everyone in codeblocks should be fixed now.
Build 20200901.1 succeeded
Requested by
GitHub
Duration
00:02:54
Build pipeline
Bot
Now it catches @everyone with text next to it, such as hello@everyone.
Build 20200901.2 failed
Requested by
GitHub
Duration
00:02:06
Build pipeline
Bot
Build 20200901.3 succeeded
Requested by
GitHub
Duration
00:02:37
Build pipeline
Bot
Build 20200901.4 succeeded
Requested by
GitHub
Duration
00:02:50
Build pipeline
Bot
Postgres backup completed!
If we require use_cached=True, would it not work to try that and fall back to use_cached=False if it fails with a 415, so we keep the ability to save deleted files, but also fix this problem?
Sure, supporting arbitrary kwargs sounds like a good idea to me.
Prematurely hit send and close issue.
I think another option would be to make the decorator add a variable or similar to the command function, that will be passed forward to the function that handles the trash option.
Would this be possible?
Makes antimalware cog ignore webhook and bot messages, closes #1140
Build 20200901.5 failed
Requested by
GitHub
Duration
00:05:28
Build pipeline
Bot
Build 20200901.6 succeeded
Requested by
GitHub
Duration
00:03:12
Build pipeline
Bot
Build 20200901.7 succeeded
Requested by
GitHub
Duration
00:03:01
Build pipeline
Bot
Build 20200901.8 succeeded
Requested by
GitHub
Duration
00:04:37
Build pipeline
Bot
Connected!
Build 20200901.1 failed
Requested by
GitHub
Duration
00:02:01
Build pipeline
Site
Build 20200901.2 succeeded
Requested by
GitHub
Duration
00:02:42
Build pipeline
Site
Build 20200901.3 succeeded
Requested by
Leon Sandรธy
Duration
00:03:59
Build pipeline
Site
Build 20200901.9 succeeded
Requested by
GitHub
Duration
00:03:03
Build pipeline
Bot
Build 20200901.10 succeeded
Requested by
GitHub
Duration
00:06:24
Build pipeline
Bot
Connected!
Postgres backup completed!
i wnt to work on this command :)
!dormant or !close should also be declined in this case.
Maybe just add a check to dormant command.
Also when this command is cancelled it should mention the user who owns that help channel
in case he types !close and alt tab instantly without noticing the message that his !close request was declined
Mention will show a ping sign on the app icon grabbing the attention that something didn't went right.
I think we should remove this. I think it's been made irrelevant by wait_until_guild_available.
The staff channels constant is no longer used anywhere. Should it be deleted?
I don't see why not. No point in keeping stuff that we're not using.
@MrAwesomeRocks
How will this affect staff members? They should be immune to it. Can you confirm that they will be? I think they're immune to all anti-spam, but I'd just like a confirmation.
Build 20200902.1 succeeded
Requested by
GitHub
Duration
00:03:41
Build pipeline
Bot
Build 20200902.2 succeeded
Requested by
Leon Sandรธy
Duration
00:04:51
Build pipeline
Bot
Connected!
Thanks. I'd like input from a few more people before actioning it, especially from @python-discord/core-developers.
203abc9 Constants: remove staff_channels - MarkKoz
Build 20200902.3 succeeded
Requested by
GitHub
Duration
00:02:56
Build pipeline
Bot
Yeah, that sounds okay. You could make it more clever by only using the proxy when it's beneficial (i.e. when it needs to fetch a deleted attachment). This will avoid always making two separate requests. Furthermore, it may not be worth requesting via the normal URL if the proxy fails for attachments specified as deleted by the caller (or maybe let the caller specify use_cached directly). The impression I get is that the success rate of the normal URL for deleted attachments would also be q...
46ef497 (Off-topic Channel Names): Added new field to m... - ks129
a3d2938 (Off-topic Channel Names Viewset): Added docume... - ks129
81516be (Off-topic Channel Names Viewset Tests): Added ... - ks129
1f66694 (Off-topic Channel Names Viewset Tests): Added ... - ks129
02315e7 (Off-topic Channel Names Viewset Tests): Added ... - ks129
Build 20200902.1 succeeded
Requested by
GitHub
Duration
00:02:07
Build pipeline
Site
9e70bb6 Add gitpython ~=3.1.7 as a dependency. - lemonsaurus
1d4db56 Install git in the docker environment. - lemonsaurus
1a55e92 Add a context processor that outputs the git SHA. - lemonsaurus
75181a5 Add a comment with the git SHA to base templates. - lemonsaurus
0953808 Optimize the git install in Dockerfile. - lemonsaurus
[python-discord/site] branch deleted: add\_deployment\_info
Build 20200902.2 failed
Requested by
Joseph Banks
Duration
00:04:38
Build pipeline
Site
Build 20200902.2 failed
Requested by
Joseph Banks
Duration
00:00:00
Build pipeline
Site
Build 20200902.2 failed
Requested by
Joseph Banks
Duration
00:00:00
Build pipeline
Site
Build 20200902.2 failed
Requested by
Joseph Banks
Duration
00:00:00
Build pipeline
Site
Build 20200902.2 failed
Requested by
Joseph Banks
Duration
00:00:00
Build pipeline
Site
Build 20200902.3 failed
Requested by
Joseph Banks
Duration
00:00:00
Build pipeline
Site
Build 20200902.4 failed
Requested by
Joseph Banks
Duration
00:00:00
Build pipeline
Site
Build 20200902.5 succeeded
Requested by
Joseph Banks
Duration
00:03:57
Build pipeline
Site
If this is the same issue as #909; supposedly the media server is used for thumbnails and isn't cleared immediately on deletion like the message and cdn, so we should be able to ignore the filetypes that don't embed in a way where the media server for resizing etc. is necessary
Connected!
Connected!
I'm all for removal of this feature.
Honestly, with you having solved the actual cause of the issue, I don't really see this feature coming into play for legitimate reasons. If something funky does happen in the future, we'll have to a big sync instead. The frequent sync issues we've had no longer occur, though.


