#dev-log
1 messages ยท Page 66 of 1
Can we directly just do import random. Just looking at choice In the code is sometimes confusing and adding random.choice() would be much more better
Can we add the pypi thumbnail as: (Pydis Emoji)
Link: https://cdn.discordapp.com/emojis/766274397257334814.png

Color should either be the yellow or blue on pypi logo.
Out of context, yes I can see how that's confusing. Will be changed.
I can probably find a permanent url, I don't think a discord link would work out in the long term.
I could use random.choice to pick one.
Hey! This actually got implemented in PR #227, there's certainly room to implement feature additions, but it's in there! It's just only active during June iirc. You can search for 'prideanthem' to find examples of it being used!
Thanks for the quick response! Have a good one!
Yeah cool! DId u get the colour codes of the two colours?
Well i could only find this
Link: https://commons.wikimedia.org/wiki/File:PyPI_logo.svg

Hello. I like the idea, and I think we should discuss a couple more implementation details before proceeding.
What do you think would be a good name for the Cog? What about the command?
I think .pyfacts is a good idea, like @Shivansh-007 said. About the cog, would py-facts work?
I made a concept of what it could look like:

Next time please ping me on discord or here. When u assign me, thanks!
Connected!
Do we need to discord.utils.escape_markdown() this?
"""Provide information about a specific package from PyPI."""
Remove extra whitespace
Would pip be another good alias, or do we want to reserve that for a future tag?
We may have a tag for that at some point, so I think we should reverse it for future use.
It must be done to be consistent with the rest of the bot.
Yes, and I'll be pushing the changes soon.
Decided to go with itertools.cycle so it can rotate through 3 colors infinitely. Those being yellow, blue, and white.
[python-discord/forms-frontend] New branch created: discord\-oauth
Heard you wanted some PRs.
Implemented
- Basic auth flow (open discord oauth menu -> get code; send code to backend -> store jwt)
- Helper methods to handle each of the auth steps
- Added a cookie library, may remove before PR is ready
- Dynamic selection between auth button, and submit
Implementation note:
Cookies are currently stored on the /form route, meaning any other parts of the application such as admin panel, will need to handle their own authentication. This is not ...
df8ef25 Adds Token Expiry Time To Auth Route - HassanAbouelela
[python-discord/forms-backend] New branch created: token\-expiry
Returns the expiry time of the discord authorization token on auth requests. See python-discord/forms-frontend#141 for more details.
[python-discord/forms-frontend] New branch created: test
A PR for testing sentry trace linking.
[python-discord/forms-frontend] branch deleted: test
Description
The current xkcd command doesnโt have the description, or a link to the comic.
Reasoning
It would help provide more info about the comic.
Proposed Implementation
Use the โaltโ key in the json page and use the URL var we use to make the requests.
Would you like to implement this yourself?
- [x] I'd like to implement this feature myself
- [ ] Anyone can implement this feature
You can go ahead and do it.
Thanks! Looks Good To Me!
@RohanJnr Did u get time to find out why this was happening?
[python-discord/bot] branch deleted: pypi\-command
8fcb4c6 Move Git SHA defining at end of Dockerfile to r... - ks129
[python-discord/bot] New branch created: ks123/docker\-git\-sha
Connected!
Defining SHA at the beginning of build breaks caching, so this should be avoided.
88b5b32 Escaping markdown in all fields that are created. - Xithrius
[python-discord/bot] New branch created: pypi\-command\-escape\-markdown
Removes the possibility of markdown being rendered within an embed for the PyPi command.
Before:

After:

Lgtm, just need to fix the import style.
f14c391 Made flake8 even happier. - Xithrius
[python-discord/bot] branch deleted: pypi\-command\-escape\-markdown
Connected!
The proposed changes seem to fix the command, thank you!
4687f3d Intial Commit; Change secret functionality and ... - Shivansh-007
ae51830 Fix return statements and return type annotations - Shivansh-007
1951ce5 Remove code that requires intents.member set True - Shivansh-007
d9a40f8 If whom is None, take the user as whom - Shivansh-007
370535b Improve grammar and update docstrings, add try.... - Shivansh-007
Connected!
This is ready for review. Don't bother looking at defcon.py's diff, it's practically a new cog.
4c6d87c Raise user input error to reset cd - ChrisLovering
[python-discord/sir-lancebot] New branch created: Reset\-valentine\-command\-cooldown\-on\-failure
Description
By raising UserInputError the handler in bot.py will reset the command cooldown.
Reasoning
The reset cd already exists, so raising the error utilizes already implemented & tested code.
Did you:
- [ ] Join the Python Discord Community?
- [ ] If dependencies have been added or updated, run
pipenv lock? - [ ] Lint your code (
pipenv run lint)? - [ ] Set the PR to allow edits from contributors?
Relevant Issues
Closes #588.
Description
I set the description the the alt key in the json page, and set a url in the title to the link to the comic.
Reasoning
The alt key from the request was already available, and could be safely added to the embed. The URL was also available.
Screenshots
Before Changes :

**After Changes: **

I think we may need to resize the like emoji, though. So, I will resize that and have f1re upload the new emoji to the emoji server.
Alrighty, I've resized the emojis and the ids from the emoji server are now being used.
Sold. Let's go with PythonFacts for the cog, and .pythonfacts as the command, and pyfacts as an alias.
Since you already provided the proof-of-concept, I think it'll look better with just the first word capitalized. The title could also be Python Facts rather than Hey <username>! just so it's clearer as to what the response is talking about.
Take it away!
Are you intending SOURCES to be expandable with more txt files coming in future? If so, should this be an extend? If not, we should just make the SOURCES const a string, rather than a list.
_EXECUTOR = ThreadPoolExecutor(10)
Constants are supposed to be capitalised.
color=Colours.soft_red,
color=Colours.soft_red,
I'd prefer moving this to docstring.
I'd prefer moving this to docstring.
Here it shows the docstring which is useful for community members when they see the help on this command, but in the docstring it tells about the code which would be useful for contributors when they look at this file.
I initially intended to have text corpus of other writers, however, I didn't have time to implement. I made it a list just in case someone else would like to add a text corpus. Is it preferred to have it as a string now?
If you want to keep sources as a list, then this corpus list should be set to [] outside the loop, and this line should be an extend. Otherwise we're in a half way situation.
I suppose I could replace the return statement with
return_value = await in_thread(func)
return return_value
but I feel like that's redundant.
Making the return type hint a Future instead of Str makes the type hint less useful. What do you suggest?
discord.py is parsing command help from docstring
Thanks! Looks Good To Me! Very nicely done ๐
With the current implementation if a new source is added the the SOURCES list, this corpus list will be overwritten each iteration. So only the last file in the list will be used.
If you use .extend() here instead, the corpus list will contain all of the lines from all of the sources.
Description
Currently, when interacting from files we using the normal
with open('filename.extension') as f:
...
This way of interacting with files is blocking. We should switch to a non-blocking method of handling files, both when reading and writing.
Reasoning
Most file interactions happen on startup, so doing this will improve bot start times. it is also possible that we do this in some places during the command, so this will mean those commands will no lo...
Tested locally, looks good to me! I like the messages to the user saying it might take a while! :)
I think these are probably best kept in the Emoji class, so they're with the rest of the emojis.
Just 1 thing I think we should do. Tested locally and functionality looks good to me! :D
GitHub Actions run 566095456 failed.
GitHub Actions run 566104848 failed.
GitHub Actions run 566119780 succeeded.
Use self.bot.http_session directly.
Please capitalize and show status code.
Such wrapper between constants is not necessary and should be removed. Use constants directly instead.
GitHub Actions run 566186767 succeeded.
GitHub Actions run 566188855 succeeded.
GitHub Actions run 566190700 succeeded.
GitHub Actions run 566193823 succeeded.
Connected!
Connected!
You have mentioned the return type annotation as VideoStatistics but here you return None.
You could use typing.Optional here.
The 'warn method is deprecated, use warning instead.
log.warning(
Could do: We could have a helper function for this. To keep this clean.
There's no way to definitively say if the Nile river or Amazon river is larger than the other. While the Amazon indisputably discharges more water, I believe there's some debate about where the Amazon definitively starts, and thus there's no way to say which is longer.
Because this question is ambiguous, it should be removed.
There is a typo in the word succesful, it should be: successful
Could we possibly add the thing about the dispute in the info part?
@MrKomodoDragon That's fine if we change the question to be one that has a definitive answer.
dafc38e Bump html-webpack-plugin from 5.0.0 to 5.1.0 - dependabot[bot]
[python-discord/forms-frontend] New branch created: dependabot/npm\_and\_yarn/html\-webpack\-plugin\-5\.1\.0
Bumps html-webpack-plugin from 5.0.0 to 5.1.0.
Changelog
Sourced from html-webpack-plugin's changelog.
5.1.0 (2021-02-12)
Features
omit html tag attribute with null/undefined/false value (aa6e78d), closes #1598
Commits
2e30bb1 chore(release): 5.1.0
aa6e78d feat: omit html tag attribute with null/undefined/false value
33d69f4 Update scriptLoading's default on README.md
See full diff in compare view
[![Dependabot compatibility scor...
fbf5e9e Bump @types/node from 14.14.25 to 14.14.28 - dependabot[bot]
[python-discord/forms-frontend] New branch created: dependabot/npm\_and\_yarn/types/node\-14\.14\.28
[python-discord/forms-frontend] branch deleted: dependabot/npm\_and\_yarn/types/node\-14\.14\.26
1442c7a Bump @testing-library/user-event from 12.6.3 to... - dependabot[bot]
[python-discord/forms-frontend] New branch created: dependabot/npm\_and\_yarn/testing\-library/user\-event\-12\.7\.1
Bumps @testing-library/user-event from 12.6.3 to 12.7.1.
Release notes
Sourced from @testing-library/user-event's releases.
v12.7.1
12.7.1 (2021-02-13)
Bug Fixes
click links on 'enter' key press (#534) (8a34d0b)
v12.7.0
12.7.0 (2021-02-11)
Features
add type support for {home} and {end} (#536) (808c550)
Commits
8a34d0b fix: click links on 'enter' key press (#534)
217b487 docs: add curiosity26 as a contributor (#555)
808c550 feat: add t...
[python-discord/forms-frontend] branch deleted: dependabot/npm\_and\_yarn/testing\-library/user\-event\-12\.7\.0
d50911b Bump sentry-sdk from 0.19.5 to 0.20.1 - dependabot[bot]
[python-discord/forms-backend] New branch created: dependabot/pip/sentry\-sdk\-0\.20\.1
Bumps sentry-sdk from 0.19.5 to 0.20.1.
Release notes
Sourced from sentry-sdk's releases.
0.20.1
Fix for error that occurs with Async Middlewares when the middleware is a function rather than a class
0.20.0
Fix for header extraction for AWS lambda/API extraction
Fix multiple **kwargs type hints # 967
Fix that corrects AWS lambda integration failure to detect the aws-lambda-ric 1.0 bootstrap #976
Fix AWSLambda integration: variable "timeo...
[python-discord/forms-backend] branch deleted: dependabot/pip/sentry\-sdk\-0\.20\.0
In the past we had a lot of flag emojis, although it can be a bit out of scope for our community to add more and more flags. My proposal would be to create an animated emoji cycling through all the different flags, in a similar fashion as our June server icon.
Connected!
Description
The Avatar commands such as .prideavatar, and .8bitify are blocking, meaning other people canโt execute other command.
Reasoning
It. would help so people could execute more commands simultaneously.
Proposed Implementation
Use an executor.
Would you like to implement this yourself?
- [ ] I'd like to implement this feature myself
- [x] Anyone can implement this feature
Description
We limit add a global limit of 1 concurrent command at a time to the image processing commands (easterifiy, pride avatar 8bitify etc.). We should also run them in an executor so they are non-blocking.
Reasoning
Image processing commands can be quite CPU intensive, especially if the image is high resolution. We discussed adding a concurrency limit across the bot of only allowing 1 command to be ran at a time.
Also, running these in an executor will mean its no-lon...
I'd most likely implement this at the same time as #594
Maybe this is just my personal bias, but I think it's hard to read formatting code if the formatting template is in a different castle. Maybe put it nearby, or even inline it (as an f-string?)
As discussed in discord, maybe such errors should be left to a top-level handler
- I would rewrite it as
if not results:
... # sad path
return
# happy path
but it's more of a taste question, I guess
9b6f549 Bump sentry-sdk from 0.19.5 to 0.20.2 - dependabot[bot]
[python-discord/forms-backend] New branch created: dependabot/pip/sentry\-sdk\-0\.20\.2
Bumps sentry-sdk from 0.19.5 to 0.20.2.
Release notes
Sourced from sentry-sdk's releases.
0.20.2
Fix incorrect regex in craft to include wheel file in pypi release
0.20.1
Fix for error that occurs with Async Middlewares when the middleware is a function rather than a class
0.20.0
Fix for header extraction for AWS lambda/API extraction
Fix multiple **kwargs type hints # 967
Fix that corrects AWS lambda integration failure to detect the aws-l...
[python-discord/forms-backend] branch deleted: dependabot/pip/sentry\-sdk\-0\.20\.1
Description
- Update x and o emoji in
constants.Emojisto use x and o instead of the letters x and o - Use embeds when you ask for board of a particular game, since it was pinging the user earlier. (
.ttt log show {game_id})
Reasoning
Was approved by @Akarys42
Screenshots
Update the .ttt log show {game_id}

**Updat...
Hey Chris! As our resource constraints are fairly low right now, and we would have to moderate the gif content, that's not something we are interested in right now.
I am going to close this issue for now, thanks for suggesting this!
Connected!
A few suggestions:
- Add paginated response for many results (maybe 5 pages, 5 results on each page or maybe a bit less pages).
- Order results in descending order of views or another parameter which would suit.
- I don't like the idea of this being restricted to only sir-lancebot channel, I think even voice channels, help channels, python and general/adv channels should have access to this command as it could prove to be quite useful.
- After the feature is merged, we could use caching i...
- I don't think 5 pages are needed, we should get only say the top 10, since after that, the questions are non relevant ones.
- Agree with this.
- On every question people would just run the command, and I am not in the favour of that, voice channels and bot commands channels are fine, and ots, but I am not in favour about the others.
- It is quiet fast right now, so caching isn't really needed.
- Agree with this.
I can do this, could you give me some pointers as to where the file interactions happen? I'm rather new and am not familiar with the codebase.
Yea, once one of the core dev's sign this off, you could do a code base search for with open( and that should show you all the places.
is it possible to have the X and O to be of different colors? or is single color fine?
is it possible to have the X and O to be of different colors? or is single color fine?
Hmm, there are no other colour of x and o. So i thought just to use this, since it is clearly differentiable.
[python-discord/sir-lancebot] branch deleted: Reset\-valentine\-command\-cooldown\-on\-failure
4c6d87c Raise user input error to reset cd - ChrisLovering
2d33d53 Output message in the same embed. - ChrisLovering
ab5e00d Remove leftover > from testing. - ChrisLovering
5b87787 Merge branch 'master' into Reset-valentine-comm... - ks129
3ad829d Merge pull request #589 from python-discord/Res... - ks129
Connected!
We had a discussion with the other core devs about this command the other day, and we want it to be restricted to #sir-lancebotplayground to avoid RTFM behaviors.
Caching sounds a bit overkill, although I wouldn't mind a non persistent one as long as we put a limit on the amount of entries.
We shouldn't show unanswered questions, I agree.
I believe it was decided a single page is fine, and we can maintain the old result format. Mark's other comment on custom paginators is still unresolved though.
Relevant Issues
Closes #587
Description
I added a text fie with some facts and made the command send an embed with the fact.
Reasoning
The text file would be simplest to edit and change.
Screenshots

Did you:
- [x] Join the Python Discord Community?
- [x] If dependencies have been added or updated, run `...
Ideally we should load this file into a variable when loading the cog, rather than every time this command is ran.
def __init__(self, bot: commands.Bot) -> None:
To keep consistency with the setup function in this file, and other parts of the bot, we should change this.
Once this has been changed, we can also remove the from discord.ext.commands.bot import Bot line at the top of the file.
https://github.com/python-discord/sir-lancebot/blob/3ad829d98f1de30f08d26fe592b8a89701301983/bot/exts/easter/egg_decorating.py#L15-L16 is an example of this being done. As you can see they're loaded into a constant outside of the cog.
GitHub Actions run 572523379 failed.
GitHub Actions run 572537708 succeeded.
GitHub Actions run 572545075 succeeded.
Looks good to me, tested locally too.
We should definitely add more facts to this list!
https://github.com/satwikkansal/wtfpython Has som. interesting facts/behaviour of python.
Please update the documentation on the endpoint too. It should mention that the results are paginated but only the actual data is returned.
We have an option on how to deal with concurrent requests, either we can queue them, or we can deny them and require the user to request them again. Is there any preference on either of these?
020b794 Cleans Up Error Display - HassanAbouelela
Hey Guys,
i am completely new to open source but an intermediate in python. I would like to take over this request if that is ok for you.
Best Regards,
Arez1337
@Arez1337 we actively encourage you to do so. Let us know in the #dev-contrib channel if you have any questions.
6b4b802 Cleans Up OAuth Error Logging - HassanAbouelela
Circle between the python's yellow and blue colour.
await ctx.send(embed=discord.Embed(title='Python Facts', description=random.choice(FACTS)))
No need of bold in the description.
Make the embed first and then attach it, not everything in a single line,
GitHub Actions run 573464103 succeeded.
GitHub Actions run 573465664 succeeded.
GitHub Actions run 573476767 succeeded.
GitHub Actions run 573476779 succeeded.
In asynchronous programming, blocking calls are all the parts of your function that are not using
await.Not all forms of blocking are bad, and using blocking calls are inevitable, but make sure not to use too much.
I think this part would be a bit vague for someone who's new to async/await. x + y is a blocking call, but you wouldn't usually describe it as such. Maybe clarify that it applies mostly to blocking I/O (with examples such as open and requests), or to CPU-heavy ...
I meant using itertools.cycle, and break this embed into multiple lines for better readability.
Get the colours from constants.py or add this there.
[forms-frontend] Branch discord\-oauth was force-pushed to `cde3272`
[forms-frontend] Branch discord\-oauth was force-pushed to `fdb06b4`
Why do invites need a special case?
@mbaruh If one message contains many invites, then every invite is posted as a separate embed. Reasons is a different for every guild blacklist entry (I suppose). But sure, I'll change wording.
cd0e443 Add missing None reason returns of filters - ks129
480dd04 Rename filter trigger reason from entry command... - ks129
I feel like this should also ping the DevOps since they would be more capable of knowing why we can't connect to Redis, and two of our DevOps members aren't mods.
Maybe we could add the days alias, at least for a little bit.
Couldn't we use some sort of falsy value such as None instead of creating and comparing to a relative delta on each join?
Won't that run even if defcon is disabled?
Please give a better name to it and add a comment what this store.
[python-discord/forms-frontend] branch deleted: dependabot/npm\_and\_yarn/typescript\-4\.1\.5
Hmm, I used the same name we use in voice_gate, but alright lol
There isn't a concept of disabled anymore. If you mean when it's 0, then no, it will be disabled by _update_notifier
Not sure, feels like that'd be hiding the fact it's not limited to days anymore
Alright, good enough for me.
Also looking back at it, I think the message should contain the traceback.
The thing is that if it is called with an integer it will assume that the value is in days. I don"t mind it staying like that tbh.
@Akarys42 I don't think any error at all justifies a ping. If it fails to DM the user it will also throw an error.
941c2b0 Bump eslint from 7.19.0 to 7.20.0 - dependabot[bot]
[python-discord/forms-frontend] New branch created: dependabot/npm\_and\_yarn/eslint\-7\.20\.0
Bumps eslint from 7.19.0 to 7.20.0.
Release notes
Sourced from eslint's releases.
v7.20.0
f4ac3b0 Docs: fix sibling selector descriptions (#14099) (Milos Djermanovic)
9d6063a Fix: Crash with esquery when using JSX (fixes #13639) (#14072) (Yosuke Ota)
a0871f1 Docs: Triage process (#14014) (Nicholas C. Zakas)
ad90761 Update: add enforceForJSX option to no-unused-expressions rule (#14012) (Duncan Beevers)
d6c84af Fix: --init autoconfig shouldn't add depreca...
Doesn't seem right for the defcon channel. Maybe devops? but then again it might be better to just re-raise the exception
I wouldn't mind having it in #defcon to be honest. The issue with re-raising is that it might get lost in Sentry because the issue already exists, although the traceback will show in the logs.
Recently a user posted a valid user token and we realized we do not have a filter for this. I believe it would be simple enough to implement this check and worth it to protect users that, for whatever reason make this mistake.
While there is no valid reason I can think of for a user to have their token in their clipboard, I still think it is important to protect our users. This could also potentially aid in moderating selfbotting discussions in the very off chance a user accidentally pos...
@fisher60 would you like to implement this?
We've got rudimentary detection for regular user tokens courtesy of the work I did (a few months ago). However, it only works on regular tokens (of which bot tokens are a part of). Users who have multi-factor authentication on have a different token format.
As far as I'm aware, they always start with mfa although I believe I've sometimes seen that capitalized. But no other letter pattern. We may or may not want to be strict with this? I'm pretty sure they always have two underscores wit...
From a cursory google search (ugh) token grabbers use this regex: mfa\.[\w-]{84}.
We do grab some forms of tokens at the moment (bearer tokens, I think), but not mfa tokens, we should definitely do that.
No, no, this won't do at all. You didn't remove this line ๐
Thanks for keeping up with all the changes, this LGTM.
We have an option on how to deal with concurrent requests, either we can queue them, or we can deny them and require the user to request them again. Is there any preference on either of these?
I don't mind queueing, as long as we have some healthy maximum.
The issue itself looks good, go for it!
09b4e9e Add aiofiles dependancy - ChrisLovering
f63af81 Move gender options to a resource file - ChrisLovering
dd59719 Merge all avatar cogs into one. Also includes s... - ChrisLovering
e79a773 Log what func is being ran in the executor. - ChrisLovering
032d4ae Add root alias support for commands - ChrisLovering
[python-discord/sir-lancebot] New branch created: Enforce\-image\-processing\-concurrency
Relevant Issues
Closes #593 and #594
TODO
Have all image processing code run in threads. Currently only done for pride avatar.
Add root aliases for rest of pfp processing commands. Currently only done for price avatar.
Test that root aliases still share the single max concurrency bucket
Description
- Ported root alias support from https://github.com/python-discord/bot/pull/1124.
- Merged all pfp modifying cogs into one.
- Added a concurrency queue to the group c...
[python-discord/sir-lancebot] New comment on pull request #597: Enforce image processing concurrency
@MarkKoz I've done what I think is needed to extend root aliases to support command groups too. I'd appreciate your feedback on the implementation.
c7de5a2 Extend root aliases to support commands.Group - ChrisLovering
Connected!
It basically cycles through the element of the list one by one, like here is a example
>>> import itertools
>>> shape_list = ["square", "triangle", "circle", "pentagon", "star", "octagon"]
>>> g = itertools.cycle(shape_list)
# Then call next() whenever you want another one.
>>> next(g)
'square'
>>> next(g)
'triangle'
>>> next(g)
'circle'
>>> next(g)
'pentagon'
>>> next(g)
'star'
>>> next(g)
'octagon'
>>> next(g)
'square'
>>> next(g)
'triangle'
Besides the change I requested, you have my tentative approval on the code.
In terms of actual functionality though, was the change in the x and o styles bikeshed? I don't particularly like the new ones, especially on light mode (you can compare the old and new styles in the screenshot below).

I don't think this space is necessary, it is pretty commonplace to have your code after the docstring of a function, and it's overwhelmingly the style used throughout the code base.
The same goes for the rest of the file.
3563486 Bump @types/node from 14.14.25 to 14.14.30 - dependabot[bot]
[python-discord/forms-frontend] New branch created: dependabot/npm\_and\_yarn/types/node\-14\.14\.30
[python-discord/forms-frontend] branch deleted: dependabot/npm\_and\_yarn/types/node\-14\.14\.28
fa277ca Bump sentry-sdk from 0.19.5 to 0.20.3 - dependabot[bot]
[python-discord/forms-backend] New branch created: dependabot/pip/sentry\-sdk\-0\.20\.3
Bumps sentry-sdk from 0.19.5 to 0.20.3.
Release notes
Sourced from sentry-sdk's releases.
0.20.3
Added scripts to support auto instrumentation of no code AWS lambda Python functions
0.20.2
Fix incorrect regex in craft to include wheel file in pypi release
0.20.1
Fix for error that occurs with Async Middlewares when the middleware is a function rather than a class
0.20.0
Fix for header extraction for AWS lambda/API extraction
Fix multiple ...
[python-discord/forms-backend] branch deleted: dependabot/pip/sentry\-sdk\-0\.20\.2
[python-discord/forms-frontend] branch deleted: forms\-submitting
a827d0e Add required props to form field types - ks129
1617faf Create new ErrorMessage component for showing f... - ks129
9a8701a Add valid and error to public state and require... - ks129
df4cac5 Display invalid information for TextArea - ks129
5b9d945 Provide valid and error message data to TextAre... - ks129
Connected!
Connected!
Connected!
<@&267628507062992896> WARNING: Unable to get DEFCON settings!
oh
first time I see that here
Connected!
Connected!
Other than the one comment, tests look excellent to me, thanks.
We don't have verification channel anymore so the this is redundant, same goes for any other part of the code that relates to patching verification channel id
Connected!
The nominations watch channel should be removed, it isn't used so is not necessary to have any more. All the other nomination logic should stay, we just don't need to relay nominated users' messages to a channel.
Currently the talentpool list command shows invalid-user for lots of the user mentions in the embed, as discord only displays them if they're already in the user's cache.
To fix this we can make it display the username and ID in the embed instead of using a mention. If the user is not in the server, this should also be mentioned (afaik we also may not be able to get the username if this is the case).
This is the command in question:
https://github.com/python-discord/bot/blob/844a1b66...
The idea here is to remove the need for moderators to write up votes by making it automated. This will happen a certain period after nomination (I think 1 month would be a good duration to start off with).
This should be done as a pinging message in the #mod-announcements channel, and it should contain:
- User details, e.g. mention and user ID (although if we use a mention it probably shouldn't be in an embed)
- Nomination history, number of nominations, unnominations, and reasons (rea...
[python-discord/bot] Issue opened: #1425 Allow multiple nominations on a member to be active at once
When a staff member runs the nominate command, if the user is already nominated it should not show an error message, instead it should accept the extra nomination. When a user is unnominated it should mark all current active nominations as inactive.
These changes should be reflected in a few places, !tp list and !user (in mod channels) should show number of current nominations.
I'm writing this issue without having consulted the rest of the staff about whether or not this is something we'd want, so this issue should also be a discussion about that if anyone objects.
Currently, the PFP for the ModMail bot is generic. While most ModMail interactions are initiated by server members, we occasionally start them ourselves, and we have to introduce ourselves as "a moderator on Python Discord"; otherwise it isn't necessarily clear what is happening. I think integrating o...
The good thing about the envelope is that it does help convey the DM nature of the bot, without people knowing what "modmail" means.
I'm curious if there is a logo design which can incoporate both icons to make it clearer.
Could the same effect be achieved through nicknames? Renaming the bot to Python Discord ModMail and giving it a nickname of ModMail in the server is probably the most clear we'd get it.
@jb3 Can that be done without making a new account? Would deploying the bot through a different Discord account cause any issues?
We can rename the account without having to create a new one. It's just done through the Developer portal.
I believe something like this could be a very positive change, perhaps something that conveys both dm/mail as well as Python, although I am not a graphic designer so my input here is limited.
I also quite like the naming and nicknaming suggestion. I think that would be as clear as we could get, while leaving the name in the server streamlined and accessible.
a827d0e Add required props to form field types - ks129
1617faf Create new ErrorMessage component for showing f... - ks129
9a8701a Add valid and error to public state and require... - ks129
df4cac5 Display invalid information for TextArea - ks129
5b9d945 Provide valid and error message data to TextAre... - ks129
[forms-frontend] Branch discord\-oauth was force-pushed to `604620f`
We could possibly make an icon for saint patrickโs day, which is coming up soon in March.
@MrKomodoDragon You're now assigned, so feel free to work on this and open a PR. What were you thinking for the icon?
Possibly a green background, and a different sahdes of green for the sneks
This seems too strict to me. Most of filter trips are for people who send a lot of screenshots in help channels, or a lot of design images in the branding channel. Let's start with 6 and see how many false positives to false negatives we have.
The attachments filter checks whether too many attachments are sent. This isn't mutually exclusive with duplicate messages, as someone might still send the same text but with a message attached. So it seems to me like this should just check that there is any text at all, and not skip messages with attachments.
Can you move the reason for invites to the footer as well?
@mbaruh Do you mean something like: Guild ID: ... | Reason: ...?
0f4365e Remove attachments check in duplicates filter - ks129
e3b980e Set max attachment from 3 -> 6 - ks129
Connected!
Fwiw the idea was to keep the current behavior but use the right filter when someone does spam images. I'm fine with changing the threshold though.
@ks129 yeah. Maybe the other way around
2268d46 Move reason for guild filtering to footer - ks129
@mbaruh Moved guild reason to footer
[python-discord/bot] branch deleted: ks123/duplicates\-ignore\-attachments
1a9d820 Ignore attachment-only messages for duplicates ... - ks129
84a46c9 Lower max attachments per 10 seconds to 3 - ks129
0f4365e Remove attachments check in duplicates filter - ks129
e3b980e Set max attachment from 3 -> 6 - ks129
e53ad07 Merge branch 'master' into ks123/duplicates-ign... - mbaruh
Connected!
Always returning None by certain functions, only to match the signature of other unrelated functions seems a bit iffy to me. I'm wondering if it's better to not unpack the return value right away and check if the return value is a tuple.
0dd2e75 Add bot and verified bot badges to the user embed. - Akarys42
[python-discord/bot] New branch created: feat/1365/add\-bot\-badges\-to\-user
This PR adds a bot tag in the embed title if the user is a bot, and properly handles the verified bot tag.
Here is how it looks with both badges:

Closes #1365.
Changes look good, thanks for adding tests for newly introduced errors. Amazing quality overall! Thanks.
Currently, the viewset /bot/nominations has a validator making sure that a user can't have two active nominations at the same time.
With https://github.com/python-discord/bot/issues/1425 we now want to allow this. Those lines should be removed, a...
It's tiny lol, can it be bigger?
Not with an emoji. We could make it a two part emoji, but that's pretty hacky
fd91a6f Remove 1 active nomination only check, update d... - ks129
[python-discord/site] New branch created: ks123/multiple\-nominations
Removes check that doesn't allow users have more than 1 active nomination. Updated docs and tests to match with this change. Closes #445
โฆrder again
Relevant Issues
Closes #592
Description
I deleted the Question about the longest river and then changed all following IDs to match the order again
Reasoning
The answer to this question is not definitively "nile"
Did you:
- [x ] Join the Python Discord Community?
- [x ] If dependencies have been added or updated, run
pipenv lock? - [x ] Lint your code (
pipenv run lint)? - [x ] Set the PR to **allow ed...
Ok, I requested a pull for my updated repository with the removed question https://github.com/python-discord/sir-lancebot/pull/598
1457bac Sets Sentry SDK Environment - HassanAbouelela
From the changelog notes:
BREAKING CHANGE: The default environment is now production, not based on release
I just set release and environment to the same value.
[python-discord/forms-frontend] New branch created: redux\-hcaptcha
Migrated from public state map to Redux store to allow persisting. (Note: Currently after filling the captcha all fields get cleaned, but they still stay in Redux store). Also implemented captcha using the pre-made component. HCAPTCHA_SITEKEY is a new environment variable added and what defaults to development (non-protective one).
Connected!
Connected!
Connected!
Connected!
This will be resolved during the bigger refactor of nomination storage.
[python-discord/site] branch deleted: ks123/multiple\-nominations
Can you provide proof that the answer to this question is incorrect? Google shows that the question and answer belong together.
Following on from python-discord/meta#92.
We want to provide a third help channel in the available category so that more people can type their question at once without the channel being claimed halfway through. Please see the original issue for the justification.
The help channels cog must be altered to provide for this and place 3 help channels into the available pool (as opposed to the current two).
It should be as simple as updating the config value.
https://github.com/python-discord/bot/blob/27e60e94bd1fe6784c2b7674433bb175255fa217/config-default.yml#L473
Indeed! Alright, let's make that change.
We'll then need to update the documentation for the feature though, so we'll leave this open. I think @SebastiaanZ has previously done work on the how to get help channel.
Connected!
@v1nam I'd recommend #422C01 for the mouth. Try that color (or something similar) and I'll happily approve it. The alignment sure works in this version.
Description
A hangman game command where the user can play as the guesser or the executioner. As a guesser, the player will guess letters one at a time. Each time, the bot will show how hanged the man is and if the half-guessed word. By default, the word will be 4-8 letters long and will have 3-4 unique letters. As an executioner, the bot will first guess a letter and receive confirmation or denial about the guess from the player. If the player says the bot guessed a letter correctly, t...
Hello, thank you for your contribution.
I haven't had a chance to go over the entire PR yet, but I see you have changes to the lock file, with no corresponding changes in the Pipfile. Is that intended? If not, please revert it. Thanks ๐
[python-discord/forms-frontend] branch deleted: dependabot/npm\_and\_yarn/types/node\-14\.14\.30
[python-discord/forms-frontend] branch deleted: dependabot/npm\_and\_yarn/eslint\-7\.20\.0
[python-discord/forms-frontend] branch deleted: dependabot/npm\_and\_yarn/html\-webpack\-plugin\-5\.1\.0
[forms-frontend] Branch dependabot/npm\_and\_yarn/testing\-library/user\-event\-12\.7\.1 was force-pushed to `70bae6c`
bacebeb Bump @types/react-dom from 17.0.0 to 17.0.1 - dependabot[bot]
[python-discord/forms-frontend] New branch created: dependabot/npm\_and\_yarn/types/react\-dom\-17\.0\.1
42501d7 Bump webpack from 5.21.2 to 5.23.0 - dependabot[bot]
[python-discord/forms-frontend] New branch created: dependabot/npm\_and\_yarn/webpack\-5\.23\.0
Bumps webpack from 5.21.2 to 5.23.0.
Release notes
Sourced from webpack's releases.
v5.23.0
Features
add parserOptions.url: "relative" option
Allows to generate relative URLs from new URL (e. g. for SSG/SSR)
Bugfixes
fixes for electron target
electron has importScripts in worker
only choose a chunkLoading which fits to the chunkFormat
prefer fetch wasm loading over node wasm loading
fix regression when combining library + runtimeChunk...
b133f6f Bump @typescript-eslint/eslint-plugin from 4.15... - dependabot[bot]
[python-discord/forms-frontend] New branch created: dependabot/npm\_and\_yarn/typescript\-eslint/eslint\-plugin\-4\.15\.1
Bumps @typescript-eslint/eslint-plugin from 4.15.0 to 4.15.1.
Release notes
Sourced from @typescript-eslint/eslint-plugin's releases.
v4.15.1
4.15.1 (2021-02-15)
Bug Fixes
eslint-plugin: [explicit-module-boundary-types] check allowNames on function declarations and property methods (#3051) (0ade469)
Changelog
Sourced from @typescript-eslint/eslint-plugin's changelog.
4.15.1 (2021-02-15)
Bug Fixe...
[python-discord/forms-frontend] New comment on pull request #134: Bump husky from 4\.3\.8 to 5\.0\.9
A newer version of husky exists, but since this PR has been edited by someone other than Dependabot I haven't updated it. You'll get a PR for the updated version as normal once this PR is merged.
[forms-frontend] Branch dependabot/npm\_and\_yarn/testing\-library/user\-event\-12\.7\.1 was force-pushed to `24b6e2c`
[python-discord/forms-frontend] branch deleted: dependabot/npm\_and\_yarn/webpack\-5\.23\.0
[python-discord/forms-frontend] branch deleted: dependabot/npm\_and\_yarn/typescript\-eslint/eslint\-plugin\-4\.15\.1
[python-discord/forms-frontend] branch deleted: dependabot/npm\_and\_yarn/types/react\-dom\-17\.0\.1
2d4b858 Bump html-webpack-plugin from 5.1.0 to 5.2.0 - dependabot[bot]
[python-discord/forms-frontend] New branch created: dependabot/npm\_and\_yarn/html\-webpack\-plugin\-5\.2\.0
Bumps html-webpack-plugin from 5.1.0 to 5.2.0.
Changelog
Sourced from html-webpack-plugin's changelog.
5.2.0 (2021-02-19)
Features
improve ssr (73d2a66)
Commits
dea2f4d chore(release): 5.2.0
20bf6f2 chore: update to html-loader 2
1f7ce7e chore: remove deprecated file-loader from examples
73d2a66 feat: improve ssr
e5036c8 chore: upgrade dev dependency to latest webpack version
See full diff in compare view
[![Dependabot compatibil...
8832897 Bump @types/node from 14.14.30 to 14.14.31 - dependabot[bot]
[python-discord/forms-frontend] New branch created: dependabot/npm\_and\_yarn/types/node\-14\.14\.31
b3d9df7 Bump @types/react from 17.0.1 to 17.0.2 - dependabot[bot]
[python-discord/forms-frontend] New branch created: dependabot/npm\_and\_yarn/types/react\-17\.0\.2
[python-discord/forms-frontend] branch deleted: dependabot/npm\_and\_yarn/types/node\-14\.14\.31
e6e5053 Bump @sentry/react from 6.1.0 to 6.2.0 - dependabot[bot]
[python-discord/forms-frontend] Pull request opened: #155 Bump @sentry/react from 6\.1\.0 to 6\.2\.0
Bumps @sentry/react from 6.1.0 to 6.2.0.
Release notes
Sourced from @sentry/react's releases.
6.2.0
[tracing] feat: Mongoose tracing support added to MongoDB (#3252)
[tracing] fix: Add missing find method from mongo tracing list (#3253)
[tracing] fix: Create spanRecorder whenever transactions are sampled (#3255)
[node] fix: Parse ESM based frames with file:// protocol (#3264)
[react] fix: Remove react-dom peer dependency for RN (#3250)
[emb...
[python-discord/forms-frontend] New branch created: dependabot/npm\_and\_yarn/sentry/react\-6\.2\.0
[forms-frontend] Branch dependabot/npm\_and\_yarn/html\-webpack\-plugin\-5\.2\.0 was force-pushed to `7c887c9`
[forms-frontend] Branch dependabot/npm\_and\_yarn/testing\-library/user\-event\-12\.7\.1 was force-pushed to `a9b68aa`
[forms-frontend] Branch dependabot/npm\_and\_yarn/types/react\-17\.0\.2 was force-pushed to `7dadff2`
3dece70 Fixes Broken Links To Assets - HassanAbouelela
[python-discord/forms-frontend] New branch created: fix\-broken\-links
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/site] New branch created: ks123/nomination/split
Previously, links to assets in public/ were using relative paths, which works on the home page, but on subpages, such as forms, the app would try to fetch them from an incorrect location, and 404. This PR uses fixed paths for the assets to allow proper locating.
Note: If your IDE complains about being unable to find the files, that's because the fixed path in the source code, and in the compiled output are different (see webpack config).
[python-discord/forms-frontend] branch deleted: dependabot/npm\_and\_yarn/sentry/react\-6\.2\.0
3293927 Bump uvicorn from 0.13.3 to 0.13.4 - dependabot[bot]
[python-discord/forms-backend] New branch created: dependabot/pip/uvicorn\-0\.13\.4
Bumps uvicorn from 0.13.3 to 0.13.4.
Release notes
Sourced from uvicorn's releases.
Version 0.13.4
0.13.4 - 2021-02-20
Fixed
Fixed wsgi middleware PATH_INFO encoding (#962) 2/20/21
Fixed uvloop dependency (#952) 2/10/21 then (#959) 2/20/21
Relax watchgod up bound (#946) 1/31/21
Return 'connection: close' header in response (#721) 1/25/21
Added:
Docs: Nginx + websockets (#948) 2/10/21
Document the default value of 1 for workers (#940) (#943) 1/25/21
E...
OK, I won't notify you again about this release, but will get in touch when a new version is available.
If you change your mind, just re-open this PR and I'll resolve any conflicts on it.
OK, I won't notify you again about this release, but will get in touch when a new version is available.
If you change your mind, just re-open this PR and I'll resolve any conflicts on it.
OK, I won't notify you again about this release, but will get in touch when a new version is available.
If you change your mind, just re-open this PR and I'll resolve any conflicts on it.
[python-discord/forms-frontend] branch deleted: dependabot/npm\_and\_yarn/types/react\-17\.0\.2
[python-discord/forms-frontend] branch deleted: dependabot/npm\_and\_yarn/html\-webpack\-plugin\-5\.2\.0
00b501f Bump @testing-library/user-event from 12.6.3 to... - dependabot[bot]
[python-discord/forms-frontend] New branch created: dependabot/npm\_and\_yarn/testing\-library/user\-event\-12\.7\.2
Bumps @testing-library/user-event from 12.6.3 to 12.7.2.
Release notes
Sourced from @testing-library/user-event's releases.
v12.7.2
12.7.2 (2021-02-22)
Bug Fixes
upload: apply accept attribute (#558) (d513d6e)
v12.7.1
12.7.1 (2021-02-13)
Bug Fixes
click links on 'enter' key press (#534) (8a34d0b)
v12.7.0
12.7.0 (2021-02-11)
Features
add type support for {home} and {end} (#536) (808c550)
Commits
d513d6e fix(upload): apply accept attr...
[python-discord/forms-frontend] branch deleted: dependabot/npm\_and\_yarn/testing\-library/user\-event\-12\.7\.1
[python-discord/forms-frontend] branch deleted: dependabot/npm\_and\_yarn/testing\-library/user\-event\-12\.7\.2
7c887c9 Bump html-webpack-plugin from 5.1.0 to 5.2.0 - dependabot[bot]
[python-discord/forms-frontend] New branch created: dependabot/npm\_and\_yarn/html\-webpack\-plugin\-5\.2\.0
1096e1c Bump react-spinners from 0.10.4 to 0.10.6 - dependabot[bot]
[python-discord/forms-frontend] New branch created: dependabot/npm\_and\_yarn/react\-spinners\-0\.10\.6
Bumps react-spinners from 0.10.4 to 0.10.6.
Changelog
Sourced from react-spinners's changelog.
0.10.6
bugfix: Fixed MoonLoader display issue #342
Commits
See full diff in compare view
8541e33 Bump @types/react-transition-group from 4.4.0 t... - dependabot[bot]
Bumps @types/react-transition-group from 4.4.0 to 4.4.1.
Commits
See full diff in compare view
[](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependab...
[python-discord/forms-frontend] New branch created: dependabot/npm\_and\_yarn/types/react\-transition\-group\-4\.4\.1
5ff7cae Bump @typescript-eslint/parser from 4.15.0 to 4... - dependabot[bot]
[python-discord/forms-frontend] New branch created: dependabot/npm\_and\_yarn/typescript\-eslint/parser\-4\.15\.1
Bumps @typescript-eslint/parser from 4.15.0 to 4.15.1.
Release notes
Sourced from @typescript-eslint/parser's releases.
v4.15.1
4.15.1 (2021-02-15)
Bug Fixes
eslint-plugin: [explicit-module-boundary-types] check allowNames on function declarations and property methods (#3051) (0ade469)
Changelog
Sourced from @typescript-eslint/parser's changelog.
4.15.1 (2021-02-15)
Note: Version bump only for package ...
[forms-frontend] Branch dependabot/npm\_and\_yarn/html\-webpack\-plugin\-5\.2\.0 was force-pushed to `1669224`
Note! This HAVE to be merged EXACTLY the same time as bot PR
Changes
Instead of one nominations table, there are now 2 tables: Nominations and nomination entries. The nominations table got one new field reviewed (boolean). Here are schemas of these tables:
Table: nomination
active (boolean)
user (User)
inserted_at (datetime)
end_reason (string)
ended_at (datetime)
reviewed (boolean)
Table: nomination entries
nomination (Nomination)
actor (User)
reason...
[python-discord/forms-frontend] branch deleted: dependabot/npm\_and\_yarn/html\-webpack\-plugin\-5\.2\.0
Iโll give this a shot!
1daf01e Rewrite inline codeblock tag - wookie184
[python-discord/bot] New branch created: wookie184\-tag\-updates
b116688 Add pep 8 song to pep 8 tag - wookie184
I'm just curious as to why a static change (a simple bump to 3 channels) was chosen, as opposed to dynamic change, as described in the original issue:
the bot could detect typing in these channels and if both are being typed into at the same time, send a new channel in
Dynamic change like this could be quite beneficial and wouldn't require further issues with increasing the count, it would also mean that during the more active hours, there would perhaps be more help channels, to satisfy...
The static bump was only a temporary fix. There are certain problems with the typing solution due to the way discord handles typing events (more detail than is needed right now), so we decided to table that for now while we continue looking for better solutions.
Rewrote the inline tag as it was unnecessarily long, and added the pep 8 song to the pep 8 tag.
Inline tag now looks like this:

Pep 8 tag now looks like this:

Yep, as Scale mentions this is a temporary solution.
We do have some internal issues that were opened after we merged this to talk about this including suggestions such as using reactions. We'll update onto this repo once we've held a discussion.
The current question is "What's the name of the largest river in the world?", which I think is quite ambiguous (does it mean length, volume, or discharge?).
Wikipedia suggests there is disagreement on what is the longest river, although from what I can tell the Amazon seems to be widely regarded as the river with the largest drainage basin and greatest average discharge.
I think removing the question is fine....
Relevant Issues
Closes #565
Description
This has been implemented with help of aiohttp to request and get json data of the Wikipedia Article. It then filters the data and stores only the required information namely Title, Snippet and Page ID. This filtered data to the Line Paginator.
Reasoning
Approved by Staff Member.
Screenshots
No Result Found
.
Considering that the server icon will be tiny...
The discord.Emoji check doesnโt support the discord default emojis. Hence I had to make a custom check for it.
The discord.Emoji check doesnโt support the discord default emojis. Hence I had to make a custom check for it.
Since COLORS is not being used anywhere, directly put it in the cycle, same for the facts.
COLOR_CYCLE = itertools.cycle([Colours.python_blue, Colours.python_yellow])
f0a7699 Add green checkmark icons - gustavwilliam
[python-discord/branding] New branch created: question\-mark
Adds an icon used in DMs sent to the user after claiming a help channel. This is used for python-discord/bot#1174. Here's the emoji and the use case:

Consistent style
The icon is designed to match the style of the green checkmark used in the available help channel embed. This will provide a consistent user experience from the moment they first claim the ...
[python-discord/bot] New branch created: dm\-on\-open\-help\-channel
Closes #1174.
This PR introduces a feature that will DM users when they claim help channels, with links to the original message and more. It looks like this:
This also introduces a new message truncation feature, that we can use whenever the content of a message needs to be truncated to a certain length. The bot simply ignores to send a DM if the claimant's DMs aren't open.
Before merging
The thumbnail icon is currently waiting to get merged into master on the branding repo. Pl...
Solid code, I don't have much to say.
name="Your message:", value=truncate_message(message, limit=100), inline=False
If all you need to do is change colours, it's really simple to open the SVG as text and edit the colours. It's very similar to HTML/CSS.
This seems redundant considering textwrap.shorten exists.
Nice work! One minor language thing and then just Mark's comment need resolving and I think we're good.
Let's formalise this a tad.
name="Jump to conversation",
A field makes it render pretty fine without one.
Connected!
So, the reason I chose this, is that both the field name and description will be "Jump to X", making it slightly repetitive. I tried something similar to what Sir Lancebot is using for bookmark.
Do you have any other suggestions of ways to formulate this, which are a bit more formal?
Maybe just "Conversation" as the header and link being "Jump to first message"?
3f99f18 Add powered by linode to the footer - Akarys42
[python-discord/site] New branch created: add\-linode\-footer
Great idea, thanks for telling me about it!
It now looks like that:

Disclaimer: I haven't done a lot of CSS in my life, I might be doing this all wrong :sweat:
That could definitely work. I'll update it.
[python-discord/bot] New branch created: pypi\-url\-formatter\-patch
Tested locally. It works well!
Nice grammar you got there.
[python-discord/bot] branch deleted: dm\-on\-open\-help\-channel
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
Connected!
[python-discord/forms-frontend] New branch created: hcaptcha
This PR implement hCaptcha to form page. New environment variable added: HCAPTCHA_SITEKEY what defaults to development key.
06727e0 Lock yarn hcaptcha dependencies versions - ks129
[python-discord/branding] New branch created: hidden\-gems\-logo
This PR adds the logo for the series Hidden Gems of the Standard Library, as well as the gem used. The logotype will be used throughout the series, just like the gem. If we want some graphics on the screen, the gem will sometimes be a good candidate.


...
[python-discord/branding] branch deleted: hidden\-gems\-logo
d71ac9f Fixes Problems With Help Channel DM - HassanAbouelela
Connected!
Thanks! Looks Good To Me!
Just an idea, maybe make a google form for suggesting facts like for .topic?
@MrKomodoDragon If we take suggestions, we should use GitHub Discussions instead.
If we are going to be taking suggestions, should we add a footer to the embed with a link to the github discussion, like we do for .topics?
I ran out of time for now, but I'm a few commits in. I've just gone over the code as of now and I wanted to give my feedback early, rather than late, as I'm not sure when I'll have time again.
Things I haven't reviewed yet:
- Grammar
- Functional test
As a general comment: None of the commit messages I've read have a meaningful commit message body and some of the titles are a bit too long. Ideally, a commit message should explain the what and why of the change you're committing to th...
Do we want two different options to represent an empty reason, "" and null? Could you explain why? The Django docs recommend you to not use null=True for character-based fields, as they already have a "logical" null value being an empty string.
It could be useful to specify a default ordering here that uses the inserted_at date, either ascending or descending. This makes it so that nominations can be displayed in chronological order (or reverse chronological order) without having to specify anything anywhere else.
Wouldn't this be solved by adding a serializers.PrimaryKeyRelatedField to the NominationSerializer? That saves us from doing a manual for-loop here. In fact, it probably means we wouldn't have to overwrite the list method at all, as we don't have need for custom functionality that way.
The current branding manager is just ported over from Sir Lancebot. This was originally meant to match with Sir Lancebot command-lock seasons, but now this is meant to manage server icon and banner, and having branding stuff in the branding repository and seasons in bot repository doesn't make sense anymore.
We should migrate all seasons data to branding repository YAML files what bot reads. Also, we should start supporting sub-seasons that are a short period during the larger season. This...
Testing this locally, we will need to add this check to both this and the ai sub command.
This command will never work, as no one will be able to respond.
The ai sub command won't work as the bot isn't able to remove the player's reaction after they add one.
For this I think just a simple embed saying something like, You can't play connect 4 in DMs. Go to <sir-lancebot-playground-channel> instead!
I don't want to include nomination ID in the read result, but if I don't define queryset, I get AssertionError: Relational field must provide a queryset argument, override get_queryset, or set read_only=True..
Connected!
So, link to the discussion?
Great to see that you're doing it with Illustrator instead now! A few things:
- Seems like there's one
.DS_Storeleft. Could you add that to.gitignoreso we won't have issues with it being committed in the future? - It seems like the banner has some weird artifacting. Do you know what might be up? Check it out below:
Other than that, it's looking pretty good.
I dunno about the artifacting, but will put the .DS_store in .gitignore.
The banner was previously an sag that only contained an image, which led to the strange artifacting of the fill tool. After discussing this in #media-branding, I've recreated the banner using the colors and dimensions of the original file. Since it seems like an svg can't be uploaded in a GitHub comment, I'll send the file to @MrKomodoDragon over on Discord and he'll export it as a png.
One final thing I'm gonna comment on, unless something changes. The file events/st_patricks_day/st_patricks_banner (1).svg should be renamed to events/st_patricks_day/st_patricks_banner.svg. Other than that, I've left a single comment for you to check out.
.DS_Store
This will make it apply to all .DS_Stores, instead of just the ones in the specified folder.
LGTM, thanks! Something seems to make the banner svg very tall, but I don't know what this is about. The shapes are right and it looks (almost) completely right in Illustrator, so I'll approve it. However, if someone knows what could be done about it, I'd love to hear about it.
The ai command and the 2 player command, both have the emoji checks.
I didn't understand what you mean by this:
This command will never work, as no one will be able to respond.
The ai sub command won't work as the bot isn't able to remove the player's reaction after they add one.
There's quite a bit of code duplication here, any ideas on merging it without redundant checks or changing the current order?
Optional arguments in brackets prevent this function from doing much in a lot of cases as it won't be able to split in them. Do you think it's worth looking into more? So far I haven't been able to come up with a satisfactory way to handle it later on in _truncate_signatures as it'll need to know the depth of optional brackets to be able to add them when not taking in all params
The banner has a white border all around:

Presumably this is a mistake since none of the other banners are like this. This is what it should be:

Oh, it seems like exporting from the SVG results in a border but the PNG in this PR looks fine. So only the SVG is messed up.
On making a typo with a tag, any additional text that was sent along with it is also sent in the "Did you mean..." embed.

The fuzzy matching also seems a bit odd here, with pste being matched to site instead of paste.
@mbaruh Now this doesn't have compatibility None returns anymore.
[python-discord/site] branch deleted: add\-linode\-footer
In order to start working on python-discord/bot#1431, the structure of seasonal assets must get reworked, and YAML files with data have to be added. This issue PR has to be merged same time as the bot issue.
[python-discord/forms-backend] New branch created: feat/9/unittest\-validation
This PR adds code unit testing through snekbox. This is a work in progress.
Closes #9.
Todo:
- [ ] Filter out unittest when sending the form to the frontend
- [ ] Add support for hidden tests
- [ ] Code documentation
- [ ] Unit tests documentation
@ChrisLovering Mentioned requested changes :D.
Looks good to me, tested locally too ๐
So, we already have this handler here https://github.com/python-discord/sir-lancebot/blob/3ad829d98f1de30f08d26fe592b8a89701301983/bot/exts/evergreen/error_handler.py#L85-L87 which catches the case where a command decorated with the commands.in_guild() check fails.
The question is, do we want to enforce this across all commands, or do we want to just make sure this check is added to commands as needed.
Up until recently, I was under the impression commands were already blocked in DMs. They definitely are blocked in Python. I think they should be globally blocked here as well. Are there commands that explicitly need DMs open?
On top of my head, minesweeper, aoc join, battleship and bemyvalentine secret will need to use DMs. Other commands shouldn't work inside DMs.
Bemyvalentine secret was already transferred to server only, aoc already runs in the server, and battleship is already guild only. I'd have to check minesweeper, but I don't see a reason for it to not be on the server.
So basically, we need to stop anyone from starting a command in DMs, since for aoc join it would just send the message, for minesweeper it would take input but we shouldn't allow it to start (maybe), same for others.
[python-discord/forms-frontend] branch deleted: dependabot/npm\_and\_yarn/types/react\-transition\-group\-4\.4\.1
The parentheses are not formatted correctly, they should look like:
await ctx.send(
embed=self.error_embed(
f"This command can only be used in the server. Go to <#{Channels.community_bot_commands}> instead!",
NEGATIVE_REPLIES
)
)
3616302 Add connect four cog supporting player vs playe... - Shivansh-007
f44a39d fix grammar and spacing - Shivansh-007
24e7f95 COrrect annotations and improve docstrings ; ma... - Shivansh-007
d1acfa3 Change Ai to bot's user and add stop game funct... - Shivansh-007
46e594c Add loading message before finishing all reacti... - Shivansh-007
Connected!
LGTM, thanks! Something seems to make the banner svg very tall, but I don't know what this is about. The shapes are right and it looks (almost) completely right in Illustrator, so I'll approve it. However, if someone knows what could be done about it, I'd love to hear about it.
Connected!
Connected!
44eb00c Add off-topic etiquette to the off-topic tag - Akarys42
[python-discord/bot] New branch created: etiquette\-off\-topic\-tag
I think everything is in the title :D
[python-discord/bot] Checks Successful on PR: #1433 Add the off-topic etiquette to the off-topic tag
GitHub Actions run 596834353 succeeded.
I hinted at this in a discussion on Discord, but I'm having doubts over the path remapping feature. It's proven to complicate the implementation and doesn't seem too useful in retrospect. In fact, it may be an unintuitive feature for end-users that edit configurations, since it breaks the established 1:1 relationship between the paths in YAML and Python. It's not inherently transparent to users that an attribute has been remapped.
I'm in favour of dropping the feature at this point. ...
This is not something we will be pursuing on site as it doesn't mesh with the goals of the site going forward. Existing services work for this (i.e. repl.it) and work well (albeit most are commercial).
Hey there! Apologies for the delay here.
This PR looks good, but there are some conflicts.
Are you able to resolve these?
Solved by removing _get_attribute_path.
We can solve this by removing attributes when the class is unloaded only if the value is still the default (so we don't override values coming from the configuration). We can hook that up on __del__ but we are relying on the garbage collector. What do you think about this solution?
I ended up using an isintance check to match the style used in the rest of the code. I don't mind switching it back to a try-except though.
@MarkKoz yeah. After digging into this, it seems like the viewbox for the svg was messed up. We fixed it by creating a new artboard in Illustrator and pasting the contents on it. Pretty weird, but it seems to be working now.
Thanks @gustavwilliam for the thorough review. Nothing left for me to do here but merge.
Since both the error message are used only once, they can be directly written in the error handling snippet.
Just picked up some stuff just by glancing through the code, haven't tested a lot yet, will do that soon
I think using () to write multiline strings looks better.
SEARCH_API = (
"https://en.wikipedia.org/w/api.php?action=query&list=search&prop=info&inprop=url&utf8=&"
"format=json&origin=*&srlimit={number_of_results}&srsearch={string}"
)
WIKI_THUMBNAIL = (
"https://upload.wikimedia.org/wikipedia/en/thumb/8/80/Wikipedia-logo-v2.svg"
"/330px-Wikipedia-logo-v2.svg.png"
)
You can just send the channel instead of sending the entire context with ctx.channel
Redundant variable formatting
line = WIKI_SEARCH_RESULT.format(
name=article['title'],
description=unescape(
re.sub(
WIKI_SNIPPET_REGEX, '', article['snippet']
)
),
url=f"https://en.wikipedia.org/?curid={article['pageid']}"
...
I would like an additional command which would append a python fact to the file and refresh the variable in the Cog which is storing the data loaded from the file.
This command would be only accessible to mods+.
What are your thoughts on this?
How about a background function which would send a python fact in the #python-general channel everyday ? (this would be cool if we have many facts tho)
How would I add it though? ๐ค
I don't like the idea of sending a random fact daily, i prefer it is used periodically when people feel like it.
I moved to a set since we can use ConfigEntry.__subclasses__ in order to get the currently loaded entries. At worse, we can always create a new API later.
We can fetch all the non-archived repositories using GitHub API and then add a pagination to it. With each repository in the following way maybe:
# Repository Name
- Description (from gh)
Please review the required changes.
Changes have been done and pushed, take a look at the new commit.
Currently the bot only sends the error embed when a BadUnionArgument or ArgumentParsingError occurs, unlike all the other handled exceptions which send the help for the command.
The PR adds sending the help under the BadUnionArgument error.
For ArgumentParsingError I've decided to only close the coroutine, as the error fails on the user's formatting and occurs regardless of the user passing in the expected args or not
47ed233 Instructions to dispute an infraction vary by i... - swfarnsworth
[python-discord/bot] New branch created: swfarnsworth/infraction\_message
Previously, the user was instructed to email the appeals email for infraction types that don't remove one from the server. They are now instructed to DM ModMail, except for infractions that remove them from the server (which all get mapped to the string Ban by the time the relevant code is involved).
There was also a header that read "Please review our rules over at ", and this now reads "Please review our rules". The header itself was and still is a link to the URL in question. I thoug...
@bast0006 was this eventually taken care of, or do we need to make a PR? As far as I saw, we just added another regex filter.
While discussing python-discord/meta#63, a suggestion that came up was to add a command to get a direct link to subsections of the python gotchas list. This can be used to quickly direct people towards relevant sections of this resource.
A possible implementation would fuzzy match the headers on the page, and send the link to the relevant sections.
Sounds like we just need a new regex in the token filter cog, yes.
@MarkKoz do you think we should continue with implementing this, or would it be too messy?
I'm not sure if this feature is completely necessary. It would be useful if someone accidentally let their channel go dormant to retrieve it to continue, but we may have to set a limit on how many times you can revive.
@liorsanders are you still planning to implement this?
[python-discord/sir-lancebot] New review comment on pull request #583: Add the stackoverflow command
I don't really think this is necessary to be a constant.
@Vthechamp22 this PR seems pretty close to completion. Do you think you'll have time to dedicate to this relatively soon in the future?
Current state of this PR: Organization Issue.
[python-discord/bot] branch deleted: etiquette\-off\-topic\-tag
Connected!
Looks and sounds good! Thanks.
Those changes look good to me, thanks!
If we truly want to have the bot emoji next to the name, it should be in same style as it is natively in discord, if bot is verified, give it verified emoji, if not, bot emoji. Putting bot emoji next to the name and verified badge below it is just weird.
@MrKomodoDragon are you planning to finish this off?
Connected!
@sebkuip will you be updating this PR relatively soon within the future?
Good stuff, I like the examples!
