#dev-log
1 messages · Page 35 of 1
If the PGSQL container failed to start, it would keep waiting and outputting retrying as the socket only doesn't error when the port is open, meaning the PGSQL container is fully ready to accept connections.
This also is only done during dev environments, so it's a good reminder that they may have forgotten to up the other container (dunno why they're running docker-compose site in that case though), or they severely broke something.
It's just ensuring that --silent isn't used when developing.
Now that I'm trying to remember the exact thought process that made me write it, I actually can't recall the detailed reason. You're right, that part could probs just be removed. I'm going to do a big more digging in the Django docs just in case though.
I think it might have been at a time when I was going to make debug the default. Adjusted now though anyhow, thanks!
Build 20190928.6 succeeded
Requested by
GitHub
Duration
00:02:00
Build pipeline
Site
Connected!
Hmm, I'm not sure, as it's pretty clear what it's doing and it's simple to interrupt. I guess though if they run the container detached and it has that issue then it would just keep going and going I guess until they realise by manually checking logs, so for just that possible edge case, it might make sense.
d6ad156 Poll the database a maximum of 10 attempts befo... - scragly
On testing, I realised it's actually impossible to launch web alone via compose thanks to depends_on anyway, so the only case is if something is really really broken somehow. At any rate, I've added and tested the retry maximum.
Build 20190928.7 succeeded
Requested by
GitHub
Duration
00:01:58
Build pipeline
Site
Any idea why the pipeline is failing on typed_ast? It's definitely in Pipefile.lock
Any idea why the pipeline is failing on typed_ast? It's definitely in Pipefile.lock
https://paste.pythondiscord.com/ebelenecex.txt
Manylinux wheels don't work on muslc-based distros such as Alpine. Therefore, it tries to build from source but cannot because gcc is not installed. Could be fixed but the images will probably be moved to python slim images like the other repos, which I think is Debian.
Postgres backup completed!
I've added the humanized timedelta and the reminder content, but I have no idea how I should had the jump url. Should it be a link inside the embed content ?
Yep, it's cleanest to add it as an inline link within the embed.
This looks excellent, my only comments are what @MarkKoz already caught and you fixed already.
Build 20190929.1 succeeded
Requested by
GitHub
Duration
00:01:55
Build pipeline
Site
4769c8b Create custom manage.py entry point, remove scr... - scragly
6d9dcc3 Automatically create a default bot api token fo... - scragly
7f8468e Support internal docker network DNS resolution ... - scragly
2522472 Fix comments after previous changes. - scragly
a399d04 Remove useless verbosity check. - scragly
[python-discord/site] branch deleted: new\-managepy
Build 20190929.2 failed
Requested by
Leon Sandøy
Duration
00:02:18
Build pipeline
Site
Build 20190929.3 succeeded
Requested by
GitHub
Duration
00:03:45
Build pipeline
Site
d05e74c Make bot wait for web, use latest web image. - scragly
9893b35 Remove temp instructions, add link to contrib g... - scragly
Now that https://github.com/python-discord/site/pull/265 has been merged, the bot project can utilise the better entry point, remove a couple of redundant sections in the compose, and add the bot service to compose for local development.
BOT_TOKEN is pulled directly from the .env still, just the same as when launching via pipenv locally.
BOT_API_KEY uses the default key that site now generates automatically.
Setting up the hosts file is now entirely optional, as the API...
Build 20190930.1 succeeded
Requested by
GitHub
Duration
00:01:38
Build pipeline
Bot
Postgres backup completed!
1b57cf4 Ensure docker containers are published only for... - scragly
b19c5f9 Ensure docker containers are published only for... - scragly
4769c8b Create custom manage.py entry point, remove scr... - scragly
6d9dcc3 Automatically create a default bot api token fo... - scragly
7f8468e Support internal docker network DNS resolution ... - scragly
I'm gonna close this, I agree with @MarkKoz and @jchristgit is AWOL at the moment.
Build 20190930.1 succeeded
Requested by
GitHub
Duration
00:02:09
Build pipeline
Site
This is probably still relevant, but needs a better specification. I also don't agree that this is a good first issue, I think this should be handled by the @python-discord/devops team. I'm gonna close this issue and we can create a new one with a better specification once we're done designing the monitoring solution.
[python-discord/site] branch deleted: decoupling\-warnings\-and\-notes
This issue is probably a good one for hacktoberfest. We have all the Tags stored in the database, and this just needs to display them. This will be a regular static page, so it's really just a matter of adding a page and writing some jinja to display it in a way that jives well with the rest of the site.
Build 20190930.2 succeeded
Requested by
GitHub
Duration
00:04:00
Build pipeline
Site
This is a fairly small PR, but I can't see any major (or even minor) problems with it. It's time sensitive so let's get it merged.
76208fa Use pathlib, avoid inner bot directory for logs. - scragly
c11dc54 Update site to use new manage.py, add bot dev c... - scragly
c9a83bb Do up some basic setup instructions for new setup. - scragly
d05e74c Make bot wait for web, use latest web image. - scragly
9893b35 Remove temp instructions, add link to contrib g... - scragly
[python-discord/bot] branch deleted: new\-development\-workflow
Build 20190930.2 succeeded
Requested by
GitHub
Duration
00:03:46
Build pipeline
Bot
Connected!
Build 20190930.3 succeeded
Requested by
Leon Sandøy
Duration
00:04:13
Build pipeline
Site
Currently, all the headers that are created by the wiki will have id's that are prefixed with wiki-toc. As such, when you want to link a header, the link will look something like https://pythondiscord.com/pages/contributing/site/#wiki-toc-development-environment.
It would be better if this simply said #development-environment, so let's change that.
[python-discord/site] New branch created: fix\_toc\_header
ccb4211 Monkeypatch in new HEADER_ID_PREFIX. - lemonsaurus
Currently, all toc-links will have a wiki-toc prefix. This commit removes this prefix, so that we can header link with just something like #environment instead of #wiki-toc-environment.
There's no option for this in the django-wiki, so this monkeypatch is the best solution I could find. I'm not super happy with it, though, so if anyone has a better solution, do let me know.
Closes #276.
Build 20190930.4 succeeded
Requested by
GitHub
Duration
00:02:06
Build pipeline
Site
[python-discord/site] New branch created: migrate\-nominations\-to\-nominations\-models
95cf618 Migrate nominations to new Nomination model - SebastiaanZ
[site] Branch migrate\-nominations\-to\-nominations\-models was force-pushed to `9b38f42`
Before the migration to Django, we stored information on a nomination, like the reason and end_reason, as note infractions with a special prefix in the infractions table. We've since decided that nominations shouldn't be categorized under infractions and have create a separate model for nominations in the new Django back-end. This PR migrates the historical nomination data still stored in the infractions table to the new nominations table by using a data migration.
The data migration t...
Build 20190930.5 succeeded
Requested by
GitHub
Duration
00:02:17
Build pipeline
Site
Right now, there's nothing discouraging us from having these off-topic names added to the list:
kosaa
kosaaa
kosaaaa
Although that would be nice, we should have the bot by default return that an off-topic name is too similar to an existing one and thus wasn't added.
Implementation details
- Show the similar name and the similarity
- Don't add the name if it is >X% similar to an existing one
- Add a
!otn forceaddto bypass the check
I came to the same conclusion as you when I looked at it briefly yesterday. I'm not sure why the authors of the plugin did not make this configurable, since it seems to be just a single constant. I wonder if there's some hidden limitation we're overlooking, although there doesn't appear to be an obvious one.
Hi, this PR add :
- reminder name and timedelta in the confirmation message
- jump url to the message where the reminder was set in the deliver message
I set this PR to be a draft PR because I don’t have my test environment setup yet so theses changes aren’t tested yet.
This PR closes #241.
Build 20190930.4 failed
Requested by
GitHub
Duration
00:01:26
Build pipeline
Bot
Build 20190930.5 failed
Requested by
GitHub
Duration
00:01:18
Build pipeline
Bot
Hi! It looks like this hasn't been claimed by anyone yet. Can I take a stab at it? I think it's within my abilities but I'll indicate within a week if I don't think I can handle it for some reason.
@bendiller no one seem to work on it yet, I assigned you. If you need any help, feel free to leave a message here, or send a chat in the server.
The second problem should no longer be a problem; it was fixed during the upgrade to the latest version of discord.py.
:warning: Heads up! :warning:
A bunch of these ID links have been hardcoded into our guides, so if you're going to merge this, these hardcoded URLs will stop working. It would therefore be great if you, whoeever you are, could take responsibility for getting these URLs updated after you hit that Merge button.
[python-discord/site] New branch created: navbar\-add\-contributing\-link
c1d06de Add link to Contributing landing page to navbar - SebastiaanZ
This adds a link to the contributing page to the navbar on our website.
Build 20190930.6 succeeded
Requested by
GitHub
Duration
00:02:04
Build pipeline
Site
I've looked, but I haven't found a built-in way to do this with DRF. Since a lot of the serializers already have some sort of custom validation function, I think the easiest way forward is to add a decorator that compares the keys of the received data with the fields specified in the model before it runs the regular validate method of the serialized.
I'll have a look to see if I can come up with something that doesn't look too bad.
A minor usability that allows !docs Python in place of !docs get Python.
This seems to have been the intention of the old code, however invoke doesn't pass the arguments forward by default, so the UX was confusing.
AFAICT this could be written ctx.invoke(self.get_command, symbol), however this would only serve to complicate and slow things down. Tell me if it provides some utility, and I'll change it
Build 20190930.6 succeeded
Requested by
GitHub
Duration
00:01:34
Build pipeline
Bot
@avayert Said they wish to do this one, so I'm assigning them.
[python-discord/site] branch deleted: fix\_toc\_header
Build 20190930.7 succeeded
Requested by
GitHub
Duration
00:03:48
Build pipeline
Site
This allows us to do some backend QoL stuff:
- Override
add_cog()so that it logs the loading of cogs - IDEs will recognise additional attributes, such as the API client
- Override
load_extensions()so that it automatically prependsbot.cogsto the name given
And there's maybe more stuff I'm forgetting.
The current contributor document links to the pre-migration developer environment documentation, now that the docs are updated this can be updated with the new reference.
[python-discord/bot] New branch created: update\-contrib\-doc
This was discussed further in-server and it was decided splitting the cogs is fine under the condition that we support setting a category for a cog explicitly for help output, which should be a simple thing to support.
[python-discord/site] New branch created: update\-contrib\-doc
9113864 Update contrib doc to point to new wiki links - sco1
Update the contributor doc links to point to the new wiki pages
Closes #469
[python-discord/site] branch deleted: update\-contrib\-doc
Build 20191001.1 succeeded
Requested by
GitHub
Duration
00:01:36
Build pipeline
Bot
Build 20191001.1 succeeded
Requested by
GitHub
Duration
00:01:57
Build pipeline
Site
Build 20191001.2 succeeded
Requested by
GitHub
Duration
00:03:44
Build pipeline
Site
Build 20191001.3 succeeded
Requested by
GitHub
Duration
00:03:55
Build pipeline
Site
I thought it'd be cool if the current logo had some more pop to it, so I made it shimmer.

Disclaimer: I'm not great at GFX stuff, so this isn't perfect.
Remove executable or potentially executable files that may be malicious (malware, spam, zip bombs, etc.).
Per Lemon: "Staff meeting consensus is that we can start simple by whitelisting certain extensions and deleting everything else. If people try to get around this with malicious hybrid filetypes or whatever, we will discuss maybe using ClamAV to scan files, but for now, we'll keep it simple. This should just be another filter, like mentionspam."
Org issue: https://github.com/python-...
Build 20191001.2 failed
Requested by
GitHub
Duration
00:01:32
Build pipeline
Bot
Build 20191001.3 succeeded
Requested by
GitHub
Duration
00:01:32
Build pipeline
Bot
Build 20191001.4 succeeded
Requested by
GitHub
Duration
00:01:35
Build pipeline
Bot
Only a single unmute task per user is pending of which is always the longest active mute.
I agree but it's somewhat tricky unless the same scheduler instance is used. Well, the database can be queried for active infractions but technically there's nothing enforcing that a scheduled infraction is also present and active in the database. It's a bit of a mess I suppose.
Don't allow weirdness such as new mutes that are meant to end earlier than existing ones.
On one hand, infractions...
Another idea is to have custom behaviour for mutes that were authored by the bot because it's easy to check who the actor of the active mute is. I'm not sure what custom behaviour would be implemented but I wanted to point out that it is a possibility.
Yes, we should. I think it would also be a good idea to override the close method to close the aiohttp session correctly.
On one hand, infractions durations can already be edited with a separate command. On the other hand, it may be more convenient to have durations accumulate in the sense that if it did error out, then it'd be an extra step to run merely a different command with similar parameters. However, it would not be convenient (quite the opposite) if the actor did not wish for the times to accumulate and would have rather had their second infraction attempt invalidated. Therefore, I am leaning towards ...
Postgres backup completed!
While the superstarify command correctly sends the expiration date of the superstarify prison to the API, it does not schedule a task make sure the infraction is actually deactivated when we reach the expiration date. This means that the user will be kept in superstarify prison until we manually release them with the !unsuperstarify command.
The most obvi...
So, I think the shimmer effect itself is pretty good, but there are a couple of things I think we should clean up before we use this:
- It would be great if the shimmer would travel left to right, across the entire logo, sort of like this. Currently it's sort of traveling in a weird reverse S shape starting bottom right and ending top right, and that looks pretty nonstandard and a bit weird.
- Like our othe...
Like our other icon animations, this animation will need breathing room at the end of the cycle, or it will animate constantly on mobile. A rule of thumb we've used before is to put the animation at the beginning, then have 5ish seconds of no animation, and then end the loop.
It's also a good idea to make sure the very first frame of the animation is static, since that frame will be used when the logo is displayed statically (e.g., when the icon is not hovered on desktop; when the user i...
[python-discord/bot] New branch created: ISODate\-converter
20da075 Add converter for ISO-formatted datetime strings - SebastiaanZ
This pull requests adds a converter that automatically parses ISO-formatted datetime strings and returns a datetime.datetime object. It uses dateutil.parser.isoparse to do the heavy lifting and therefore supports the same formats.
In addition, I've added tests that "guarantee" that certain standard formats will be accepted and added these "guaranteed" formats to the docstring of the ISODate.convert meth...
Build 20191001.5 failed
Requested by
GitHub
Duration
00:01:21
Build pipeline
Bot
Currently, the !tag edit subcommand is just an alias of !tag set. This means that if we try to edit an existing tag, the bot will use the POST http method to communicate with the API. Since we're not posting a new tag, but editing an existing entry, the API will reject this request.
Instead of using POST, we should be using PATCH, since we're only partially updating the entry in the database. (We're editing the embed field, not the name field.)
[python-discord/bot] New branch created: fix\-tags\-edit\-command
4c3714b Make !tags edit use PATCH to update tags - SebastiaanZ
This pull request makes sure that we're using the PATCH method to update tags, instead of the POST method.
The problem was that the !tags edit command was an alias of !tags set, which uses the POST method to post new tags to the API. However, when a tag with a given name already exists, the API will refuse a POST request in an attempt to update it; we need to use the PATCH method to the bot/tags/{tag_name} endpoint instead.
To fix this, I've created a separate subcommand, `!tags ...
Build 20191001.6 succeeded
Requested by
GitHub
Duration
00:02:02
Build pipeline
Bot
We recently removed the reason from the infraction confirmation message. The reason was that if the infraction was manually invoked, both the message that contained the command and the confirmation message would contain the reason, which would take up a lot of vertical space when the reason had some length.
However, when an infraction was invoked automatically (e.g., by the AntiSpam cog), having the reason in the infraction notification actually provided context to what's going on. T...
This is further to the discussions in #meta and the 2019 Hacktoberfest channel, and https://github.com/python-discord/site/issues/210
It would be excellent if Snekbox supported a kind of "session mode". Such a mode would allow one to run a persistent Python process in order to serve up a Python REPL or other long-running interactive application. There are some hang-ups to this approach, however..
Shared Processes
Having Python processes that are shared between multiple session...
On @lemonsaurus' advice, I decided to look into how repl.it might meet our needs.
Suitability
I think repl.it would be able to handily meet all of our needs - it supports once-time program execution, as well as websockets for interactive sessions. It appears to have a comprehensive API too, but I'm unable to get much info on that (see below).
API
While the API appears to be comprehensive from what I can find, it's stated on the [main API...
good write-up. I'll get in touch with them.
Build 20191001.7 succeeded
Requested by
GitHub
Duration
00:01:51
Build pipeline
Bot
Build 20191001.8 succeeded
Requested by
GitHub
Duration
00:01:41
Build pipeline
Bot
[python-discord/bot] branch deleted: update\-contrib\-doc
Since this is a non-critical update, this can be frozen until the base container is swapped.
Connected!
Build 20191001.9 succeeded
Requested by
GitHub
Duration
00:03:34
Build pipeline
Bot
ccd03e4 Implement review comments and stop using a gree... - jos-b
9b1ffd1 linter is the bane of my existence - jos-b
Build 20191001.11 failed
Requested by
GitHub
Duration
00:01:22
Build pipeline
Bot
Commands can't be invoked directly, this needs to be ctx.invoke
await ctx.invoke(self.get_command, symbol)
Build 20191001.12 succeeded
Requested by
GitHub
Duration
00:01:41
Build pipeline
Bot
Pushed a couple minor related fixes elsewhere in the codebase, this looks good to me
Build 20191001.13 succeeded
Requested by
GitHub
Duration
00:01:39
Build pipeline
Bot
There is some missing exception handling in the parsing logic of the !docs get command.
Here is one example, exact cause is still TBD:

Build 20191001.14 failed
Requested by
GitHub
Duration
00:01:25
Build pipeline
Bot
Build 20191001.15 succeeded
Requested by
GitHub
Duration
00:01:41
Build pipeline
Bot
Currently the !resources command links to both the [PyDis resource] page(https://pythondiscord.com/pages/resources/
), and the PyDis tools page.
I feel that the alias of !tools should be added to the command, or the links should be separated into two commands, to both make it easier for users to access the tools page, but also increase awareness of the page.
I think I would prefer for us to separate them. I'm claiming this and I'll solve it tonight.
[python-discord/site] New branch created: tizzysaurus\_landing\_page\_text
1ced4fc Update the landing page text. - lemonsaurus
The new text was written by Tizzysaurus in his website cleanup project, and lifted from his google doc.
If we're gonna improve this text, we may as well get some reviews going for the new text. Maybe there are entire sections that should be replaced, maybe it's missing something, or maybe this is fine.
Build 20191001.4 succeeded
Requested by
GitHub
Duration
00:01:55
Build pipeline
Site
What "packages instead of modules" means is that the extension is an __init__.py of a sub-package i.e. the setup() function is in __init__.py (this is what watchchannels is doing right now).
The culprit is this code https://github.com/python-discord/bot/blob/341fb5200acbf24ab1220339b6ce7cf6816561a5/bot/cogs/cogs.py#L28
It's just an overcomplicated and inaccurate way to accomplish this, especially since the [Bot.extensions](https://discordpy.readthedocs.io/en/latest/ext/comman...
Also the entire cog is a misnomer since it's really loading extensions and expects names of extensions, not cogs.
[python-discord/bot] New branch created: separate\_tools\_and\_resources
5145766 Create !tools alias and split !site resources. - lemonsaurus
This splits the former !site resources into two separate commands, one for !site resources and one for !site tools. This makes sensenow that we've split up the lists into two pages.
It also adds a new alias, !tools, to call this command.
Closes #478.
Build 20191001.16 failed
Requested by
GitHub
Duration
00:01:19
Build pipeline
Bot
Build 20191001.17 succeeded
Requested by
GitHub
Duration
00:01:46
Build pipeline
Bot
I'd like to try and do this over the next couple of days
Added checks for response.status and response.content_type for fetch_posts() to validate the response from self.bot.http_session.get(). Also added retries in case a bad response is received.
It's been tested to verify that the !reddit top (and similar) commands still work, and I simulated some retry behavior by specifying intentionally bad routes. Please let me know what changes you'd like to see!
Build 20191001.18 succeeded
Requested by
GitHub
Duration
00:01:33
Build pipeline
Bot
67e2d35 Add infraction pardon icons to dictionary - MarkKoz
ce7713a Rework deactivate_infraction to handle errors a... - MarkKoz
41c0e2b Add a generic function to pardon infractions - MarkKoz
d8eb12f Add reason for pardons in audit log - MarkKoz
8760bf3 Fix concatenation of log text dictionary - MarkKoz
Build 20191001.19 succeeded
Requested by
GitHub
Duration
00:01:33
Build pipeline
Bot
Thanks for the well thought out response. I like your proposed API changes. I believe it'll be a lot simpler to add those restrictions in the API then have convoluted checks client-side. And, in general, not needing any logic to account for multiple active infractions (relevant for unmute/unban currently) also reduces client-side code complexity.
One concern I have about making notes and warnings inactive always is that it makes infraction queries (once that is implemented, it's already an...
Build 20191002.1 succeeded
Requested by
GitHub
Duration
00:01:34
Build pipeline
Bot
Build 20191002.2 succeeded
Requested by
GitHub
Duration
00:01:33
Build pipeline
Bot
Build 20191002.3 succeeded
Requested by
GitHub
Duration
00:01:34
Build pipeline
Bot
Build 20191002.4 succeeded
Requested by
GitHub
Duration
00:01:37
Build pipeline
Bot
How should time zones be dealt with? There is some other code that expects timezone-naïve datetimes (for example, utils.time.wait_until) so we could run into trouble with that. Perhaps the better solution would be to make everything else timezone-aware too.
# Make sure it doesn't interfere with the Duration conversion
Why is this between angle brackets?
[python-discord/bot] branch deleted: separate\_tools\_and\_resources
You can still load/unload/reload the extension by providing the full Python path: !cogs reload bot.cogs.watchchannels, but this is a hassle. Some of our files also have _ in them, so they need to be reloaded with the complete import path as well. Not exactly a usable system.
Connected!
Build 20191002.5 succeeded
Requested by
GitHub
Duration
00:03:48
Build pipeline
Bot
Build 20191002.6 succeeded
Requested by
GitHub
Duration
00:01:32
Build pipeline
Bot
Build 20191002.7 succeeded
Requested by
GitHub
Duration
00:03:27
Build pipeline
Bot
Connected!
Thanks! Didn't even realise this was an issue but this will come in handy.
Build 20191002.8 succeeded
Requested by
GitHub
Duration
00:01:32
Build pipeline
Bot
Build 20191002.9 succeeded
Requested by
GitHub
Duration
00:03:24
Build pipeline
Bot
Connected!
The unload_cog method of the WatchChannel ABC has a small bug in it. If you try to reload or unload the cog while the message consumption task has not yet started, it will fail because the bot._consume_task attribute will still be assigned to None:
This will lead to the following exception, which also prevents us from reloading the extensions that ...
[python-discord/bot] New branch created: fix\-watchchannels\-unload\-cog\-bug
a70cf20 Fix cog_unload bug in WatchChannel ABC - SebastiaanZ
There was small bug in the cog_unload method of the WatchChannel ABC. The reason is that it tries to check if the Task assigned to self._consume_task is done by accessing its done method without ensuring that self._consume_task has been assigned to an actual Task yet.
My solution is to change the if condition to this:
if self._consume_task and not self._consume_task.done():
This pull request closes #482
Build 20191002.10 succeeded
Requested by
GitHub
Duration
00:01:33
Build pipeline
Bot
It could still error out on content["data"]["children"] if it gets a JSON response in a format it doesn't expect, but at that point it's likely programmer error so the error should loudly present itself I think.
It could still error out on content["data"]["children"] if it gets a JSON response in a format it doesn't expect, but at that point it's likely programmer error so the error should loudly present itself I think.
Add some debug logging before it returns that indicates an invalid response was received, including the URL, status code, and mimetype.
How should time zones be dealt with? There is some other code that expects timezone-naïve datetimes (for example,
utils.time.wait_until) so we could run into trouble with that. Perhaps the better solution would be to make everything else timezone-aware too.
This converter does not force tzinfo at the moment. If you feed it a datetime string without a timezone specifier, it will return a naive datetime.datetime, if you feed it something that does specify a timezone, it does return a...
Annoying habit from typing URLs in Discord. I'll change it.
This converter does not force tzinfo at the moment.
Yeah, I was aware it depends on the input. Inputs that result in timezone-aware datetimes could be problematic.
Do you think we should restrict this to one or the other at the level of the converter?
Well, maybe. But as I said, perhaps a more proper solution would be to make other things work with timezone-aware datetimes. It'd be nice to support timezones in user inputs but right now it isn't an important feature anywhere (but ...
5f81b80 Apply docstring review suggestion - SebastiaanZ
Build 20191002.11 succeeded
Requested by
GitHub
Duration
00:01:36
Build pipeline
Bot
Build 20191002.12 succeeded
Requested by
GitHub
Duration
00:01:32
Build pipeline
Bot
Postgres backup completed!
[python-discord/bot] New branch created: extensions\-cog
99455af Rename the "cogs" extension & cog to "extensions" - MarkKoz
Fixes #479
Plan is to rename it to extensions and re-do it based on how I did it in another bot, which has less redundancy in terms of output messages:
https://github.com/MarkKoz/d.py-test-bot/blob/master/testbot/extensions/manager.py
https://github.com/MarkKoz/d.py-test-bot/blob/master/testbot/utils/extensions.py
Build 20191002.13 succeeded
Requested by
GitHub
Duration
00:01:30
Build pipeline
Bot
closes #331
Source command implemented as said in the issue.
The following is a screenshot of it being implemented:

Build 20191002.14 succeeded
Requested by
GitHub
Duration
00:01:39
Build pipeline
Bot
Okay, I've looked into the option of using timezone-aware datetime objects everywhere and I like the idea. However, I think it is a much broader and larger issue than this converter and I don't think we should tack such a change on this pull request. That's why my proposal is to make sure that this converter returns the UTC-time stored in timezone-unaware datetime objects for now.
The reason is that discord.py returns unaware datetime objects for datetime related attributes an...
Build 20191002.15 failed
Requested by
GitHub
Duration
00:01:19
Build pipeline
Bot
Build 20191002.16 failed
Requested by
GitHub
Duration
00:01:18
Build pipeline
Bot
Build 20191002.17 succeeded
Requested by
GitHub
Duration
00:01:41
Build pipeline
Bot
Build 20191002.18 succeeded
Requested by
GitHub
Duration
00:01:43
Build pipeline
Bot
Okay, so word back from repl.it is:
They are currently working on opening up their API, and this will be out soon:tm: .
Meanwhile, if we're in a hurry, we can port this npm package: https://www.npmjs.com/package/@replit/crosis
They warn that this might not be that easy, and have sent over the following docs that might be of use:
https://multiplayer-blog-docs.turbio.repl.co/protov2
https://multiplayer-blog-docs.turbio.repl.co/services
They've also provided a way of generating a t...
[python-discord/bot] New branch created: off\-topic\-check
Hmm, I think you might be right on waiting. That goval protocol seems to be too complex to implement ourselves for this specific use-case - even though it seems like they've written a protobuf so it shouldn't be too difficult to port, it seems like a lot of maintenance overhead.
If they're working on it already, might as well let them instead of doing it ourselves and then dumping that code later, right?
Hey @RohanJnr,
Like mentioned in the issue, the standard approach does not work consistently for our bot, as it does not always return the right starting line and/or code length. I have not looked into why it's happening, although it may be because of decorators passing the function around.
As an example, issuing !source help sends me to https://github.com/python-discord/bot/blob/master/bot/cogs/help.py#L108-L140, which obviously not where we want to end up. Help may be the only on...
Hey @RohanJnr,
Like mentioned in the issue, the standard approach does not work consistently for our bot, as it does not always return the right starting line and/or code length. I have not looked into why it's happening, although it may be because of decorators passing the function around.
As an example, issuing
!source helpsends me to https://github.com/python-discord/bot/blob/master/bot/cogs/help.py#L108-L140, which is obviously not where we want to end up. Help may be...
Build 20191002.19 succeeded
Requested by
GitHub
Duration
00:01:39
Build pipeline
Bot
0209654 Add Hacktober animated neon flicker icon - SebastiaanZ
[python-discord/branding] New branch created: hacktober\-animated\-neon\-flicker\-icon
In its current form, this module has no major benefit for shortening the typing package name, as the line's where it is referenced all have plenty of room to fit it.
import typing
Added as part of the typing module being unshortened.
MemberConverter = typing.Union[utils.UserTypes, utils.proxy_user]
Added as part of the typing module being unshortened.
) -> typing.Dict[str, str]:

I've created an animated neon flicker server icon for the Hacktober event. The icon was created by exporting individual frames generated using a base vector image, included as base_icon.svg, that were stitched together using ImageMagick. The individual frames as well as the ImageMagic command to stitch them together were added in the frames subdi...
[python-discord/branding] New branch created: hacktoberfest\-gif\-guild\-icon
4fe5b38 Add animated guild icon - avayert
[python-discord/branding] branch deleted: hacktoberfest\-gif\-guild\-icon
Build 20191002.20 succeeded
Requested by
GitHub
Duration
00:01:33
Build pipeline
Bot
Build 20191002.21 succeeded
Requested by
GitHub
Duration
00:01:36
Build pipeline
Bot
Build 20191002.23 succeeded
Requested by
GitHub
Duration
00:01:34
Build pipeline
Bot
Build 20191002.22 succeeded
Requested by
GitHub
Duration
00:01:38
Build pipeline
Bot
The idea was that future changes may lead to doing this anyway.
d92bc6e Rename parameters to stop shadowing type built-in - MarkKoz
Build 20191002.24 succeeded
Requested by
GitHub
Duration
00:01:32
Build pipeline
Bot
276ecb6 Remove all definition from moderation subpa... - MarkKoz
That's fine I guess, it's typically best to hold out until that time though usually. It's not a problem to keep it.
Build 20191002.25 succeeded
Requested by
GitHub
Duration
00:01:32
Build pipeline
Bot
You're right, I was overzealous. But the "work" is already done.
This uses the docstringoif the first cog in the list of matches which isn't great but it is simple. What would be a good way to define a docstring for a specific category?
That reminds me actually, I was going to suggest also to move the category into scope of the class instead, as it's not instance specific.
One approach regarding the description is the instead find the first instance of another attribute category_description across the cogs, so you could define it once anywhere and the rest won't need to.
description=cog.category_description if hasattr(cog, "category_description") else cog.description
Likewise:
infraction = await utils.post_infraction(ctx, user, "note", reason, hidden=True)
Found two small bugs, bed is calling me, I'll continue reviewing tomorrow morning.
The reason and the warning type were switched here
infraction = await utils.post_infraction(ctx, user, "warning", reason)
!warn @David Bowie Kitties! led to:
Oct 02 21:22:29 Bot: | bot.cogs.moderation.utils | ERROR | An unexpected ResponseCodeError occurred while adding an infraction:
Traceback (most recent call last):
File "/home/sebastiaan/pydis/repositories/djangobot/bot/cogs/moderation/utils.py", line 71, in post_infraction
r...
Connected!
Currently, the database accepts multiple active infractions of the same type for a single user. We're currently in the process of making sure the client will try to prevent this from happening, but it's a good idea to implement validation at the server side as well.
My idea is to:
- Write a data migration that "cleans" the database of this kind of entries.
- Add a UniqueTogetherValidator to prevent the API from accepting a secondary active infraction of the same type.
Ideally, this va...
[python-discord/bot] New branch created: mute\-fix
This is a patch for the current moderation cog in order to reapply any active mutes to members who had left the server and rejoined.
Build 20191002.26 succeeded
Requested by
GitHub
Duration
00:01:36
Build pipeline
Bot
[python-discord/bot] branch deleted: fix\-watchchannels\-unload\-cog\-bug
Build 20191002.27 succeeded
Requested by
GitHub
Duration
00:01:41
Build pipeline
Bot
Connected!
Build 20191002.28 succeeded
Requested by
GitHub
Duration
00:03:29
Build pipeline
Bot
Build 20191002.29 succeeded
Requested by
GitHub
Duration
00:01:37
Build pipeline
Bot
[python-discord/bot] branch deleted: mute\-fix
Here's a completely different idea:
Keep a dictionary which maps categories to cogs (and also stores the description). This would be an attribute of bot, similar to how d.py already has a cogs dictionary. Thus, categories would be defined in extensions (well it could be anywhere outside the cog class really). The current solution just seems too hacky.
Build 20191002.30 succeeded
Requested by
Joseph Banks
Duration
00:03:22
Build pipeline
Bot
Connected!
c9b610a Swap arguments for post_infraction calls - MarkKoz
Does the equality comparison in this assertion already cover checking that the returned datetime is timezone-naïve?
dc7ba8b Mention moderators in the mod log when an infra... - MarkKoz
[python-discord/django-simple-bulma] New branch created: update\-dependency\-pinning
34bc671 Update dependency pinning - sco1
Build 20191003.1 succeeded
Requested by
GitHub
Duration
00:01:48
Build pipeline
Django Simple Bulma
Build 20191003.2 succeeded
Requested by
GitHub
Duration
00:01:44
Build pipeline
Django Simple Bulma
[python-discord/django-crispy-bulma] New branch created: update\-dependency\-pinning
14e35be Update dependency pinning - sco1
Build 20191003.1 succeeded
Requested by
GitHub
Duration
00:01:54
Build pipeline
Django Crispy Bulma
Okay, understood. Just to be clear, you only want to log the details of the final attempt, correct? Rather than logging each failure in the full retry loop?
Also, would you want any asyncio.sleep() delay in between retries? I'm not sure if that'd make a valid response significantly more likely, but it seems plausible that it might.
Yes, just log after the final attempt. A sleep would be good (maybe 3 seconds?) but in that case you should make the bot show as typing when the commands are used so users know they're meant to wait.
Okay, I'll get a sleep in there!
Build 20191003.1 succeeded
Requested by
GitHub
Duration
00:01:38
Build pipeline
Bot
Build 20191003.2 succeeded
Requested by
GitHub
Duration
00:01:42
Build pipeline
Bot
I've added logging, 3 second sleep, and typing indication during sleep - I did have to modify a few function signatures to achieve the typing indication, just a heads up. I ran the code and tested the commands (including with an intentionally bad route) and it seems to work as intended.
If this is done instead in send_top_posts and wraps the fetch_posts call, the signature of fetch_posts wont need to be modified.
Alrighty. I'm real new to GitHub and collaboration in general - is it preferable for me to revert the last commit and make the change to send_top_posts, or for me to leave git alone and just use a new commit to put the code back how it was and implement the change to send_top_posts?
Do whatever is easier for you. I generally avoid reverts in these situations because they're just an extra step.
Something following the same sort of layout as : https://pythondiscord.com/pages/code-jams/code-jam-2/ or were you thinking something different?
I'm working on resolving the conflict caused by #486. I want to just replace all the redundant infraction deactivation code it brings with a call to self.deactivate_infraction(). However, using this method has two problems, both caused by the role failing to be removed (which could be solved by re-adding the role before calling the method but that seems redundant):
- The mod log will show as "failed". There is already an parameter to disable sending the mod log. However, some mod log pr...
btw by subcommands, do u mean commands within a group?
629cb4d Check if tzinfo is None in ISODateTime test - SebastiaanZ
Good point, I've added an explicit assertion to check that.
Build 20191003.3 succeeded
Requested by
GitHub
Duration
00:01:35
Build pipeline
Bot
Postgres backup completed!
infraction = await utils.post_infraction(ctx, user, "warning", reason, active=False)
await self.apply_kick(ctx, user, reason, active=False)
await self.apply_kick(ctx, user, reason, hidden=True, active=False)
infraction = await utils.post_infraction(ctx, user, "note", reason, hidden=True, active=False)
I'm not a native speaker of English, but I prefer "getting involved in the community" over "getting involved with the community". A comparative search for the two idioms shows that the former is far more popular, but that both are recognized by dictionaries. [This english.stackexchange thread](https://english.stackexchange.com/questions/267751/is-it-involved-with-or-involved-in/2677...
@scragly made a good point yesterday in #dev-core and I think it needs to be addressed. Because we're using the on_ready event to reschedule the expiration of all active infractions with an expiration date and the on_ready event does not fire when you reload the cog, reloading the moderation extension will erase all of the scheduled tasks:

This is probably a pr...
I'm working on resolving the conflict caused by #486. I want to just replace all the redundant infraction deactivation code it brings with a call to
self.deactivate_infraction(). However, using this method has two problems, both caused by the role failing to be removed (which could be solved by re-adding the role before calling the method but that seems redundant):1. The mod log will show as "failed". There is already an parameter to disable sending the mod log. However, some ...
the only pending work is the pathfinding for the help command. I am not sure how to go about it. The subcommands URL generation works fine except for the tags group, some weared stuff happening. Maybe you can look through my code and find some fixes?
Build 20191003.4 succeeded
Requested by
GitHub
Duration
00:01:38
Build pipeline
Bot
I think actually that Tizzy's suggestion here was to use within.
I know I made this pull request but I guess I didn't really consider this at the time. I'm not sure I like this comma. It strikes me as a Danish Comma, and we all know those are evil.
I don't like the comma on this line, either.
I'm very ambivalent about this idea. I don't think it really affords that much convenience over our current system where people (helpers, regular members, whoever) just pings @Moderators to bring us to the channel where trouble is afoot. It seems kind of like a Stack Overflowism. It'd probably be fun to write and I don't really see much harm in it, but personally I wouldn't be offended if we just closed this issue, either.
@bendiller You should probably just make a new commit that addresses the review comments, rather than mucking around with reverts or amends.
Something similar to that, yes, but this issue is going to be difficult for you to work on because we don't have any way for you to log in and be able to edit these pages (only Core Devs have access so far). These are wiki pages, not static pages.
There's some more information about how these pages should be set up, but, it's on a private repo that's used by staff so the URL will 404 for you.
The relevant issue can be found here: https://github.com/python-discord/organisation/issues/66
...
I was writing a very wordy reply, but I decided to ditch in favor of a shorter one.
I'm not sure about this idea for a number of reasons:
- We currently actively "promote" reports with mentions under the motto "It's better to have one ping too many than one too few". Unless our moderators indicate they'd rather see far fewer pings, I don't think we should look into decreasing pings with the risk of missing reports. This means I wouldn't introduce this system for the goal of reducing pi...
The social banners setup for our Repos are suitable as a patterned social backdrop on external services such as Reddit. For this purpose, we should have a blank version of these to be able to be used, created from the PSD that exists:
https://github.com/python-discord/branding/tree/master/logos/social_banner
[python-discord/site] New branch created: \#201\-django\-allauth
99bc330 Initial Allauth dependency and settings/urls - gdude2002
This pull request implements Django Allauth as described in #201.
Fixes #201.
Build 20191003.1 failed
Requested by
GitHub
Duration
00:01:40
Build pipeline
Site
Build 20191003.2 succeeded
Requested by
GitHub
Duration
00:02:02
Build pipeline
Site
Hi there, there's no open Issue ticket for this and is not a feature we've expressed interest in at this time. Sorry.
Build 20191003.5 succeeded
Requested by
GitHub
Duration
00:01:39
Build pipeline
Bot
@SebastiaanZ
One option is to split this method that does two things, removing the role from the member and requesting the API to mark an entry in the database as inactive, into two methods that do one thing, optionally having the
remove_rolemethod call themark_inactive(just filler names; I'd say you're activity is just fine) if we think that's a combination we always want to have.
If the mute was split, it'd be something like this:
async def pardon_mute(self, ctx: Cont...
Calls preparation methods, when a cog is loaded and waits for the ready flag of the bot as requested in #101.
I don't think I understand what you mean. From the fix you were referencing, I was under the impression we were talking about calling deactivate_infraction in the on_member_join event after finding an active mute infraction for the user in the database that has since expired.
If so, that means the user does not have the mute role, since they just joined the server. By splitting up the deactivate_infraction method into two methods, remove_role (related to the user's state on Discord...
Build 20191003.6 succeeded
Requested by
GitHub
Duration
00:01:41
Build pipeline
Bot
So you don't think in that situation a user should be DM'd about being unmuted?
What do you think is the best approach to set this command? Adding a
asyncio.sleep(xxx)
``` Does not seems a reliable to do so.
Though that may be problematic if the bot restarts... something could be stored in the database to keep track of the last time it was muted. I don't know how well that'd work with the tasks extension then. But we do have an API endpoint for storing miscellaneous settings in the database as key-value pairs (currently only used for DEFCON I believe).
Yes, basically using the tasks extension raise the same problems than using a simple sleep. 'll look at the API endpoint.
I don't really think it's relevant. The mute expired while the user was a member, so they don't get a DM of that.
I think you mean was not a member, but that make sense so I agree. Now I am wondering if we even want to show the expiration as failed in the mod log when the user already doesn't have the muted role or they don't have an active ban. Thinking about it now, it's actually technically still a success in the sense that they indeed are no longer affected by the infraction, which was the goal of the function.
Description
It would be nice if flake8-annotations could tell the difference between a callable returning None or using return for flow control, and functions that actually return a value.
Rationale/Use Case
I was surprised to see this behaviour at all at first, although it makes sense now that it's been explained to me.
- Having a separate error code and message specifically mentioning None returns helps to clarify that this is an intentional part of the project's code styl...
It's certainly an interesting concept but I don't think this is feasible from within flake8's framework for anything but trivial examples.
The case of cross-file function calls is particularly problematic since flake8 operates on a per-file basis and provides no mechanism to persist information globally for the package being linted, so there is no deterministic way for this plugin to tell if a foo() in return foo() returns anything or not. I'm not comfortable with making the assumption...
That's an interesting point, and I'm not sure if there could be a decent solution to that one - static code analysis tools generally are expected to operate on single files regardless.
I personally feel like assuming the foo() in return foo() doesn't return None is a fairly safe assumption however, as the use-cases for return being used in this manner while foo() only ever returns a None value are extremely limited - but you probably have a better idea than me of the impact of ...
I'm just going to go ahead and do that. It makes sense.
Build 20191003.7 succeeded
Requested by
GitHub
Duration
00:01:41
Build pipeline
Bot
This code handles multiple active infractions. Does it still need to be here for the time being or can it already be removed given what you are working on? I'm not caught up on the status of that. @SebastiaanZ
@scragly Thoughts on that? Also, what was the other thing you were talking about on Discord regarding the help command when you first had a look at the diff?
[python-discord/site] New branch created: flake8\-exclude\-fix
They were not being excluded when flake8 was invoked via pre-commit.
Build 20191003.3 succeeded
Requested by
GitHub
Duration
00:01:53
Build pipeline
Site
Build 20191003.8 succeeded
Requested by
GitHub
Duration
00:01:36
Build pipeline
Bot
Build 20191003.9 succeeded
Requested by
GitHub
Duration
00:01:36
Build pipeline
Bot
We noticed this morning that not all user update events are being logged to the #user-log channel for a currently unknown reason.
@SebastiaanZ indicated that he was going to take a look and see if some of the recent changes affected the logging logic.
efd8a30 Fix rescheduling of infractions when cog is rel... - MarkKoz
Is efd8a30 what you had in mind? Tried it out and it solves the issue. I looked at watchchannels and that assigns the task to a private attribute which is never referenced anywhere. Is that necessary to do here too?
Build 20191003.10 succeeded
Requested by
GitHub
Duration
00:01:33
Build pipeline
Bot
Double active infractions may still occur for now. The code for the PR is done, the migrations file as well, but it will be stalled until python-discord/site#269 is resolved, since that PR also adds a migration file (and is actually far more critical). (We can't merge them independently because migration files have a single, explicit parent file mentioned in their body.)
I was debating with myself not to include the data migration and open a PR later, to prevent the conflict and not stall ...
Thanks. Maybe everything will get merged in time but that seems unlikely. I'll leave this unresolved so I don't forget.
b83f1b2 Re-add erroneously removed static files - gdude2002
01c0598 Disable Allauth email verification - gdude2002
99263f6 Add model to map Discord roles to Django permis... - gdude2002
646dc95 Remove app_label from role mapping model - gdude2002
699f1a1 Hook up Allauth and model signals to handle gro... - gdude2002
Build 20191003.4 failed
Requested by
GitHub
Duration
00:01:52
Build pipeline
Site
Thanks for the feedback. I implemented the the async with channel.typing()... behavior in send_top_posts instead as you suggested. I left it out of the fetch_posts call in poll_new_posts, because in that case there's no user to inform of the delay. I can change that, if you prefer.
Build 20191003.11 succeeded
Requested by
GitHub
Duration
00:01:31
Build pipeline
Bot
I don't know if there's a reason why we can't just have a short-circuit check of the timestamp of the existing message in the channel, in theory there's only ever going to be one message in the channel so iterating over the channel history to get it isn't going to be expensive.
Putting a space here will make it slightly more readable
await asyncio.sleep(3)
Nope, no need to add it to the poll functions. This looks good.
I've tested this and it works great. Thanks!
Thanks Mark, that's exciting! Particularly because you've personally assisted me in the Discord more than once, haha. Cheers.
Build 20191003.13 succeeded
Requested by
GitHub
Duration
00:01:33
Build pipeline
Bot
83f890e Add checks for valid response and retries to fe... - bendiller
2bc08cc Add logging for invalid response (after all ret... - bendiller
0b59585 Add sleep(3) between retries, with bot indicati... - bendiller
241f74c Move asyncio.sleep() to avoid disturbing functi... - bendiller
df4906c Improve readability - bendiller
Build 20191003.14 succeeded
Requested by
GitHub
Duration
00:03:24
Build pipeline
Bot
Build 20191004.1 succeeded
Requested by
GitHub
Duration
00:01:34
Build pipeline
Bot
The asterisks inside the inline code blocks need to be escapes but I don't know how. The help command italicises the docstring, so having these asterisks messes things up.
Is implicitly loading an extension if it isn't loaded undesirable behaviour? If not, another candidate would be to implicitly reload when !ext load is done on an already loaded extension.
The converter uses the EXTENSIONS set, which is a module-level constant in extensions.py. Importing it here means it iterates the modules again, but the alias must use the converter... Is there a good way to avoid that happening or is it not worth the trouble?
The extension names are displayed to the user as fully qualified (though commands accept unqualified names). The only exception is the list command, which always displays unqualified names. Is this OK? It was just simpler implementation-wise but wouldn't be a lot of code to add it either.
Build 20191004.2 succeeded
Requested by
GitHub
Duration
00:01:34
Build pipeline
Bot
Postgres backup completed!
The fix works as expected, but I'm not entirely sure if that tells us that it's working. The problem is that I can't replicate the difference in behavior, as precommit excludes the migration files with both versions of .flake8 in place. That makes me think that the behavior may be platform-dependent.
That said, if both versions work for some and the new version seems to work for everyone, the new version is definitely an improvement.
Yes I think it will work. I’ll give it a try anyway, so I claim this issue for now.
That's alright, I'll assign the issue to you.
Meanwhile, I would like to see the message include something about how they haven't verified yet.
How about this:
@everyone To verify that you have read our rules, please type !accept. Ping @Admins if you encounter any problems during the verification process.
For frequency, I think weekly sounds about right.
I did some more testing and it consistently works with @MarkKoz's suggested change. I'll merge it now.
[python-discord/site] branch deleted: flake8\-exclude\-fix
Build 20191004.1 succeeded
Requested by
GitHub
Duration
00:03:57
Build pipeline
Site
A few questions:
- Do we want to allow users to sign in with a username/email and password?
- Similarly, what about signing up? Social only?
- Do we want to fully replace the Django Admin login with this system?
- Where should the link to the accounts system be? (Login, my settings, etc)
I'd prefer to avoid standard logins and rely on both account creation and logins being reliant on oauth.
The django admin login should use this system, but is there a way to make sure that there's a way to still use the generic admin account as a backup still, just in case something goes wrong with oauth.
I don't know enough about the django login system to be able to comment on the last point.
The django admin login should use this system, but is there a way to make sure that there's a way to still use the generic admin account as a backup still, just in case something goes wrong with oauth.
I don't know enough about the django login system to be able to comment on the
last point.
When you talk about the Django auth system, you basically need to think about how access in general works. Django provides a login system with its own users, permissions and permissions grou...
Hey I'd like to work on this.
At the current state, only one command and one subcommand are supported. Why couldn't we do this? : async def command_source(self, ctx: commands.Context, *, command_name: str = None) -> None:
Not sure why wouldn't we do return await ctx.send(...) in one line honestly
Instead of that sub_command usage, we could do self.bot.get_command(command_name).
If we're annotating that our function returns None then it should return None, not maybe None
Rapptz's implementation of getting the location was like this: file_name = src_code_object.co_filename and location = os.path.relpath(filename).replace('\\', '/'). I think, should work; will do some tests in a bit.
I have added some suggestions. Planing to do several tests now.
Okay, I have just checked in discord.py. send returns a discord.Message instance, well then, we should return None.
Rapptz's implementation of getting the location was like this: file_name = src_code_object.co_filename and file_path = os.path.relpath(file_name).replace('\\', '/'). I think, should work; will do some tests in a bit.
Shouldn't we send command.qualified_name in the embed?
Build 20191004.2 failed
Requested by
GitHub
Duration
00:01:51
Build pipeline
Site
Build 20191004.3 succeeded
Requested by
GitHub
Duration
00:01:36
Build pipeline
Bot
In my opinion, we would better send a link without the lines here.
All in all, @SebastiaanZ I think we are ready to merge (though, not sure if we should send the lines in explicit !source help implementation.
I don't think they have any way of pinging admins, since they only have access to the verification channel and that channel removes all messages IIRC. They'd have to DM, wouldn't they?
Would like to work on this. Can you clarify where the info should be displayed? I was thinking right after the command is invoked e.g. "This user has previously been watched for the following reason:". It could display the most recent reason or perhaps display them all.
We still get the notification, which alleviates the burdeon of the user searching for someone to DM, but it can be a pain to find it in the message logs.
It's probably beyond the scope of this PR, but providing a message for this ping in #mod-logs could be a useful enhancement.
The most recent watch & a count of total watches is probably an ok start.
That is good to know. Do you agree with my proposal to display it after the command is invoked then?
700ecc0 Wait until the bot is ready before reschedule i... - MarkKoz
Build 20191004.4 succeeded
Requested by
GitHub
Duration
00:01:34
Build pipeline
Bot
The #L475-L490 should not be hard-coded in my opinion. I think we should just return the link to the help.py file.
[python-discord/bot] New branch created: bb\-previous\-reason
c25ebde SHow previous watch reason and total after invo... - MarkKoz
Closes #404

Here's a much longer reason:

(Note: I changed "watches" to "infractions" in the total after taking this screenshot)
- Are you happy with the format?
- Should the total include the just-added infraction or exclude it? It currently excludes it.
Build 20191004.5 succeeded
Requested by
GitHub
Duration
00:01:31
Build pipeline
Bot
Seems like a fine start as-is
Should the total include the just-added infraction or exclude it? It currently excludes it.
I'd say exclude, with a tweak of the verbiage to something like n previous watches
As an aside, these commands are nearly identical in implementation between the two submodules. While perfectly functional, this seems like something that could be refactored into something more generic. From a brief scan, this seems to be the case for much of the watchchannel lo...
It'd be better to use more specific names for the functions rather than prepare_cog. They all have docstrings so they'll give you an idea of what the functions do and what to name them.
Also, in the future, please comment on the issue that you want to work on it before opening a PR.
As an aside, these commands are nearly identical in implementation between the two submodules. While perfectly functional, this seems like something that could be refactored into something more generic. From a brief scan, this seems to be the case for much of the watchchannel logic in general, so maybe this is better investigated within the scope of a different PR.
I was fooled into thinking that. While some of the checks at the start certainly could be refactored, the nominations actual...
e353b00 Adjust verbiage of totals for watch commands - MarkKoz
Build 20191004.6 succeeded
Requested by
GitHub
Duration
00:01:37
Build pipeline
Bot
Currently, all the roles in the community are unmentionable. This is in order to prevent spam. Before we made this change, people would occasionally come into the community and just mentionspam all the role mentions.
The problem with this is that we sometimes need to mention a role. For example, we mention the @Announcements role every time we make an announcement. We all desperately wish Discord would allow us to set mention permissions so that only certain roles were allowed to mention...
I'm afraid I don't think we should do this at all. I'm going to close this issue. This is a very old idea, and I don't think it's a good fit for today's Python Discord.
Here's something similar that we do want. https://github.com/python-discord/bot/issues/491
I think we should just return the correct lines, but without hardcoding them.
@RohanJnr we can't have any hardcoded edge cases in this solution. Please try to find a solution that solves this without hardcoding.
[python-discord/bot] New branch created: doc\-fix
a09ca83 Fix error when symbol_id cannot be found in doc... - MarkKoz
It'd be better to use more specific names for the functions rather than
prepare_cog. They all have docstrings so they'll give you an idea of what the functions do and what to name them.
Makes sense, I'll look for better names
Also, in the future, please comment on the issue that you want to work on it before opening a PR.
Sorry for that, will do in the future!
[python-discord/bot] Pull request opened: #492 Fix error when symbol\_id cannot be found in doc HTML
Fixes #477
What was causing this:
- The symbol
discordreturns the URLhttps://discordpy.readthedocs.io/en/latest/discord.html - The URL has no
#symbol_nameat the end, so splitting by#and getting the last element returns the entire URLsymbol_id = url.split('#')[-1] - Searching for an element in the HTML which has an ID equal to the entire URL obviously fails, hence the returned element is
None - Thus accessing the
stringsattribute ofNone...
Build 20191004.7 succeeded
Requested by
GitHub
Duration
00:01:39
Build pipeline
Bot
Build 20191004.8 succeeded
Requested by
GitHub
Duration
00:01:28
Build pipeline
Bot
20da075 Add converter for ISO-formatted datetime strings - SebastiaanZ
3bb8207 Remove surplus quotation mark in class docstring - SebastiaanZ
5f81b80 Apply docstring review suggestion - SebastiaanZ
333d5e6 Remove angle brackets from ISODateTime docstring - SebastiaanZ
a8b6002 Make ISODateTime return tz-unaware datetime - SebastiaanZ
[python-discord/bot] branch deleted: ISODate\-converter
Build 20191004.9 succeeded
Requested by
GitHub
Duration
00:03:23
Build pipeline
Bot
The converter has been added but it currently isn't being anywhere. I think it should be done in a separate PR, after #457.
Given #217 was closed, is there anything else to do on this issue?
Build 20191004.3 failed
Requested by
GitHub
Duration
00:02:08
Build pipeline
Site
it was closed and then reopened again.
234db56 Add docstrings to tests, and test role mapping ... - gdude2002
Oh, I did not scroll down enough. Anyway, I've actually been using cog_check to check for roles and that uses the check function we have instead of the decorator. Can these decorators from d.py be used as functions inside cog_check?
Also, if there's nothing else from here then we can close this and focus on #217.
Build 20191004.4 succeeded
Requested by
GitHub
Duration
00:02:05
Build pipeline
Site
Build 20191004.5 succeeded
Requested by
GitHub
Duration
00:02:04
Build pipeline
Site
Sure, I can work on this. Which cog would be appropriate? I'm not seeing one jump out.
Sure thing, I'll assign it to you @mathsman5133. Utils cog is fine I think, it should suit.
Thanks. When you say " (make this duration configurable)" are we talking can be changed via command or just in constants.py - does MentionCommandTimeout suit? Also, should @Moderators be able to enable @Owners mention?
config.yml would be where that would need to be set, and the config name style and structure should match the style of the other configuration options around it.
Regarding the invoker role vs specific role mentions, I think it's best to keep that simple and not worry about it. Just have the command itself limited to Mods, Admins and Owners, and have the command check that the role isn't already mentionable.
Look good. While the two sections look similar, there are enough differences that it's not worth the effort to strictly adhere to DRY.
20da075 Add converter for ISO-formatted datetime strings - SebastiaanZ
3bb8207 Remove surplus quotation mark in class docstring - SebastiaanZ
5f81b80 Apply docstring review suggestion - SebastiaanZ
333d5e6 Remove angle brackets from ISODateTime docstring - SebastiaanZ
a8b6002 Make ISODateTime return tz-unaware datetime - SebastiaanZ
Build 20191005.1 succeeded
Requested by
GitHub
Duration
00:01:30
Build pipeline
Bot
Build 20191005.3 succeeded
Requested by
GitHub
Duration
00:01:30
Build pipeline
Bot
Build 20191005.2 succeeded
Requested by
GitHub
Duration
00:03:30
Build pipeline
Bot
Connected!
Build 20191005.4 succeeded
Requested by
GitHub
Duration
00:01:34
Build pipeline
Bot
Connected!
Build 20191005.5 succeeded
Requested by
GitHub
Duration
00:03:14
Build pipeline
Bot
Build 20191005.6 failed
Requested by
GitHub
Duration
00:01:18
Build pipeline
Bot
Can you please add an informative description to the PR.
Linting has also failed due to a number of issues; please ensure you have the precommit hook installed with pipenv run precommit so you will be prevented from committing when linting fails.
To see locally your linting results use pipenv run lint.
Your commit history has a PR reference for your own fork at the beginning, can you please rebase to remove that. I'd suggest also fixing your linting issues at the same time to pre...
Discussion on Discord alleviated my concerns about this being "hacky", especially if the attribute is changed from an instance attribute to a class attribute. Additionally, the support for categories will be documented in the HelpSession class.
Regarding the description, I agree making it an attribute of the cog is a good idea.
If categories are going to be used more frequently in the code base, a more "structured" and documented approach could be considered. For now, with only one ca...
Build 20191005.7 succeeded
Requested by
GitHub
Duration
00:01:35
Build pipeline
Bot
In addition, some nominations may not have received an end_reason when ending the nomination; these nominations will appear as active incorrectly.
Wouldn't that make all end reasons be skewed in the migration? As in, the wrong end infraction would be used to make a nomination inactive. Or is this not the case because the users would have to match? If so, then it would be really be an edge case for something like that to cause a skew, right?
Would this situation arise from this?
In addition, some nominations may not have received an end_reason when ending the nomination; these nominations will appear as active incorrectly.
On second though I don't think so since they wouldn't even have matched the reason filter, right?
Comma rules in English are quite confusing. I think like 5% of English users use them properly lol. I think it's safe to say that in this case it pretty clearly doesn't belong.
I think it should be in. Also this.
Postgres backup completed!
Serial comma goodness.
seasonal events, and community challenges. Through our sponsorships, and with
It sounds more natural to say "with the help of donations". Though I think this could even be "Through our sponsorships and donations, many ..."
Having a list which uses two nouns as objects of the sentence and then switches to an infinitive of a verb reads awkwardly. Not sure how to rephrase it though.
I mean, I'm calling you an expert more so than myself. Maybe that's why I'm comfortable with it. If anyone else finds this problematic I'd be happy to consider alternatives.
Expert: a person who is very knowledgeable about or skilful in a particular area.
It's not claiming anything we don't feel about our helpers already. I'm fine with it.
Build 20191005.8 failed
Requested by
GitHub
Duration
00:01:32
Build pipeline
Bot
okay, so to address some of these questions:
- Nobody should be able to sign in using usernames and passwords, except a sort of superadmin account which we can store in the keepass. This account should only be able to sign in via
/admin, although you don't have to actually restrict this, we're just not gonna attach any social to it. - Everybody else must sign in using a Discord account. Don't allow any other kind of social.
- The goal should be for us to match their Discord sign-in to ou...
Only on Mac OS. .DS_Store is a file that stores custom attributes of its containing folder. New contributors on Mac OS won't have to bother anymore about this mysterious file that is created when you fork the project.
Build 20191005.9 succeeded
Requested by
GitHub
Duration
00:01:28
Build pipeline
Bot
Build 20191005.10 failed
Requested by
GitHub
Duration
00:01:35
Build pipeline
Bot
0c43428 Address code review from Scragly and Mark. - lemonsaurus
added some more words here to hopefully make it flow better.
Addressed suggestions.
Build 20191005.11 succeeded
Requested by
GitHub
Duration
00:01:38
Build pipeline
Bot
Build 20191005.2 succeeded
Requested by
GitHub
Duration
00:02:02
Build pipeline
Site
The <p> tags are meant to be for paragraphs. You have paragraphs present but instead use the <p> tag as a content wrap and split paragraphs with <br/><br/>.
I'd suggest using the following structure:
<p>
We're a large community focused around the Python programming language.
We believe anyone can learn to code, and are very dedicated to helping
novice developers take their first steps into the world of programming. We also...
Hi @kraktus, and thanks for the PR!
I'm going to mark this PR as invalid and close it. The reason I'm doing this is because, in the spirit of Hacktoberfest, we're not accepting oneliners that don't have an open issue for them at this time.
However; that doesn't mean this change isn't welcome. I would suggest you add this change to the PR you open when you solve the issue you're assigned to https://github.com/python-discord/bot/issues/320. A famous programming book called The Pragm...
Ok, no problem, I just though after reading this: https://github.com/python-discord/bot/blob/master/CONTRIBUTING.md an especially point 4 I should have split my PR in 2 because the changes don't have anything in common.
Yep, that's specific to scope of commit messages. You can have multiple commits in a PR as long as they clearly define different purposes.
Yeah exactly. You can make a kaizen commit in an otherwise unrelated PR, just make sure it gets its own commit and that you explain in detail in the commit message what this commit is for.
Here's some good information on how we'd like the commit messages to look:
https://thoughtbot.com/blog/5-useful-tips-for-a-better-commit-message
http://ablogaboutcode.com/2011/03/23/proper-git-commit-messages-and-an-elegant-git-history
https://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html
Build 20191005.12 succeeded
Requested by
GitHub
Duration
00:01:30
Build pipeline
Bot
Would this situation arise from this?
In addition, some nominations may not have received an end_reason when ending the nomination; these nominations will appear as active incorrectly.
No, it does not arise from it. Currently, if someone has received a first nomination that was ended before we recorded "end reasons" and then received a new nomination, the new nomination would be rejected, since someone can't have two active nominations at the same time. If we'd then observe an "...
In addition, some nominations may not have received an end_reason when ending the nomination
Wouldn't that make all end reasons be skewed in the migration? As in, the wrong end infraction would be used to make a nomination inactive. Or is this not the case because the users would have to match? If so, then it would be really be an edge case for something like that to cause a skew, right?
No, all nominations are user specific, so skews may occur, but only within the same individu...
ID here is unnecessary as mentioned in the main review comment. These are known staff members, username is enough.
Role ID is unnecessary here also.
This is a user-facing response, the role name is useful as feedback but the ID isn't as we just provided the command with a suitable argument already.
This doesn't match the current project code style:
- we don't use hanging indents like you're using, instead choosing to drop a line and indent normally.
- we use double quotation marks for strings unless avoiding escapes.
- args are usually kept in order of original signature.
- we have a line length of 120 available. Avoid splitting into multiple lines excessively.
As an example:
await role.edit(reason=f"Role unlocked by {ctx.author}", mentionable=True)
In...
Nobody should be able to sign in using usernames and passwords, except a sort of superadmin account which we can store in the keepass. This account should only be able to sign in via /admin, although you don't have to actually restrict this, we're just not gonna attach any social to it.
That sounds fine - I need to investigate specifically how redirecting to login works, as right now it goes to the admin login regardless of whether allauth is there or not. My worry is that in making alla...
Build 20191005.13 failed
Requested by
GitHub
Duration
00:01:17
Build pipeline
Bot
Build 20191005.14 succeeded
Requested by
GitHub
Duration
00:01:34
Build pipeline
Bot
Hopefully they're all fixed. Not sure position on using asyncio.run to send the message but the alternative is quite messy
Hello again,
this PR implements a new function periodic_ping in verification.py to ping weekly users that did not accepted the rules, and also add to .gitignore a new file to ignore (created specifically on Mac OS). Before posting this PR I ran flake8 and a precommit hook.
Build 20191005.15 succeeded
Requested by
GitHub
Duration
00:01:37
Build pipeline
Bot
Thanks for addressing the previous suggestions.
I see you're allowing the event to still wait when a standard user mentions the role. I would suggest actually allowing the role to relock in that instance, as typically if it's meant maliciously, they'll spam the role numerous times while they can. Due to this, what should probably instead happen is:
- check checks that the message is mentioning the correct role
- the
wait_forreturns a valid message - the message.author is checked to ...
Build 20191005.3 succeeded
Requested by
GitHub
Duration
00:02:01
Build pipeline
Site
I think I can do that, using Member.nick I would like to claim the issue.
Hard to test because the infraction database is host on the website, so I cannot test my changes only running the bot.
this doesn't have to be an f-string.
We also prefer that you use K&R indentation style for these, which would look like this:
PERIODIC_PING = (
"first string"
f"other string"
)
It strikes me as unnecessarily often to check every hour if it's been a week yet. that means we're doing 167 of these checks that return None for every one that does something.
I'm thinking something like 12 or even 24 hours is plenty. Even if the message is skewed by 23 hours every couple of weeks, it's not at all critical that this happens the same time every week or that there's exactly one week between each of these.
I'm wondering if it might be better to be more specific about the message to check. There is a small chance that the last message will be the bot saying "@someuser Please type !accept to verify that you have ...", which the bot will do whenever someone types something other than !accept. This message stays for about 10 or 15 seconds before being deleted. in other words, there's a chance this will fail even when it shouldn't.
Of course, the price for such a failure is very low, it jus...
Build 20191005.4 succeeded
Requested by
GitHub
Duration
00:01:55
Build pipeline
Site
Do I understand correctly?
- If
"(no reason recorded)"approach is used, it may end up in keeping a duplicate start nomination because of that bug you described with simultaneously nominating someone. - If the current approach is used, it can result in a skew as you described in the other comment, but in practice, this won't happen given our historical data
- This check for if an active infraction already exists is not just there as a safety measure but actually has a use for the simul...
Build 20191005.16 succeeded
Requested by
GitHub
Duration
00:01:26
Build pipeline
Bot
Not sure if it the right place, but:
This page: https://pythondiscord.com/pages/contributing/bot/ could be better (although it is already pretty good)
Rename #bot-commandsand #ot-offtopics to bot and off-topic-0 to actually meet with their names in config.yml. Explicit more that the bot_token has to be put in the .envfile.
Precise somewhere that not all cogs are loaded in DEBUG mode, I lost one hour trying to figure why verification.py was not loading.
What do yo...
This is the wrong repo to post this issue on, I'm moving it over to the bot repo.
Not sure if it the right place, but:
This page: https://pythondiscord.com/pages/contributing/bot/ could be better (although it is already pretty good)
Rename #bot-commandsand #ot-offtopics to bot and off-topic-0 to actually meet with their names in config.yml. Explicit more that the bot_token has to be put in the .envfile.
Precise somewhere that not all cogs are loaded in DEBUG mode, I lost one hour trying to figure why verification.py was not loading.
What do yo...
I appreciate the feedback, these are good suggestions. I would suggest we make the following changes:
- Let's change the names of the channels in
default-config.ymlto actually match the channel name. It should be calledbot-commands, not justbot. - Let's change the guide so that we create all three off-topic channels, and simply name them #off-topic-0, #off-topic-1 and #off-topic-2 to match the constants.
- I'm gonna discuss with the core devs whether perhaps we should just load ...
The pipenv docs page certificate seems to be having issues at the moment, but pipenv --sync doesn't work for me (Ubuntu 18.04, pipenv version 2018.11.26, Python3.7.4, Gnome Terminal), as described in the README; what works for me, and what I generally see used instead, is pipenv sync. Could we change the README to reflect this?
Thanks! ^_^
Build 20191005.1 succeeded
Requested by
GitHub
Duration
00:02:12
Build pipeline
Snekbox
[python-discord/snekbox] New comment on pull request #49: Use pipenv sync instead of pipenv \-\-sync
The PyPi page isn't down, and it suggests sync instead of --sync https://pypi.org/project/pipenv/
Build 20191005.2 succeeded
Requested by
GitHub
Duration
00:03:00
Build pipeline
Snekbox
Build 20191006.1 succeeded
Requested by
GitHub
Duration
00:01:35
Build pipeline
Bot
Done 👍
I added the ID to the error message if the user was not a staff member - I assumed this might be handy if they ping and run.
Postgres backup completed!
Wdym by white background @scragly? A full white background will probably look weird because of the letters that are already white.
Yes I think loading all modules is a good idea, but then a #verification(and precise it is not the same as #checkpoint-test in config.yml) channel would have to be include in the tutorial. I could do the changes myself but I can't find the source code of the page.
Build 20191006.1 succeeded
Requested by
Joseph Banks
Duration
00:03:46
Build pipeline
Site
I've been asked to make the messages look better than the current state of my PR. I'm going to do that by putting floating messages into one of the corners - however, the JS in django-simple-bulma uses the CSS display property to hide the messages when they're "closed".
This works fine, but can't be animated. Would it be better to write our own JS for this in order to allow for that?
I don't believe I've said anything about a white background.
I'm asking for just the banner image with no text.
Yeah you didn't said anything about it, my brain just suck :D
No problems. I had to re-read my original message a few times just in case I really did say something silly.
7717406 Add social banners without any background - Akarys42
[python-discord/branding] New branch created: \#029\-blank\-banners
Hi, as asked in #29, here are the socials banners without any background
This PR closes #29
486b37b Move messages to the top right - gdude2002
I can't decide between light-theme-inspired and dark-theme-inspired. What does everyone think?

dark-theme-inspired for sure :)
Eventually I'd like to see a global dark theme we can choose for the site, so I'd prefer if the message box matches the current default light theme.
However I also prefer the previous solid coloured message box over that one.
Build 20191006.2 succeeded
Requested by
GitHub
Duration
00:01:37
Build pipeline
Bot
Now tested and ready to go ! The only problem is that the jump_url is never added to the database, gdude said it is apparently because there is no jump_url in the model.
Build 20191006.3 succeeded
Requested by
GitHub
Duration
00:01:31
Build pipeline
Bot
However I also prefer the previous solid coloured message box over that one.
I designed them this way because lemon said he didn't really like the message boxes being so brightly coloured and in your face - I kind of agree, tbh.
I suggested this design since it matches up with Discord embeds.
Eventually I'd like to see a global dark theme we can choose for the site, so I'd prefer if the message box matches the current default light theme.
Alright, that's no problem. Both types...
Hmm the message box should be very easy to spot right? So what about making the box the invert of the current light theme?
b437c26 Message styling (default to light for now) - gdude2002
I actually prefer the light ones myself, I think they fit better. They slide in, so they should be fairly obvious (especially when they overlap content).
By the way, I just realised that the current login system isn't quite kosher - need to actually bring people to a page to login so they can provide consent. That's alright, though.
I'd like to work on this.
23cf296 Add missing CSS for notifications - gdude2002
logos/social_banner/no_background/social_banner_snekboxt.png
Typo in this file path? snekboxt => snekbox
[python-discord/branding] New comment on pull request #30: Add social banners without any background
@Akarys42 I believe you're still mistaken about what the original issue is asking for. I'm asking for the basic banner with only the background, no text. You've done the opposite here.
8ec060e Replace card on login page with notification - gdude2002
Some progress has been made today.
First off, @lemonsaurus asked me to look into making the Bulma colours less vibrant. See below for what I've come up with (don't worry about text colour for now). Please let me know what you all think!

Secondly, I've done a good bit of work on the login flow, and it's now functional to the specs we're looking for, as least as far as I can tell....
This issue has come up again, and should probably be set to 10. Looks like the threshold is currrently a measly 3, set here:
I think it should be doable by calling the token-remover function before calling the on_message function (the one that is used to fix posts code that's not formatted correctly).
While trying to fix #389 , I just found that there was a feature to detect and remove the embed message if the author did fix his previous code. Nice, but it is not displayed at all. The embed message should display it clearly. Currently the message is:
"It looks like you're trying to paste code into this channel. Discord has support for Markdown, which allows you to post code with full syntax highlighting. Please use these whenever you paste code, as this helps improve the legibili...
May be combined with #439 and #389
[python-discord/branding] New comment on pull request #30: Add social banners without any background
Do you need this done still?
ie

[python-discord/branding] New comment on pull request #30: Add social banners without any background
@cutted I appreciate the offer, and what you have is indeed matching the request, however as @Akarys42 has been assigned and it's been only a small amount of time, it's not appropriate to give the task to others.
Yes, each additional nomination while the first is still active would instead appear as a separate new nomination. For the two users this is relevant, it would appear as if they were nominated on three or four separate occasions instead of the one nomination period both actually have had.
Build 20191006.4 succeeded
Requested by
GitHub
Duration
00:03:34
Build pipeline
Bot
Connected!
e736381 Prevent saving emails, remove login page - gdude2002
This looks good and makes sense. I can't test it but I trust in your methodology.
Found a way to prevent Allauth from saving email addresses (via a very simple monkey patch). I've therefore simplified the login flow - here's an MP4.
It's been decided by staff that triggering an auto mute from sending 4 attachments in quick succession is almost always a false positive, and that the threshold should be increased to 10. Note that this means the max needs to be 9.
Closes #323
Build 20191006.5 succeeded
Requested by
GitHub
Duration
00:01:32
Build pipeline
Bot
c137325 Remove GH login implementation, out of scope of... - gdude2002
Would you mind getting rid of those merge commits?
Build 20191006.2 failed
Requested by
GitHub
Duration
00:01:50
Build pipeline
Site
Super happy to say that this PR is now ready for review! Here are some screenshots and videos that showcase the changes I've made.
(I've gotta fix some tests that broke in the last change, but it should hopefully not take too long)
Login link in dropdown

New Bulma colours, shown here as notification styles
 are awaited, since it's a coroutine.
I could work on this.
I also believe the auto posters could utilise discord.ext.tasks extension for cleanness of code, and to resolve issues such as #360/#361
Postgres backup completed!
I've tried a couple of things, but I have no idea how to do this either. We may need to break with our usual style here and go with another solution than an inline code block. I think it may just be impossible for now.
I think that the intention of loading the cog is clear when someone tries to reload a cog, so I don't mind this behavior. The alternative proposal, reloading when someone tries to load something, sounds more counter-intuitive to me. If I recall correctly, the previous version with the misnomer cogs denied both, but I often found it annoying that it wouldn't just load an extension on reload when it wasn't loaded.
As far as I can tell, it will not iterate twice by importing it here, since it has already been imported when we load the alias cog and Python will not import it again. I've added a temporary logging call and that seems to confirm that the code is just executed once. It's only when I reload the extensions extension that the logging call is made again, which is to be expected, since discord.py explicitly makes sure to re-import the module to refresh the code.
Is there any particular reason why you allow multiple extensions to be reloaded at once, but don't allow multiple extensions to be loaded or unloaded at once? This feels like an unnecessary break of symmetry between the sub-commands to me.
Now, in your current version, we could use reload to load multiple extensions at once if they're unloaded, but that feels like a bit of a hack to me.
The docstring leads me to believe that providing a * or ** as the single argument to this subcommand would respectively reload all the loaded cogs or all of the cogs regardless of their status. However, this if-else block will call the self.manage method directly when a single argument is provided. Since self.manage does not have any logic to handle asterisk characters, it will fail with:
Oct 07 09:35:01 Bot: | bot.cogs.extensions | ERROR | Extension '*' f...
It was my intention for it to work on its own. I broke it when I was attempting to simplify the logic here. I think the fix is
if len(extensions) > 1 or "*" in extensions:
on line 99. I'll test this tomorrow.
It was like that in the old version so I left it. I could make them all support wildcards but I'd have to rewrite the batch function a bit to work to accept load and unload too. I don't mind looking into that.
I suspected this may be the cas. I just don't quite understand how imports work I suppose. Thanks for figuring that out though.
Yeah, I felt the same way with the second proposal. Leaving this unresolved for now in case anyone else has opinions to share.
An alternative style would be to just have it as normal text. Escaping it seems to work then, but I will confirm tomorrow.
That's on me, then. I never noticed that we had this functionality in the old version, I thought you added this handy feature. I don't think it's necessary, it just struck me as an asymmetry when reading the code. I think it could be a nice refinement to make the sub-commands work in a consistent manner, but I'm not opposed to keeping the current version either.
I'll leave this conversation open, but if no one else wants this, we can just close it. If we miss it down the line, we can alwa...
Normal text sounds fine to me. (As far as I can tell, escaping then works as expected.)
If you add a space between the ` and *, ie ` *`, it will make the astericks in the codeblock, but the whole description won't be italicised. Other than that I couldn't figure it out either
Since we upgraded d.py could this be simplified to await ctx.send_help(ctx.command)?
Tried that before. Didn't seem to work with our custom help command so I left it alone and didn't look into it much.
This URL has changed in the mean time by the removal of the wiki-toc- prefix:
NICKNAME_POLICY_URL = "https://pythondiscord.com/pages/rules/#nickname-policy"
One small URL change, the rest looks good to me.
This PR can't be merged until a PR for site that adds support for storing the jump_url field in the database is merged.
Why don't you turn the text into a clickable URL instead of creating a longer sentence by appending the message URL as text? The embed content allows for the use of [text](url) markdown and I think it would look much cleaner that way.
f"Jump back to when you created the reminder : {reminder['jump_url']}")
This won't work without making sure the API accepts a jump_url field by including it in the model. I've added the Stalled label until there's support for this in site, since otherwise the implementation of python-discord/site#258 will break our reminders feature.
Build 20191007.1 succeeded
Requested by
GitHub
Duration
00:01:42
Build pipeline
Bot
Build 20191007.3 succeeded
Requested by
GitHub
Duration
00:01:43
Build pipeline
Bot
Build 20191007.4 succeeded
Requested by
GitHub
Duration
00:01:47
Build pipeline
Bot
Currently, the #user-log channel only shows that a user left if they voluntarily leave the server. It should also include members leaving the server due to any moderator action taken.
Implementation Details
- Log member leaving due to any reason, voluntary or involuntary, to
#user-log - Show that the member left due to moderator action, eg.
User banned/User temporarily bannedas the title
Only admin can add a jump_url in the model I suppose?
No, anyone can make a PR to the site repository that adds such a field in the reminder model. The Meta class of the reminder serializer probably also needs to be adjusted to include the new field.
[python-discord/site] New branch created: \#421\-reminder\-jump\_url
Hi, this PR add a jump_url field to the reminder model.
This PR should be merged at the same time than python-discord/bot#466
PR opened : python-discord/site#277. Wdym by meta class?
Build 20191007.1 failed
Requested by
GitHub
Duration
00:01:33
Build pipeline
Site
Build 20191007.2 failed
Requested by
GitHub
Duration
00:01:31
Build pipeline
Site
As far as I can tell, your pull request does not include the migration files needed to migrate the database according to the new model specifications. You also need to think about what the database base should do with existing entries: If we create a new jump_url column, which value should we use for existing entries that were set before this column existed?
In addition, the [serializer for the reminder model](https://github.com/python-discord/site/blob/d87226479a53708d6fdb5d39a8e87b12b1...
Build 20191007.3 failed
Requested by
GitHub
Duration
00:01:25
Build pipeline
Site
ae22787 Add jump_url field to the reminder serializer - Akarys42
acf8aad Add jump_url to the reminder serializer test - Akarys42
Build 20191007.5 failed
Requested by
GitHub
Duration
00:01:30
Build pipeline
Site
Okay so the serializer should now know about the new field. I’ve done some research but where the migration files should be and what should be written in?
(Oh and I will squash down some commit to make the commit history more proper when I will have finished)
If you want to contribute to the site repository, then it's a good idea to get familiar with Django and, if you working on something API-related, Django REST framework. The official Django documentation has a great tutorial that covers the basics of working with Django, including models and the related migrations that need to take place to get the database up-to-date with the latest specification of t...
This PR fix #389
Split the token_remover in two functions, one that checks that there is a token in the message (is_token_in_message), and the other takes the actions (deleting the message, etc.)
This new function is_token_in_message is reused in cogs/bot.py to know if the poorly formatted code contains a token. If it true, then the embed message is not displayed, since token_remover.py is already in charge.
Build 20191007.5 succeeded
Requested by
GitHub
Duration
00:01:38
Build pipeline
Bot
Build 20191007.6 succeeded
Requested by
GitHub
Duration
00:01:37
Build pipeline
Bot
Hey! If this is still a problem I'd work on this
the bot's docker-compose does spin up a site container for you, so it makes it quite trivial to test this.
All you gotta do is create a few infractions. just mute yourself a few times and then do a search.
@mathsman5133 you could work on this or you are going to work on this? it's yours if you want it.
If you're doing this, I have one more request for this cog, which came up in the last staff meeting. Instead of relaying every post that is posted on /r/python, it would be nice if it just posted the top 3 posts that day, once every day. Currently, the channel is very noisy and I doubt anyone really uses it for anything except the weekly top 3 in the pins.
Build 20191007.7 succeeded
Requested by
GitHub
Duration
00:01:40
Build pipeline
Bot
da7b23c Escape asterisks in extensions docstrings - MarkKoz
We're not really sure if this is still a problem. There have been major changes to the bug since it was last observed. And even if it is still a problem;
A) It's a bit of a heisenbug, so it'll be very hard to test if it's been solved.
B) The correct solution is probably a rewrite of the Reminder cog, so we can provide features like recurring reminders.
C) There's been talk of putting some NLP into the rewrite so we can have stuff like `!remind "@...
Build 20191007.8 succeeded
Requested by
GitHub
Duration
00:01:34
Build pipeline
Bot
I've add support for this now. The only caveat is that for !ext load, when multiple extensions are given, if any of those are already loaded, they will still be displayed as loaded (i.e. included in the total load count and no error shown). When a single extension is given, it will show an error if it's already loaded. The same applies to !ext unload. I figured this isn't a big deal and makes implementation simpler.
Went with normal text.
Build 20191007.9 succeeded
Requested by
GitHub
Duration
00:01:34
Build pipeline
Bot
Build 20191007.10 succeeded
Requested by
GitHub
Duration
00:01:35
Build pipeline
Bot
Build 20191007.11 succeeded
Requested by
GitHub
Duration
00:01:37
Build pipeline
Bot
I'm looking into this issue. #Oiry on discord
I'm now basically setting up versions and dependencies...
Build 20191007.12 failed
Requested by
GitHub
Duration
00:01:21
Build pipeline
Bot
Build 20191007.13 succeeded
Requested by
GitHub
Duration
00:01:35
Build pipeline
Bot
I will work on this, please :)
The weekly is currently top 5 - just making sure you want the daily to be top 3? Also, is there a specific time every day - and/or do you want to make this configurable?
This pull request needs to be manually merged after #269 has been merged to avoid conflicting migration files.
This pull request adds validation rules to the API to validate infractions based on the active field. This means that the API will now reject active infractions of types that should never be active (notes, warnings, and kicks) and only accept one active infraction per user for the other types of infractions (mute, ban, watch, superstar).
In addition, this pull requests a...
Build 20191007.6 succeeded
Requested by
GitHub
Duration
00:02:27
Build pipeline
Site
I've accidentally left this logging import here; I'll remove it when pushing the commit that straightens out the migration conflict that #269 will cause.
I'll remove this then as well, obviously.
- The auto-posting has been removed as it was spammy and few used it.
- Instead a daily top posting loop has been created.
- Both loops will post at midnight
- As before, the weekly top posts will be pinned.
- A webhook id for the Reddit channel has been set in constants and config, but will need to be created by an admin (and real ID set).
- I set the webhook author to be what was previously the content of the message - it looks clean to me, but here is an example:
 helper added that works with an updated implementation...
Nice job, that's one massive PR.
That's totally fine with me.
Looks good to me. I think I've tested everything.
Build 20191008.3 succeeded
Requested by
GitHub
Duration
00:01:51
Build pipeline
Bot
I think we should make use of the Tasks extension to do the work for us, instead of manually calculating and executing the delay.
The discord.py Tasks extensions allows you to pass a single (or a list of) datetime.time to the time parameter of loop() to trigger an iteration at the specified time. That way, we don't have to manually calculate seconds_until and include a asyncio.sleep.
I think this should do it:
import datetime
@loop(time=datetime.time.min)
The use of datetime.time.min guarantees we're aiming for the midnight exactly, although I don't think a few seconds really matter.
I don't see a way to avoid some logic here by purely using the Task extension, as you only specify a target time not a day in the week. One way we could avoid having to calculate the delay and execute the sleep ourselves is by having the daily task check if it's Monday and, if so, trigger the weekly top posts function.
This means that the daily posts coroutine wakes up at every midnight and if it's Monday, it will also trigger the weekly top posts coroutine to do its business.
3821929 Add favicons; workaround for gitattributes - ByteCommander
[python-discord/site] New branch created: favicons
[python-discord/site] branch deleted: favicons
[python-discord/site] New branch created: favicons
7136018 Add favicons; workaround for gitattributes - ByteCommander
Build 20191008.1 succeeded
Requested by
GitHub
Duration
00:02:09
Build pipeline
Site
653ffc6 Remove unused moderation utility functions - MarkKoz
4a110a6 Make respect_role_hierarchy a decorator - MarkKoz
689d203 Support positional target arg for respect_role_... - MarkKoz
ae23753 Raise ValueError in respect_role_hierarchy inst... - MarkKoz
4cb7b2d Adjust type annotations of decorators - MarkKoz
[python-discord/bot] branch deleted: moderation\-cleanup
Connected!
Build 20191008.4 succeeded
Requested by
GitHub
Duration
00:03:56
Build pipeline
Bot
Build 20191008.5 failed
Requested by
GitHub
Duration
00:01:22
Build pipeline
Bot
Build 20191008.6 succeeded
Requested by
GitHub
Duration
00:01:39
Build pipeline
Bot
This PR adds the reason back to the infraction confirmation message the bot sends after successfully applying an infraction, but only if the actor is the bot itself. The reason is that if the bot itself invokes the infraction, having the reason it did that stated in the confirmation message will give context to what's going to those involved in the conversation.
Before

...
Build 20191008.7 succeeded
Requested by
GitHub
Duration
00:01:38
Build pipeline
Bot
I've managed to trace the problem to users setting a nickname if they had none or resetting their nickname to their username (i.e., removing their server-specific nickname). What happens is that when people remove or add a nickname, the old_value or new_value is None.
For instance, resetting a nickname results in the following data:
'nick': {
'old_type': <class 'str'>,
'new_type': <class 'NoneType'>,
'old_value': 'Nickname',
'new_value': None
}
Si...
Build 20191008.8 succeeded
Requested by
GitHub
Duration
00:03:27
Build pipeline
Bot
Connected!
[python-discord/bot] New branch created: user\-log\-display\-name\-changes
aee8e14 Ensure display name changes are logged - SebastiaanZ
I absolutely agree, although the time parameter is new in version 1.3 - were in v1.2.3, unless we wish to move to v1.3a (I see no problem, personally).
I've added a note in the comments that this should be fixed once we upgrade
Recently, we discovered that not all display name changes were logged to the #user-log channel. This problem was caused by the old_value or the new_value showing up as None when a user sets or removes a guild-specific nickname. Since we ignore changes in which either the old_value or the new_value is None, we did not log these None->nick or nick->None events.
As we are mainly interested in the display name of the user, and the display name is either equal to the user's guil...
Build 20191008.9 succeeded
Requested by
GitHub
Duration
00:01:34
Build pipeline
Bot
lgtm, the backtick escape is annoying but I don't see a clear way around it within Discord's markdown implementation
Any reason why these lines were split?
[python-discord/site] New branch created: fix\-home\-responsive
6371e44 Improve homepage flex responsiveness - ByteCommander
[python-discord/site] branch deleted: fix\-home\-responsive
7fe0138 Improve homepage flex responsiveness - ByteCommander
[python-discord/site] New branch created: fix\-home\-responsive
[python-discord/site] branch deleted: fix\-home\-responsive
[python-discord/site] New branch created: fix\-home\-responsive
d52c5cb Improve homepage flex responsiveness - ByteCommander
This should fix #248 specifically by adjusting Bulma CSS classes for the various parts of the home page and removing conflicting parts from the custom index.css.
Some previews for tablet and mobile screen width (zoomed and some list elements removed for screenshot purpose):

 fails to detect tokens in most use-cases beyond simple assignment.
e.g. this would be caught:
token = <token>
While these would not:
print(<token>)
bot.run(<token>)
To mitigate this, the character exclusion has been expanded to include some of the more commonly used anchors: [^\s\.()\"']+\.[^\s\.()\"']+\.[^\s\.()\"']+ in order to try and limit what the regex is capturing as a poten...
Build 20191009.1 succeeded
Requested by
GitHub
Duration
00:01:37
Build pipeline
Bot
With the release of Python 3.8 comes some things to do for compatibility!
- [ ] flake8 compatibility check (pending release of flake8 v3.8)
- [ ] Investigate changes to
astin 3.8- [ ] Native type comment support, likely removing dependency on
typed-astfor Python versions < 3.8 - [ ] Nodes with line & column offsets now will also have end line and column offsets, we’re currently manually calculating these
- [ ] Native type comment support, likely removing dependency on
- [ ] See if [positional-only arguments](https://www.python.org/dev/pep...
Postgres backup completed!
The more I look into this, the more complicated it becomes. The main problem is that there isn't a single unit that processes the GET parameters, but multiple independent "filter backends" that are all unaware of the parameters used by the other "filter backends" in use or even which filters are used for that view at all.
As an example, the infraction viewset uses these filter back-end settings¹:
filter_backends = (DjangoFilterBackend, SearchFilter, OrderingFilter)
filt...
The only reason I can think about is the limitation of 120 characters, but I did not count
no, I'm guessing PyCharm had a moment
@SebastiaanZ I have created icons for Discord according to Hacktoberbest theme. Let me know your views on them:
Discord_icon 2
If you are fine with it I will create a Pull Request
Build 20191009.2 succeeded
Requested by
GitHub
Duration
00:01:38
Build pipeline
Bot
I've regenerated a token a bunch of times and have determined with reasonable certainty that it has a character set of [\w-] and has consistent lengths of groups between the dots:
[\w-]{24}\.[\w-]{6}\.[\w-]{27}
I'm gonna close this issue, since we actually have everything in it.
[python-discord/bot] branch deleted: user\-log\-display\-name\-changes
If the user has not changed its nickname, display None, otherwise display its current nickname.
Connected!
Build 20191009.3 succeeded
Requested by
GitHub
Duration
00:03:30
Build pipeline
Bot
Looks like moderations code changed a lot, I will try to resolve myself the conflits and the repost a PR.
If the user has not changed its nickname, display None, otherwise display its current nickname.
Fix #337
Build 20191009.4 succeeded
Requested by
GitHub
Duration
00:01:36
Build pipeline
Bot
The nickname is supposed to be for the user, not the actor. To be clear, the user is the one which received the infraction. The actor is the one who gave out the infraction. You can see that the actor is already mentioned so there's no need to show their nickname anyway.


