GitHub Actions run 627197846 succeeded.
#dev-log
1 messages ยท Page 68 of 1
013ce6d Improve readibility of code, and fix grammar is... - ChrisLovering
67db0d1 Convert method to static as it doesn't use clas... - ChrisLovering
50a344d Fix return type of in_executor. Its return type... - ChrisLovering
ea44e8e Don't return discord.Messages. - ChrisLovering
49ce886 Remove superfluous str cast. - ChrisLovering
GitHub Actions run 627211305 succeeded.
GitHub Actions run 627209272 succeeded.
GitHub Actions run 627209275 succeeded.
This is because we want to asynchronously load the gender options file. This task only runs once on start, rather than perdiodically.
365a272 Split up complex line. - ChrisLovering
Do you not think have it written like if flag is None is easier to read? As it specifically stating the case in which the if block is running, rather than the inverse.
Code looks good, just one issue while testing locally. I think it could be a good idea to have a .wtf list or similar, to output all of the available pages. Maybe one for after the paginator PR in merged.
Running both .wtf del and .wtf subclass results in the error embed, do these need to be updated?
4532b40 Fix trace logging of nomination 404 - ks129
4f7a9fb Use actor mention instead of username in nomina... - ks129
This would need to replace it everywhere, so yeah, let's not do this here.
GitHub Actions run 627243029 succeeded.
GitHub Actions run 627243017 succeeded.
GitHub Actions run 627244520 succeeded.
Maybe I could lower down the certainty check.
Code looks good, just one issue while testing locally. I think it could be a good idea to have a
.wtf listor similar, to output all of the available pages. Maybe one for after the paginator PR in merged.
Alright will do.
Well thatโs my preference and I find it more readable.
Oh alright! We can skip both of the requested changes then.
Interestingly, some things slip through the JSON formatting (probably because they aren't logged, just straight up warnings/errors, such as not having python-Levenshtein installed), but that's not really important for the bot, just something you'd have to account for on the Loki end.
Version lock, please ๐
Addressed in fe5e2ab947a8c2123f2856db24d9c6e978adec9d
One more approval for old time's sake.
[python-discord/bot] branch deleted: json\-logging
Connected!
User no longer seems to be active. If anyone wants to take over, let me know.
If anyone would like to pick up this PR, feel free to do so. Author doesn't look to be active anymore.
@melodicht will you be fixing up this PR?
This PR is now available for anyone to take over. Please ping me if you do decide to do so.
[python-discord/forms-frontend] branch deleted: dependabot/npm\_and\_yarn/typescript\-eslint/eslint\-plugin\-4\.16\.1
Connected!
[python-discord/sir-lancebot] Issue opened: #612 Coin Flip Command and Rock\-Paper\-Scissors Command
Description
Coin flipping and rock-paper-scissors are very common games that can be really interesting to play, especially on Discord. It would be a good choice to have them on Sir LanceBot, known for its simple but fun and interesting games.
Reasoning
These are simple games that can instantly cure boredom and can also be very engaging at times. It would be used by many on the server and it also deserves to be added along with the other games, such as tic-tac-toe and battleship.
...
[python-discord/bot] branch deleted: ks123/watchlist\-trigger\-reason
81af009 Implement showing filterlist entry comment in a... - ks129
cd0e443 Add missing None reason returns of filters - ks129
480dd04 Rename filter trigger reason from entry command... - ks129
90bba1c Add comments about returning blacklist entry re... - ks129
2268d46 Move reason for guild filtering to footer - ks129
Connected!
I'm coming back to this, just figuring out Redis things. Should be done relatively soon.
The finally also does the trace log indicating the parsing has finished which is quite useful. If there's no way other than add_done_callback to achieve it I think I'd prefer leaving the finally in place and checking None as is done now
I will take over PR #485. Thanks
[python-discord/forms-frontend] branch deleted: dependabot/npm\_and\_yarn/react\-spinners\-0\.10\.6
[python-discord/forms-frontend] branch deleted: dependabot/npm\_and\_yarn/types/react\-17\.0\.2
Connected!
[python-discord/forms-frontend] branch deleted: dependabot/npm\_and\_yarn/testing\-library/user\-event\-12\.8\.1
[python-discord/forms-frontend] branch deleted: dependabot/npm\_and\_yarn/typescript\-eslint/parser\-4\.16\.1
I have taken over this PR and will be opening a new one, mentioning changes requested here.
We can close this one.
@decorator-factory As it's been a bit since I've worked on this, were we thinking about making the request, and if it fails, just tell the user "Something went wrong!"
[python-discord/forms-frontend] branch deleted: dependabot/npm\_and\_yarn/eslint\-7\.21\.0
95509ee Set pre-commit to be executable - jb3
[python-discord/forms-frontend] branch deleted: dependabot/npm\_and\_yarn/typescript\-4\.2\.3
[python-discord/forms-frontend] branch deleted: dependabot/npm\_and\_yarn/husky\-5\.0\.9
[python-discord/forms-frontend] branch deleted: dependabot/npm\_and\_yarn/sentry/react\-6\.2\.1
We can probably drop the Backend here, maybe a bit pedantic though.
cookie = request.cookies.get("token")
This should be above AuthorizeResponse and AuthorizeRequest.
A few minor things. Looks good otherwise.
Linebreak for clarity.
if not constants.PRODUCTION:
0215429 Renames Token To token
- HassanAbouelela
[python-discord/forms-backend] branch deleted: token\-expiry
[python-discord/forms-frontend] branch deleted: fix\-broken\-links
[python-discord/forms-frontend] branch deleted: dependabot/npm\_and\_yarn/swc/core\-1\.2\.50
013ea90 Sets Token Cookie To Same Site To Lax - HassanAbouelela
b915ce2 Set Username Expiry To Permanent - HassanAbouelela
2e5b5fe Makes Helper To Handle Token SameSite Logic - HassanAbouelela
[python-discord/forms-backend] New branch created: dynamic\-token\-origin
This PR fixes problems with token security on deploy previews.
The same site attribute would fail on preview branches, as the backend (hosted on the main python discord site), and the request origin (CF or Netlify) were different. This PR simply bypasses that, by setting same site to None on the preview branches.
[forms-backend] Branch dynamic\-token\-origin was force-pushed to `5bab391`
The Easter season currently lacks a banner asset.
For a simple solution, the contribution can simply adapt the Evergreen banner and apply the colours used by the Easter logo.
However, there's plenty of room for creativity. For example, the banner could incorporate usual Easter motives. :rabbit: :egg: :chocolate_bar:
Feel fr...
The New Year event currently lacks a banner asset.
For a simple solution, the contribution can simply adapt the Evergreen banner, use the New Year icon, and apply its colours.
More ambitious contributions could incorporate usual motives of New ...
[python-discord/forms-backend] branch deleted: dynamic\-token\-origin
9f04d5f Fixes Return Home Button Centering - HassanAbouelela
Closes #123.
This is a draft PR to implement the changes proposed in #123. I will make an attempt to keep the description here an accurate representation of my progress.
I may prefer to keep this in draft status until I have a functioning implementation Python-side, in case I realize that the structure needs to change in order to make things easier on the other side. In the dev environment Python can target the source branch so there's no rush to merge this.
For meta.md files I'm p...
8ef22e9 Switches Forwarded Protocol Header - HassanAbouelela
Connected!
4f9c088 Add route to get a member's data for helper review - mbaruh
[python-discord/site] New branch created: mbaruh/channel\-activity
d2690bb Amend top_channel_activity return type - mbaruh
Added route for getting a user's join date, total messages, and top 3 channels by activity.
This information will be used to auto-review nominees.
Thank you @jb3 for the query, and everyone who helped me set-up metricity.
- [ ] Add relevant tests.
df35009 Fixes Radio Button Rounding - HassanAbouelela
[python-discord/forms-frontend] branch deleted: dependabot/npm\_and\_yarn/webpack\-5\.24\.3
[python-discord/forms-frontend] branch deleted: dependabot/npm\_and\_yarn/copy\-webpack\-plugin\-8\.0\.0
bad36a3 Removes Pre Commit Step - HassanAbouelela
[python-discord/forms-frontend] branch deleted: dependabot/npm\_and\_yarn/husky\-5\.1\.3
[python-discord/forms-frontend] branch deleted: dependabot/npm\_and\_yarn/workbox\-webpack\-plugin\-6\.1\.1
be4771b Bump husky from 4.3.8 to 5.0.9 - dependabot[bot]
ce99800 Migrate Husky To v5 - HassanAbouelela
dafc38e Bump html-webpack-plugin from 5.0.0 to 5.1.0 - dependabot[bot]
941c2b0 Bump eslint from 7.19.0 to 7.20.0 - dependabot[bot]
3563486 Bump @types/node from 14.14.25 to 14.14.30 - dependabot[bot]
[python-discord/forms-backend] branch deleted: dependabot/pip/httpx\-0\.17\.0
[python-discord/forms-backend] branch deleted: dependabot/pip/pydantic\-1\.8\.1
[python-discord/forms-backend] branch deleted: dependabot/pip/flake8\-annotations\-2\.6\.0
Shouldnโt this be part of python-discord/snekbox rather than breaking into the user code and appending few lines to it or making two calls?
Emoji related commands are now under the same cog+command group, emoji.
.emojicount is now .emoji count

Emoji information is now .emoji info, and the embed is changed slightly.

.emoji brings up the help, and .emoji <emoji> is a shortcut to `.emoji in...
Do you propose to just wrap it whole in the symbol_get_event? I suppose it would make it less likely for race conditions to occur in future changes even if it should be safe now
I don't think this comment is needed.
Arrow library has humanize() function which can do this.
Is overwriting the import discord.Emoji.
I haven't looked into the differences so this isn't my opinion on it, but I noticed this touches a previously reviewed aspect, which you can find kosa's response to here:
Our version works a lot better, the
arrowversion is clunky and not customizable.
https://github.com/python-discord/sir-lancebot/pull/462#discussion_r588906493
Alright! Didn't see the earlier reviews.
If the user doesn't input a name for this argument, emoji will be explicitly None. I think it's better to say that's what we're checking for.
Titles shouldn't end in periods, it's unconventional unless it's a fully structured sentence.
Alright! Then it is meant for the other parts of the code. There are 2-3 cases.
Well if emoji: is the same as if emoji is not None:. And according to me if emoji: seems the better way
Let's avoid arguing over code style opinions unless the style is clearly defined in our projects.
Since both works, and there's not really an explicit bias in our projects other than a slight lean towards "explicit is better than implicit", there's no need to request a change for this.
0b11d7d Add truncate_message util - gustavwilliam
e1d269d Add function to DM users when opening help channel - gustavwilliam
e6483d6 Add green question mark to default config - gustavwilliam
e34ea2f Send DM when user claims help channel - gustavwilliam
bb9e56c Update embed field title to be more formal - gustavwilliam
I had a look over the code but I'm unable to see more than 1 string that may require a period to be added.
If you meant for each of the list items in the .emoji info embed, they're not really at the level of a fully constructed sentence either. The closest may be the Created line due to humanisation, but I think it's too ambiguous to enforce and would clash with the rest of the output as it would be the only line to do so. Better to just leave it in my opinion.
If there was any other...
Actually on a detailed look, it appears that even that one I noticed isn't part of the diff here, instead looks to be from previous commits, so there may be more from code outside of the range I'm reading over.
Not part of this PR (5th one is part of this PR). But will be good if it would be done as they part of the emoji command:
If someone spams a bunch of characters, we don't want to send a request to PyPi with a bunch of gibberish. This also protects against injections (if possible, if any).
Some examples of cases with illegal characters within them:

There are some changes from a different branch on here. Fixing.
Hello,
Thanks for the suggestions, they sound cool. Could you split these out into two issues though? They seem like separate features.
Be sure to check out our contributing guide for setting up the bot, and the style guide we use, before starting work. They can both be found here:
Alright, so I'll change this one to the coin flip command and make another one for the rock-paper-scissors command.
I'll also be sure to check out the contributing guide.
[forms-frontend] Branch discord\-oauth was force-pushed to `5424481`
Description
Rock-paper-scissors is a very common game that can be really interesting to play, especially on Discord. It would be a good choice to have it on Sir LanceBot, known for its simple but fun and interesting games.
Reasoning
This is a simple game that can instantly cure boredom and can also be very engaging at times. It would be used by many on the server and it also deserves to be added along with the other games, such as tic-tac-toe and battleship.
Proposed Impl...
๐ Sounds good to me, I've assigned you here.
Missing a . full stop at the end of the sentence,
embed.description = f"Illegal character passed into command: '{escape_markdown(character.group(0))}'."
Thanks! Looks Good To Me! Just one thing, not sure if it is needed or not tho.
Tested locally.
I tested this a while ago. I didn't think it looked right. Here's a comparison.
With period:

And without:

Yeah, even I had the same feeling.
Regarding features in #321, some of them I don't think I'd be able to implement as they seem out of the scope of this issue. I'll try my best though
@melodicht will you be fixing up this PR?
Hi, I am so sorry, I just finished my exams. I will take a look at it in a day or two.
b92baa6 Makes Code Inputs TextAreas - HassanAbouelela
[python-discord/bot] branch deleted: pypi\-url\-formatter\-patch
Few notes, otherwise looks good and works great.
Not sure the point of this. Originally it was to reset the button state after a user exited the login flow abnormally but this doesn't seem to have any use.
// Clean up on login
const interval = setInterval(() => {
if (windowRef?.closed) {
clearInterval(interval);
}
}, 500);
How do these get presented to the user? Maybe we should add a note to clear up the way this gets shown to the user (instead of the current ErrorBoundary setup we have).
Do we need to list all possible scopes? Maybe only the ones we will absolutely use.
export enum OAuthScopes {
Connections = "connections",
Email = "email",
Identify = "identify",
Guilds = "guilds"
}
Connected!
The command should additionally mention in parantheses that a user was already reviewed (if they weren't no need to add anything).
3b83545 Remove Unused OAuth Scopes - HassanAbouelela
Currently, they get rendered below the discord login button, with the button being reset to either an OAuth button or a submit button depending on the failure.

Easiest way to replicate a failure, is to open the form page, turn off the backend, then try to authenticate.
The error logging is there for our debug purposes.
Things do seem fine without it, I think it's safe to remove.
7e0d4a9 Removes Unused OAuth Cleaning - HassanAbouelela
GitHub Actions run 629729172 succeeded.
GitHub Actions run 629729173 succeeded.
GitHub Actions run 629729925 succeeded.
GitHub Actions run 629729924 succeeded.
GitHub Actions run 629730429 succeeded.
GitHub Actions run 629730802 succeeded.
GitHub Actions run 629730793 succeeded.
GitHub Actions run 629730432 succeeded.
GitHub Actions run 629731378 succeeded.
GitHub Actions run 629731384 succeeded.
Afte discussing it with @Shivansh-007 I'll be handling this issue.
[python-discord/forms-frontend] branch deleted: discord\-oauth
Connected!
Thanks for doing this! Have tested this and it seems to work as expected, nice job.
Only thing I would say is that the result from tp search is a bit messy/hard to read at the moment, here's an example

I'm not sure if changing this much is within the scope of this PR, if you think not I can add them in a separate PR, but here are some thoughts:
- The "Nomination ID" for inacti...
75df6d9 Improve nomination string representation - ks129
@wookie184 I made these changes.
Connected!
Goal
Implement a system that closes help channels more quickly if the OP (the person who originally opened the channel) has not responded in a while. This is to prevent channels from going stale for a very long time.
Implementation suggestion
The initial implementation suggestion is that 10 minutes after the last user message, and 30 minutes after the last OP message the channel will be closed.
This issue is meant as a place to discuss different implementations and ideas rel...
I can work on this. I've done the base, I just need to add the accents.

This doesn't paginate well, gets cut off. Doesn't seem to happen with the infractions paginator.
I'm not gonna request any changes here then, but your idea isn't totally out of the window. My say on it is to leave it as is.
I think it's good enough. Thanks.
I haven't looked over the new commits yet, but my point was that it wasn't safe. There was nothing to prevent a refresh from running during this code and I had outlined why that happening would be problematic.
I don't value the trace log as much, but we can leave it as-is.
I was just wondering if Discord allows empty strings as descriptions or if it wants it to be None in such cases.
if self.description:
result['description'] = self.description
Just for reference, anything Falsey is ignored when building the payload.
It's a fix because everything above is synchronous, right? Doesn't this seem quite fragile and implicit? If someone didn't know any better, they could introduce race conditions simply by moving re-arranging code, which is an ostensibly harmless thing (because none of the code has directly evident side effects). Just me rambling a bit. I don't have a good idea of how to deal with it nicely.
I've looked over everything now. Help me understand if this is correct:
get_markdown has two awaits (the get request and the executor) which are opportunities for a refresh to occur. If a refresh occurs, it clears out the futures. Once get_markdown resumes, it will still add the symbols to the queue. At the end, it will create a new future (thanks to defaultdict) and await it. Because the symbols were queued and the queue will still be consumed, the queue will eventually get the newl...
Everything looks good besides the outstanding requested changes. I have also yet to try the command on Discord, but I don't foresee any problems thanks to my thorough understanding of the code. The chances are that any remaining problems are likely edge cases that I will not do a thorough enough job of testing to encounter.
Though maybe it's bad practice, even in CI, and I should have kept using the Python version task...

Just having some fun with a concept/idea.
GitHub Actions run 631457567 failed.
GitHub Actions run 631457570 failed.
GitHub Actions run 631458043 failed.
Unless I missed something, after the get_markdown coro is called, the user_requested attribute of the future is immediately set to True before a refresh can occur (currenty L102 and L118).
Then if a refresh occurs at the two points you mentioned, it'll clear the cog's containers (which we don't care about as new doc gets are suspended until it finishes), afterwards it'll clear the BatchParser which will await every future where the user_requested attr is True before the task is ...
Don't yell at me, but I forced push to get rid of it. Turns out I had already dropped the commit locally last month, forgot about it, and commited changes over it.
You're right. I overlooked the fact that the clear waits for the futures. The future will already exist by the type a refresh can be called, so it will be forced to wait for it.
Unless I missed something, after the get_markdown coro is called, the user_requested attribute of the future is immediately set to True before a refresh can occur (currenty L102 and L118).
Yes. However, if a refresh was able to delete the future (it can't since it awaits it), then it'd force a new future to be...
df90f21 Dynamically create parent cgroups for nsjail - jb3
9dac45e Remove cgroup parent constants from config file - jb3
c9368a4 Merge branch 'master' into dynamic-parent-cgroups - jb3
af704c1 Merge pull request #91 from python-discord/dyna... - Akarys42
06173ee Remove all child cgroups before removing parents - jb3
@jb3 One of the tests is failing. This is a similar issue to what #94 was trying to fix, but the test still fails despite merging that into this branch.
======================================================================
ERROR: test_stdout_flood_results_in_graceful_sigterm (tests.test_nsjail.NsJailTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/runner/work/snekbox/snekbox/tests/test_nsjail.py", line ...
Well, it clearly is a bit confusing with the synchronization around it. I'll just move the body after the refresh event wait into the get_event and add a comment so the future changes are aware of its use without going over the awaits themselves
Relevant Issues
Closes #208
Continuation #485
Description
Adds a command .prideleader which will give a pretty embed containing information given in a resources/pride/prideleader.json. It also links to the wikipedia command for that particular Pride Leader so that the user can get some more information on that. In case of Pride Leader not contained in the resources, it will add it to the hackbot.log with level TRACE and give link to the wikipedia command for that Pride...
I don't see the harm of having the original source linked, so I'm inclined to keep it.
The only thing suggested here that's part of my PR is not a sentence, so I don't see a reason for the period at the end. I'll tweak the other ones.
2c3043c Remove invoked command and message after failure. - Xithrius
[python-discord/bot] New branch created: pypi\-delete\-on\-not\-found
Closes #1443.
Removes the invoked command and any error embed the bot sent (from the pypi cog) after a constant amount of time that's set in the config.
Branch name should be pypi-delete-on-error, whoops.
I'll be yoinking this one.
Haven't tested yet, but I noticed that we're defining caches in bot/exts/help_channels/_caches.py, so it would be a good idea to have that there too.
Going by convention then, the namespace could be HelpChannels.dynamic_message? I'd also suggest simplifying the redis key, maybe message_id or just id
Code looks good and it works pretty well too. Except one change.
Can we add this to _caches.py? And if this is to be kept here, there is no need to specify namespace and move it to t class variables.
"Help channels have been updated" Sounds more accurate imo.
Could you explain what you mean by "more accurate"? I don't really see the main purpose of changing between "changed" to "updated".
I got the sentence wrong, nvm.
Thanks! Looks Good To Me!
Tested locally.
7896894 Moved cache, reworked logic so message sends on... - Xithrius
9d78367 Removed async_rediscache import. - Xithrius
GitHub Actions run 631946559 failed.
GitHub Actions run 631946559 failed.
GitHub Actions run 631949592 succeeded.
This was purely a code review, I'll test out this new command soon.
4ab3a38 Purge ban now says 'purge ban' on user purge ban. - Xithrius
[python-discord/bot] New branch created: ban\-vs\-pban
Just a few minor comments
Connected!
Just a small QOL change. When a user is purge banned, the feedback message shows that the purge was applied.
The difference between a regular ban and a purge ban:

Description
In Discord's markdown formatting, it has been mentioned in the past that codeblocks should have their triple backticks on their own lines. For the vast majority of time, this could be ignored, however recently the Android Discord client renders the two codeblocks differently now, with those without the dedicated lines for the backticks resulting in inline code blocks being rendered instead.
. Although this will have a little less overhead, so maybe it makes sense.
Regarding the available_help_channels attribute. In terms of code cleanliness I think it would be a lot nicer to always look at the d.py representation (as we do when the set isn't populated yet) rather than keeping our own state, but I understan...
I think this forgets to call the update function?
Perhaps this should be moved down below the init_available call. Makes more sense to wait for the channels to be synced before we edit the message.
I actually have a different opinion on this one, I think the log should come after, since the whole purpose of logging is to record events, ie. if we see the log it means x happened, if it doesn't then we never reached that point.
I'd log before the edit, then both in the except and the else clause to document the outcome. :smile:
I'm open to working on this. But to make sure I'm not misunderstanding this, you want to only use the first word and not the whole statement, correct?
I think it has to be a readme to be displayed, but not sure.
It has to be called README, yes. The extension doesn't matter.
Goal
When using pagination or the trash can symbol (the one used to delete embeds), it is set to only be able to use by the OP. It may help clean it up to delete reactions from people that aren't the OP.
Implementation Suggestion
Python already checks whether the person adding the reactions for pagination or the trash can is used by the OP, so it would be simple to use remove_reaction to get rid of the useless reactions.
This isn't a high priority issue, but it would help cl...
Thanks! Looks Good To Me! Just two comments.
Not sure if it is needed as a wrapper but I think it is good to have it since it describes the purpose of the constant better than RedirectOutput.delete_delay.
I feel setting error To False as default is better and then setting it to True here.
But yeah thatโs just my personal preference.
So I guess the child cgroups are still busy. I'll check it out.
[python-discord/bot] New branch created: many\-snowflakes
Here is how it looks with many snowflakes:

To avoid users making the bot hit ratelimits, it is still limited to one snowflake per invocation for non-staffers

After testing it seems to be working okay for many, a bit shorter nominations. So I guess limiting it to 1000 characters really is enough like you said.
I also think you should change the approval message in line 112 to ":white_check_mark: The nomination for {user} has been added to the talent pool"
ecdffd5 Don't mention watching anymore in talent pool a... - ks129
fa93d2f Shorten reason of nomination string to 1000 cha... - ks129
Connected!
[python-discord/site] branch deleted: ks123/nomination/split
9ac4773 Split nomination model to 2 tables and create m... - ks129
ff46d9f Change nominations admin interface and add nomi... - ks129
4bc55a5 Change nominations serializer and add nominatio... - ks129
51c57d3 Update nominations viewset GET and POST to make... - ks129
71388ff Add reviewed field to nomination serializer - ks129
[python-discord/bot] branch deleted: ks123/talentpool/migrate
Connected!
This PR is being reverted due to an internal decision. See discussion [here](#dev-core message).
1ebc283 Revert "Use JSON logging in production" - HassanAbouelela
[python-discord/bot] New branch created: revert\-1449\-json\-logging
Reverts python-discord/bot#1449
See internal reasoning [here](#dev-core message).
Currently, when visiting https://pythondiscord.com/pages/events/ you can't see any logo for Hacktoberfest event.

It is due to the fact that structure of branding was changed. Currently we point to python-discord/branding/master/seasonal/halloween/hacktober/hacktoberfest_animated.gif
The hacktober folder has since been renamed to hacktoberfest and and we have categories...
[python-discord/bot] branch deleted: revert\-1449\-json\-logging
Connected!
Could you break this into multiple lines to avoid the noqa?
Everything looks good for the most part. Could you also resolve conflicts and merge master?
"discord_role field is required when ASSIGN_ROLE flag is provided."
This was initially incorrect, as value is a list of str not feature. We should be checking if FormFeatures.REQUIRES_LOGIN.value not in value. This goes for the other two checks as well.
I am a little confused with the executor part, so the bot will become the guesser?
yes
[python-discord/sir-lancebot] New branch created: aoc\-fixes
Description
The PyPI embed can take up a lot of vertical space, which can be a little problematic in rapidly moving chat channels, such as python-general. We could maintain most of the embed's functionality while reducing the space it takes up.
Implementation
There are currently the following fields in the embed: Author, Summary, License, and Python Versions.
One possible implementation would be to limit the number of fields displayed to only include the most helpful ones. For exa...
I like this new embed, and I also agree that the license and author is not necessary when providing info.
Do we want the "Summary" field as well, or do we just want the summary below the title?
Either way, I can yoink this one.
Actually, the call is not needed here. Works perfectly fine without it.
I'll put it above the edit log.
Kinda same apporch to either this

or a lemon with a hand in front of it.
@Senjan21 I would like to take this
[python-discord/bot] branch deleted: ban\-vs\-pban
Connected!
Relevant Issues
๐คทโโ๏ธ
Description
- Replace a dead variable with its actual name
- Restrict the aoc leaderboard commands to December
Reasoning
The dead variable caused the cog to not properly unload while the leaderboard cannot work outside of December.
Screenshots
none
Additional Details
I mean, do you really need additional details?
Did you:
- [no, I don't like them] Join the [Python Discord Community](https://di...
Connected!
That's probably not necessary. We can let the staff know that or alternatively add it to the help section of the command.
Description
This feature will post funny and just really outrageously silly and funny. For example I was thinking the command could be along the lines of .techtip and there would be a bunch of different responses one being "Make sure after you come home for work you run a virus scan on your laptop to make sure it isn't sick" and just really funny pointless stuff like. I can give a more updated list that you guys can check over and moderate if needs to be.
Reasoning
This proposa...
We could just remove the of initialization of these names here, as we reassign them a few lines lower anyway. I think this is a leftover from a time where they may not have been assigned at __init__ time.
Turns out that killing the parent process does not kill its children. Therefore, we have nsjail's children (which are Python processes in this case) sticking around preventing child cgroups from being removed. This will be addressed in a separate PR.
e12e403 CI: fix test step not failing when tests fail - MarkKoz
cfe57d2 Suppress NsJail info logs during tests - MarkKoz
a8b9c33 Close file descriptors when subprocess ends - MarkKoz
a1b5e5b Fix the memory limit test and the import error - MarkKoz
2240dde Fix patch for DEBUG value during testing - MarkKoz
[python-discord/snekbox] branch deleted: bug/tests/nsjail
[python-discord/snekbox] New branch created: prctl\-reparenting
After receiving a set of busy resource errors after trying to remove dynamic cgroups introduced in #91, it became evident that Python interpreters were remaining active for a period after the nsjail parent had exited.
This PR fixes that by using prctl to register the Python NSJail workers as subreapers and collect orphaned processes.
Then, before cleaning up cgroups we use [os.wait](https://docs.python.org/3/library/os.html#os.wait...
e12e403 CI: fix test step not failing when tests fail - MarkKoz
cfe57d2 Suppress NsJail info logs during tests - MarkKoz
a8b9c33 Close file descriptors when subprocess ends - MarkKoz
a1b5e5b Fix the memory limit test and the import error - MarkKoz
2240dde Fix patch for DEBUG value during testing - MarkKoz
Connected!
@Senjan21 I would like to take this
I have assigned you. Have fun with the design!
Relevant Issues
Closes #446
Description
Restructured the trivia_quiz.py as it was getting huge into two separate files inside trivia_quiz/ namely _cog and _helpers. A new task has been added to _cog to get 10 random questions from wikipedia after 1 hour.
A new category is added (sort of) to the trivia quiz i.e. wiki/wikipedia that would use the 10 questions which the task has got us.
The problem is there is no good way to form the question, either the extract c...
8b0c1cd Remove useless initialization in the AoC cog - Akarys42
Changed in 8b0c1cd3b6729558218bd85aeb660d1975877345
I donโt think it is necessary, we donโt mention that only moderators can use !user on other users than themselves. I donโt mind adding it to the docstring but I feel like that will just add noise since the new command signature will reflect this change, what do you think?
Connected!
Connected!
Connected!
Could we have a special logo for st. Patrick's Day?
Everything looks great!
Everything looks great good job!
Idk man, you didn't lint
Could we have a Thanksgiving theme?
I'm working on some other assets, so anyone could do this.
I am gonna be working on this one yayyy.
Everything looks great!
Fixed bugs in the Tic-Tac-Toe
I changed the code up a bit,
So when the user tries to play the game with an opponent,
The program would first check whether the opponent is a bot or not.
If the bot is a opponent, then game would not start, instead
a message saying: "You can't play Tic-Tac-Toe with bots!" would be sent
Another alias
I also made a new alias called tic
async def tic_tac_toe(self, ctx: Context, opponent: t.Optional[discord.User]) -> None:
The return type hint here is None, yet you are returning a Message object.
if opponent.bot: # check whether the opponent is a bot or not
await ctx.send("You can't play Tic-Tac-Toe with bots!")
return
Hey,
I was recently thinking about a smarter way the the help channels could be done. I was thinking that there could be one more channel category that could be called "Ready For Help". How this would work, I was thinking as a help channel is opened and if the user asks a question the channel would go into the "Ready For Help" until its receives a response from a different user.
Description
The stored start/end dates of zodiac signs are mostly incorrect, resulting in dates given on the .zodiac command being incorrect, as well as the wrong zodiac sign being given in certain scenarios for the .zodiac date command.
Steps to Reproduce
Perform the .zodiac command (e.g. .zodiac scorpio / .zodiac date 22 november)
Expected Behaviour
The correct dates / zodiac sign should be shown
Actual Behaviour
Incorrect date / sign are shown:
...
Relevant Issues
Fixes a small visual bug on mobile in the .earth_photos command
Description
Made a change suggested by ToxicKidz on discord shown [here](#sir-lancebot-playground message)
Reasoning
The bug was annoying
Screenshots
Before fix:

After fix:
![Scree...
i think with this
the pr is ready to be merged.
stale.
[python-discord/sir-lancebot] branch deleted: aoc\-fixes
I don't feel like this change is necessary. If two items are returned at the same time, it will be returned as a tuple of those two items.
Connected!
We can be sure that they're at the end, there may be more levels of them though. Parsing them for enabling splits inside is fairly easy as other brackets will have a = somewhere between them and the last comma, but I couldn't think of a nice way to then add them at the end when truncating without some ugly counting going on or something like that.
Come to think of it I don't recall seeing any symbols with a long signature and a optionals, as those are done for functions from extension modu...
I think with multiple renamed uses like this it'd be better to move it value to a more appropriate key, although I'm not sure where something general like it would fit
Yeah, it's a bit involved, but I don't envision it being too ugly. It could be a done with a recursive parser that returns a flattened list of arguments while maintaining their opening/closing brackets, if present. A flat list is simple to truncate, but you do have to be mindful of the current depth of brackets at the truncation boundary so that you can insert the appropriate ellipses and closing brackets.
Maybe making the parser return the text and depth as a tuple would make it cleaner. Or maybe not.
Yep, this already exists! Thanks for opening the issue, though.
value=(
f"Photo by [{username}]({profile}{rf}) "
f"on [Unsplash](https://unsplash.com{rf})."
)
Maybe at this point it would be better to put it in a variable.
We have these two emojis already, but I personally don't have anything against adding a pure :lemon_wink: emoji. It would be a fun addition.
<img width="59" alt="Screenshot 2021-03-10 at 09 21 24" src="https://user-images.githubusercontent.com/65498475/110598405-ff5d4900-8181-11eb-8e0b-b3b0be66fbe8.png">
Hello @Slushs, thanks for your suggestion! Transferring this to the meta repo as it will need to be more discussed.
Currently our GitHub teams doesnโt have any icon, which is a bit of a shame. Here are the ones that could deserve one:
- Admins
- Mods
- Core Devs
- DevOps
- Media
- Generic event team
We shouldnโt spend too much time on this, but having some simple icons would be nice.
One of my idea would be to have a burple background with a white icon on top. If you have any better idea go for it, icon design isnโt my strong point.
Connected!
Now that we are approaching the 200k members (we are at around 160k at the time of writing), it would be nice to remove the 100k banner. We should still keep the wave and the overall new design brought by @scragly in #415.
The timeline should also be added to the โMoreโ drop down in the navbar. For reference, here is how the site looked before this PR:

I have two largish tasks to complete, so I am unsure on being able to get to this particular task, however I'd be happy to work on it as soon as I'm able to. I'm thinking about a month or so from now.
There was a 2nd stage semi planned that we never got around to thanks to my recent inactivity, so it would be good to see this actually completed properly.
Description
Entering I9ASDF causes the battleship game to error and end.
Steps to Reproduce
Start a game, enter a valid target, then add more to the message before sending it. Any text will do.
Expected Behaviour
The bot to respond with a red X like it does for non-matching input (such as AAAA)
Actual Behaviour
The game ends abruptly with An error occurred. Game failed
Possible Solutions/Details
The core issue lies on this line: https://github.com/...
I need to clean up the GitHub Teams a bit, so the list might change slightly.
If you need help, I can assist. I've worked with raw CSS and Bulma before.
i just added to for no real reason :)
We can probably raise a BadArgument error here, but am fine both the cases, the current one and raising a error (letting the error handler handle it).
Shouldnโt this comment be above the EASTER_COLOURS line.
I didnโt understand this line. Why are you double assigning the same variables to the same value?
The trivia quiz command on sir-lancebot currently lacks a branding/logo.
With the introduction on Wikipedia Guess Game along with it, I had like add a nice pretty logo on it as the thumbnail.
Feel free to discuss ideas here or in #media-branding on Discord. Give me a ping if you come with a nice idea/logo for it.
Test has been removed in 1b9f8ee9.
Thanks for the suggestion, addressed in 1b9f8ee9.
[python-discord/sir-lancebot] New branch created: pipenv\-to\-poetry
This PR migrates the dependency manager for Sir Lancebot to Poetry.
This is not intended to be merged anytime soon but is more of an experiment to see whether the tool integrates well and has good support across platforms, hence why it is currently a draft.
There are minor things that have had to be altered in order to make support work, as it's building on Python 3.9.
If we decide to go through with this then we'll probably merge this and then make alterations to new Python 3.9 synt...
Yeah, this test is quite redundant. I cleaned it up in aef979e6.
If we want to go forth with this PR, this line will have to be changed :D
Lol, I chose ignore authors and it does this.
1cb0b20 Change authors value in pyproject.toml - jb3
Addressed in 1cb0b203bb3af2f9377786aae672593783946314
Thanks for the last review round. I'm slowly working through everything, but I'll rerequest review when the branch is ready.
@Xithrius could you review
Oops sorry Chris, hit the wrong thing
I don't think so, there aren't many browser dev environments used besides these two @HassanAbouelela
Connected!
Yes, its a little more complicated than that, as file name is defined within _effects.apply_effect. I can pass through a str var for the filename though. Will do that in a future commit.
I knew there must've been a better way haha. Thank you. Changed in b867fb21.
Connected!
This is blocked by python-discord/site#451
This closes #1423 and #1424
Reorganization
This PR requires the code to be split across multiple files. To avoid unnecessary file moves, I moved the files to a separate recruitment extension now instead of waiting for #1422.
Talentpool listing
- The user's name and discriminator are now shown.
- It is shown whether the user's automatic review is scheduled or if it was already posted.
- Users who left the server are crossed of...
All looking good! Couple of minor comments.
Grammar here is irking me a bit.
WHEN channels.name ILIKE 'help-%%' THEN 'Help channels'
WHEN channels.name ILIKE 'ot%%' THEN 'Off topic'
Do we want to include deleted messages (probably a minor thing)?
If not:
author_id = '%s' AND NOT messages.is_deleted
Otherwise, please ignore.
Should we stall this until there's an updated list available?
List updated. Everything here is fine except that the Event Team has been removed.
The purpose of those names is to be used in a sentence, rather than titles, although I agree it's not the prettiest
fdc1be6 Ignore deleted messaages in message counts - mbaruh
9ac4773 Split nomination model to 2 tables and create m... - ks129
ff46d9f Change nominations admin interface and add nomi... - ks129
4bc55a5 Change nominations serializer and add nominatio... - ks129
51c57d3 Update nominations viewset GET and POST to make... - ks129
71388ff Add reviewed field to nomination serializer - ks129
Ah, gotcha, I thought it would be more a sort of list like ```
Help channels: 24,404 messages
Off topic: 12,000 messages
...: ... messages
Interesting to see that this issue has been open since August 2019 haha
In terms of today's bot, the plans are to import the idea we had for rattlesnake. Yes, it will most likely make use of redis.
We should remove good first issue label from this issue (#1427) and add a status: deferred label since there are problems in on_typing event of discord.py.
Context: #dev-contrib message
That was probably poorly explained, but my thought was to have a special icon for temporary or team created for an event that is bound to disappear. Like a star or something generic.
Thanks for your contribution!
np x)
Description
Whenever someone uses a group command without providing a subcommand, it sends the default help command instead of the one we already have.:
Steps to Reproduce
If I just do .group_name, it sends the default help command.
Expected Behaviour
It should use our help command, so it should look like this:

Actual Behaviour
It sends this:

After:

Additional Details
Affected ...
It could just read everything from the file with env_file: .env. Why don't we do that?
I'm not sure either, but I think this should be discussed within the future.
I'm going to rename NOT_FOUND_DELETE_DELAY to ON_ERROR_DELETE_DELAY to describe the situations more accurately.
d0fd687 NOT_FOUND_DELETE_DELAY to INVALID_INPUT_DELETE_... - Xithrius
This is a commit to issue #135.
Logo for Trivia
This is the Trivia Logo.
Connected!
There should be subtests to test each case in the query (i.e. you need to test off topic and help channels too).
It'd be better to make a separate test for each endpoint. In any case, the names response1 and response2 aren't great.
Document this endpoint in the viewset's docstring above.
I'm not sold on the current design that subclasses Scheduler. The main reason is that it doesn't provide much benefit over exposing the scheduler as an attribute. You stated yourself that it's unclear that the class is also a scheduler. If it was exposed as an attribute, the code would be more explicit.
The other issue with the design is that the subclass does a lot more than just scheduling. There's basically 1 function, schedule_review, that is directly tied to the scheduler. One may...
The command takes in user as argument but doesn't use it while converting the image into bytes.
image_bytes = await user.avatar_url.read()
Last requested change ๐
embed.set_footer(text=f"Made by {user.display_name}.", icon_url=user.avatar_url)
Can we add help_command a class attribute in Bot class in bot/bot.py, then we could just do:
await ctx.invoke(self.bot.help_command, ctx.command.name)
Can we add
help_commanda class attribute inBotclass inbot/bot.py, then we could just do:await ctx.invoke(self.bot.help_command, ctx.command.name)
bot.help_command is an attribute of commands.Bot and has to be of type HelpCommand. I don't know how overriding this with something that is not of that type will work.
Can we add
help_commanda class attribute inBotclass inbot/bot.py, then we could just do:await ctx.invoke(self.bot.help_command, ctx.command.name)
bot.help_commandis an attribute ofcommands.Botand has to be of typeHelpCommand. I don't know how overriding this with something that is not of that type will work.
Ah right! Forgot ...
A draft was given by me in media-branding channel with following content
https://cdn.discordapp.com/attachments/753252897059373066/819712051848151040/v1.gif
although it doesn't follow the 3 second animation 5 second rest rule. it is still viable to use 7 seconds of animation saying there is nothing to focus on.
Hmm I get what you're saying about not subclassing it and making an attribute instead, but is it really better to apply changes to the scheduler directly from outside? I'd say it's clearer to write the methods that define how to interact with the class.
Setting error to true then false feels a bit weird, but I guess that works. Thanks sir Xith.
Connected!
Connected!
To permanently cancel someone's review, either remove them from the pool, or use mark_reviewed.
review = (
f"They were nominated **{nomination_times}** before"
f", but their nomination was called off **{rejection_times}**."
)
Can we use this method instead of combining multiple strings, am not a big fan of the current one.
There is no class attribute named self.log, probably a typo:
log.trace(f"Nomination API 404: Can't find nomination with id {nomination_id}")
Connected!
Why is this an async function? I don't see it await'ing anything.
def make_embed(query: str, link: str) -> Embed:
I don't think you can create an embed object within a sync function.
5e5e6e5 Added '_' to allowed chars, shortened embed. - Xithrius
[python-discord/bot] New branch created: simplify\-pypi
Huh, I guess I was wrong. maybe in previous versions that was a thing? Not sure.
I don't think you can create an embed object within a sync function.
Why not?
Information besides summary is not very useful.
The license, Python version needed, and author has been removed.
Only the summary remains, with the title staying as a hyperlink to the package name with the current version.
Here's some examples of what the new embed looks like:

7a97eec Make the snowflake command accept many snowflakes - Akarys42
0a2e08c Restrict non-staffer to one snowflake at the time - Akarys42
326cd6d Compose: read GitHub API key from '.env' - kwzrd
a8c0da0 Compose: read all environment variables from '.... - kwzrd
92bfdd3 Remove invoked command and message after failure. - Xithrius
No major changes, everything seems good.
Could we possibily have a "No Description Provided" for packages with no descriptions?
a1991c1 'No summary provided' when there's no summary. - Xithrius
a693c20 Merge branch 'simplify-pypi' of https://github.... - Xithrius
Still looks good to me, but I'm all out of emojis.
Thanks! Looks Good To Me!
Well, it's already unicode, and I think the code reads better that way
That's called a bad copy-paste :D
It could, but I'm not sure if it's a good idea to load the file with functions that are only used in a single file and could pass as just simple helper functions. We can move it when needed, like I did with get_time_delta in this PR
Am not sure whether this style in followed in bot or not, but it is certainly followed in sir-lancebot (emojis are used as unicode characters).
I think what I wrote here is correct, it's a list of nominated users, hence a nominated users list :D
GitHub Actions run 647915624 failed.
GitHub Actions run 647924895 succeeded.
GitHub Actions run 647925548 succeeded.
- This is a icon, and hence should go into
icons/trivia_quiz. - Can you also include a
.svgof the Icon? - The files should be formatted this way:
trivia-quiz-dist.pngandtrivia-quiz-src.svg
Do you think it would be better to use ILLEGAL_CHARACTERS.search?
if characters := ILLEGAL_CHARACTERS.search(package):
I don't see how this would improve the code.
I don't see how this would improve the code.
Hmm I guess so.
Connected!
You can receive full name with parents using ctx.command.qualified_name, so you don't have to pass command name manually.
๐ ๐ ๐ ๐๐ฅ๐๐๐
Cheers mate, hopefully we don't make too many new devs hungry while getting help.
[python-discord/bot] branch deleted: fruit\-names
Connected!
Resolves #1431
This is a draft PR to implement the changes proposed in #1431. The branding management extension is rewritten to comply with the new event structures in the branding repository.
The implementation is functional but lacks a command API. I also need to spend more time testing.
Steps:
- [x] Implement branding repository abstraction
- [x] Implement
# region: Internal utility - [x] Implement `# region: Da...
Gorgeous assets. Attribution looks adequate. Let's merge.
I guess that's okay, but can we have the animation flow diagonally instead of straight top to bottom?
This looks mildly terrifying, which seems to be intentional.
The cutouts for the wheels don't quite match the wheels themselves. There's a slight mismatch.
I'm also curious how this would look with slightly larger wheels. When used as an emoji, I think they're just a tiny bit too small.
89de612 Add :duck_bike: - decorator-factory
15257c1 Move duckies in the correct folder - decorator-factory
f587282 Merge branch 'decorator-factory--duck_bike' of ... - decorator-factory
83dbaa4 Merge remote-tracking branch 'origin/master' in... - decorator-factory
14e78d2 change the color of duckybike - decorator-factory
[python-discord/branding] branch deleted: decorator\-factory\-\-duck\_bike
That's a great idea.
i will open the PR with diagonal gradient.
Connected!
88e7ab5 Use user reference passed via command
- ChrisLovering
I think we should keep this one the same, as it shows who created the new avatar.
Connected!
Looks good to me, just one change.
Since #625 was merged, you want to use bot.utils.extensions.invoke_help_command instead.
await invoke_help_command(ctx)
d8b30f2 Use new help command ext - ChrisLovering
Here is the fixed commit and pull to repo.
File has been deleted from previous location and moved to proper location.
Proper file names have been added.
SVG file type has been added.
[python-discord/bot] New branch created: allow\-poll\-to\-leads
For a quick update: my more-or-less finished implementation Python-side is using python-frontmatter, but I'm still looking for input regarding the CI setup.
error_msg = "Sorry your input didn't match any stored names, here is a list of available names:"
This PR adds Projects and Domains Leads to the constants and allow them to use !poll.
"""Loads the Pride leader cog."""
Apart from the minor changes mentioned above, everything else looks good and tested!
So currently, we are using 4 variables to store the state of a quiz game.
Would it be better to have a class representing a game? like
class Game:
def __init__(self, author, *args *kwargs):
...
and then in the Cog init method,
we can have a variable games (a dict).
the games dict would look something like this
{
channel_id: Game(...) class instance,
}
Also, another question is if we still want to store game instances, because this...
What happens if the status is not 200?
Then self.headers will be an empty dict, then the command fails as line 78
match, certainty = process.extractOne(query, self.headers.keys())
fails with the error

and the user does not get any output.
IMO, we should disable to command if we cannot fetch the data from the website/readme or if the response status is not ...
why is this an instance attribute instead of a local variable?
[python-discord/branding] New branch created: main
[python-discord/branding] branch deleted: master
[python-discord/async-rediscache] branch deleted: master
[python-discord/async-rediscache] New branch created: main
[python-discord/snekbox] New branch created: main
[python-discord/snekbox] branch deleted: master
[python-discord/bot] New branch created: main
[python-discord/bot] branch deleted: master
Connected!
Connected!
Connected!
Connected!
c0d8b0e Use .gitattributes to normalise line endings on... - MarkKoz
[python-discord/bot] New branch created: gitattributes
Remove the mixed line endings pre-commit hook because it is obsolete.
Relying on git to handle line endings means contributors have more flexibility with which line endings they want to use on check-out. The settings in .gitattributes only impose which line endings will be used upon check-in (LF), which should not impact local development; git will still respect the core.eol and core.autocrlf settings.
I always appreciate changes that lower the barrier to entry. I've tested this setup, and it seems hard to mess things up, intentionally or accidentally. Thank you.
4662728 Remove the mixed line endings pre-commit hook b... - MarkKoz
11f12a4 Use .gitattributes to normalise line endings on... - MarkKoz
Connected!
7955800 Use .gitattributes to normalise line endings on... - MarkKoz
[python-discord/api] New branch created: gitattributes
Remove the mixed line endings pre-commit hook because it is obsolete.
Relying on git to handle line endings means contributors have more flexibility with which line endings they want to use on check-out. The settings in .gitattributes only impose which line endings will be used upon check-in (LF), which should not impact local development; git will still respect the core.eol and core.autocrlf settings.
3f2f2a6 Use .gitattributes to normalise line endings - MarkKoz
9d7b0ca Use .gitattributes to normalise line endings - MarkKoz
