#dev-contrib
1 messages Β· Page 20 of 1
umm sorry mb
so how do i approve next time?
message @slow bone
Okay sure tnx
@outer oasis don't User.history and Member.history give you the DM channel history?
I'd suggest just doing ```py
messages = [
message.content
async for message in ctx.history(limit=500)
if message.author == ctx.author
]
Absolutely no idea
I just took what people told me in put it in the box
I was just about to test
I'll change it this then
LGTM
ed it and
ed it

hello, can I talk to a mod or and admin? if there is please contact me
You can DM @slow bone
okay thanks
@clever wraith whats your website?
is there anyone interested in doing this feature?
https://github.com/python-discord/bot/issues/2271
nvm it is claimed
dibs
Is it bad form to add something to the .gitignore file solely because I use something that isn't listed?
If you think other people would have similar need for it, sure. If not you could add it to your global ignore
Oh huh, forgot git had that. For this instance, it's the pyrightconfig.json that tells my pyright instance to look at the venv for package info
The repo gitignore or global
Figure I'd be the only one with that kind of config since I rock Sublime
And it's purely an artifact of me using the lsp for it
Yea most likely, might be useful for you to add it to your global, unless you need it to be commited on some of your repos
Basically saying do whatever makes it easier for you, it won't really matter to us
Literally just a json:
{
// Install LSP-json to get validation and autocompletion in this file.
"venvPath": ".",
"venv": ".venv",
}
Fair
Thanks. Just didn't want to be a bother with it
Actually we have *config.yml, would it make sense to do one for json?
Probably not, we might have JSON in the repo for something
It would make more sense to remove that actually as we don't use it anymore
Fair enough. I can if we want
I'd leave it, it's not doing harm, and removing it might mean someone commits their config.yaml they have laying around in the folder
Wise words
We do?
Need some advice on the Voice Verification button thing. Trying to wrap my head around how the button click would call or use the VoiceGate.voice_verify() method. Because I have to make the class that inherits from discord.ui.View, but all the functionality is in the VoiceGate cog class.
Do I have to take functionality out of the VoiceGate one and put it into the view? I know I'm overlooking something but it's not clicking (pun not intended)
You can take a look at how d0rs4n did it for the code jam creation button: https://github.com/python-discord/sir-robin/tree/main/bot/exts/code_jams.
For the JamConfirmation view, it just gets passed a callback that it'll then execute based on which button is pressed.
You can also look at the JamTeamInfoConfirmation for something that does more of the logic inside the view.
@normal otter Please don't post advertisements like that here, this channel is specifically for discussion of our (Python Discord's) own projects. Discord isn't a fantastic platform for looking for contributors anyway.
Hi, this channel is specifically for discussion of our (Python Discord's) own projects. Discord isn't a fantastic platform for looking for contributors anyway.
It would fall under rule 6
As well as not following channel topics
There is a code review tag in #1035199133436354600
Hey, looking for a review or two on this https://github.com/python-discord/snekbox/pull/194
hello
hii
can i get permission for talking
!voice
Canβt talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.
^
3.13-dev is failing to build. It looks like some tests are failing but the logs are cut off so I don't know exactly which tests fail.
I'm wondering if it makes sense to have dev branches of Python if it's going to be so unstable that builds/tests fail.
Probably not. It was a nice idea, but probably better to wait for RC builds.
A user somehow has two threads open at the same time. A possible bug in the system:
https://discord.com/channels/267624335836053506/1168478837617737728
https://discord.com/channels/267624335836053506/1168493539567599678
#changelog message
It seems like OP might have accidentally created a new post instead of editing the original one
Hey everyone,
I am trying to look for some projects in Python / django where I can contribute. Does anyone have some good starter projects to look out for and help me in doing that.
Thanks!!
Hey!
The purpose of this channel is for discussions related to our open source projects (and contributions to them obviously)
We do have a project in Django that you can contribute to, it's called 'site'
!contribute
Here's an overview
Looking to contribute to Open Source Projects for the first time? Want to add a feature or fix a bug on the bots on this server? We have on-going projects that people can contribute to, even if you've never contributed to open source before!
Projects to Contribute to
β’ Sir Lancebot - our fun, beginner-friendly bot
β’ Python - our utility & moderation bot
β’ Site - resources, guides, and more
Where to start
- Read our contribution guide
- Chat with us in #dev-contrib if you're ready to jump in or have any questions
- Open an issue or ask to be assigned to an issue to work on
Is there somebody here thats wants to help me with a big project? Send PM!
not quite the right channel, this channel is for talking about projects related to python discord such as the bot and website
Does the Python bot not work with the warnings module?
#bot-commands message
Oh alright
You're missing an operator in your 2(2+1)
you need an operator between the 1st 2 and the parenthesis
Anyway, feel free to take it to a help channel please if you can't solve it
Thats the whole point of the code, but yeah.
Hello contribs!
In a month Advent of Code will be upon us π
I'd like to revamp Sir Robin's AoC commands a bit and add some QoL features. If you're looking for some bot items to work on, let me know and/or take a look in the Sir Robin repo for issues. I would love any help and it's a good opportunity to work on features that a significant part of our community works on~
Thanks!
I'm willing to work on it
:D
You're welcome to any of the issues on the repo: https://github.com/python-discord/sir-robin/issues
If you'd like to do something that isn't there, make an issue and let me know what you're thinking~
(If you want cookies for this DM me your address and I can send you some Christmas cookies. This is a legit offer that I offer to staff anyway)
Regarding sir-robin#98, I'm pretty sure we were going to port the help command to bot-core
go for it
(bot-core#85)
If you want to port it to bot-core and then use that in Sir Robin I think that should be fine. I can probs bug a core dev to be sure though
I think I'll try something else, since I haven't used HelpCommand before
I'll have a go at sir-robin#97 then
Feel free to assign yourself
@still comet Oh and if you need help with setting up the config and that sort of thing for Sir Robin let me know. I don't think we have it documented anywhere what sort of env vars you need and the like
For sir-robin#99, I should remove aoc_subscribe, and any mentions to !subscribe even for summer_aoc.py, right?
Yes, now everything is done through #roles. So any mention of the subscribe command (even if not directly related to AoC) should be removed
@bleak temple I can review later tonight, thanks for the PR!
Alright, thanks! π
I did start working on that
It got forgotten at some point and didn't get enough traction
I'll get to it this weekend
A guide to contributing to our open source projects.
is the site not mobile friendly or is it just some pages?
what do you mean not mobile friendly?
Looks fine on my phone
i mean the contributing in next line
and sub-articles being next to it looks kinda off
Yeah, the sub-articles is a little off
But the contributing part is fine on my phone
But I'm guessing that's what site#1138 fixes
i need help with my code for my doscprd bot
This channel is for discussing about this server's projects, perhaps you can try asking in #discord-bots or opening a help post in #1035199133436354600 ?
Just in case
The changes announced by Discord about signed attachment urls will break the attachment log channel
... if that's still a thing
Afaik this is a non-issue, since the client auto-refreshes the cdn url
The issue only applies when sending a discord cdn link outside of discord
As long as the link is valid when the bot first sends it, the client will automatically handle refreshing, so the user won't even know anything changed
Cc @celest charm
it wouldn't be an issue for the ducky channel afaik since it'll be refreshed
but the attachment log would break since those links are used to display on the site
if, again, that's still a thing
Right, if it's outside Discord (i.e. the site) then yeah, it'll break
I figured it was purely Discord
Maybe we're talking about different things? We have an attachment log channel that collects attachments from spam
do you mean the attachments that are included in e.g. purgebans? yeah that's outside of discord
When we clean messages (e.g. in a purge ban), the messages are stored in some kind of external log. That includes attachment links
Yeah, those attachment links will break
I wonder if you could just copy-paste them into Discord to view it though π€
you can still "resurrect" them by posting them on discord, right?
Not sure, but I'd hope so
to be fair, I'm not sure when this would be useful days after the incident
Yeah, true
Discord straight up ignores reports of anything that's deleted π€·
yeah those
they're copied to #attachment-logs, then the link of those new attachments are stored in the website to be displayed when you go to pydis.com/logs/$id
@sharp crag Could you re-review sir-robin#101? Turns out using a hybrid group can work just fine
is there a place where i can find issues that I can contribute to?
!contributing
Looking to contribute to Open Source Projects for the first time? Want to add a feature or fix a bug on the bots on this server? We have on-going projects that people can contribute to, even if you've never contributed to open source before!
Projects to Contribute to
β’ Sir Lancebot - our fun, beginner-friendly bot
β’ Python - our utility & moderation bot
β’ Site - resources, guides, and more
Where to start
- Read our contribution guide
- Chat with us in #dev-contrib if you're ready to jump in or have any questions
- Open an issue or ask to be assigned to an issue to work on
Just find an open issue on one of those 3 repos that's approved & unassigned
thanks
how do i know if it's assigned or not?
If there's no image then it's unassigned
And you can tell if it's approved by the status: approved tag
E.g. the 3rd option in the list is approved & unassigned
If you want to implement it, just put a comment on the issue saying you'd like to work on it, and once a Core Dev assigns you then you can start writing the implementation
ty
yep, I commented on https://github.com/python-discord/sir-lancebot/issues/1082
!contributing
Looking to contribute to Open Source Projects for the first time? Want to add a feature or fix a bug on the bots on this server? We have on-going projects that people can contribute to, even if you've never contributed to open source before!
Projects to Contribute to
β’ Sir Lancebot - our fun, beginner-friendly bot
β’ Python - our utility & moderation bot
β’ Site - resources, guides, and more
Where to start
- Read our contribution guide
- Chat with us in #dev-contrib if you're ready to jump in or have any questions
- Open an issue or ask to be assigned to an issue to work on
bot#2726 review when
Hey,
This channel is for discussions related to contributions to out repos only.
Also, the #networks channel isn't for social networking, it's more about topics related to networks in the IT field.
brawlhalla?
Looks like the invite link filter is not working that great within code execution at least:
#bot-commands message
#bot-commands message
#bot-commands message
Iirc that's just because messages from the bot are ignored by the filters
It can still be reported if abused though
#bot-commands message
Im more referring to this
Why do you think that i's not working there ?
Because it doesn't give the same message as linked?
yeah the bot should be deleting these
and sending the message about moderators being alerted
Yeah, i don't know about deleting since they're not quite clickable links, so not quite tempting to go to my browser and retype all of that.
It's working as intended, no?
It's not deleting those links because they're not valid links, it's using a non-standard slash char
That's what I think too, yes
ah i see
@still comet Let me know if you do or don't have the time to work on that PR a bit (just left some comments).
Totally fine if you can't, just want to make sure someone picks it up if you don't have the time
Alright, I'll take a look at the comments and decide when I get home later
Sorry for the late response, I just got around to taking a look at it.
I don't think I'll have enough time to work on it. If it was a week or two earlier, then maybe, but not anymore π
that's fine! I can have someone else pick it up. Thanks for doing the work on it though!!
@sharp crag you commented on the issue and the PR, is it something you're interested in and have time to pick up? (also fine if the answer is no~)
Anyone need help with their project? im very bored and I havent worked on a project in a while.
Looking to contribute to Open Source Projects for the first time? Want to add a feature or fix a bug on the bots on this server? We have on-going projects that people can contribute to, even if you've never contributed to open source before!
Projects to Contribute to
- Sir Lancebot - our fun, beginner-friendly bot
- Python - our utility & moderation bot
- Site - resources, guides, and more
Where to start
- Read our contribution guide
- Chat with us in #dev-contrib if you're ready to jump in or have any questions
- Open an issue or ask to be assigned to an issue to work on
Yeah I can handle it
When do you think you'll have it ready by?
I can most likely get it done by the end of the week. I'll let you know if something changes
Hurm... I'm having an issue with the whitelist_override decorator in Sir Robin and group commands. Whatever @whitelist_override is provided to the overall group completely overrides the individual whitelist_override given to the individual commands.
I'm not sure what the interplay there is or how to approach it
@vale ibex
can you look at my Sir Robin PR
I tested it but there's a good chance I got lost in the dpy sauce and missed something critical
Listen, I'm not responsible from where Sir Lancebot got it >_>
pr denied
you are both responsible for your new code, and all historic code you copied from
good luck

lol
my current strat of letting CI yell at me has worked so far
windows?
mhm
(Invoke-WebRequest -Uri https://install.python-poetry.org -UseBasicParsing).Content | py - there you go
no charge this time
left an initial review
I thought I had a fix for the block thing but I cannot, for the life of me, get dpy to catch this error... so I'll have something for you tomorrow
I lied, I went with a compromise because I do not have the brain energy to figure out d.py's group command decorator rules
alright cool, will give it a review tomorrow
Left a smaller review
π simple fix
Do we need both decos?
Yeah, top one role-locks it to admins, the second allows admins to do it anywhere and silence it?
I think I only need the fail_silently bit, but meh
So I think it's slightly misleading because it's mostly coming from me trying to get the overall group deco to still work with the channel restriction.
ah right, so it's an override of the channel whitelist check?
For the in_whitelist, if someone tries to execute it in a whitelisted channel it'll succeed. If they try to execute it in a non-whitelisted channel without the role override it'll fail. With the role override it'll succeed though. But it doesn't prevent someone from running it if they don't have the role override.
I removed the channel whitelist since it's admin only and I couldn't get the group deco to behave nicely. So the in_whitelist is really just for silencing the errors of people trying to use it when they shouldn't. Buuuut I think the better solution then would be for me to handle that error in the with_role deco instead. Let me see if I can adjust that
I've already got a branch for doing that
basically updating the error handler to handle a bunch more errors
on Sir Robin?
ye
is it pushed?
no
:(
just need to finish it a bit, can push it in 10-20 mins
it's based on your branch
okay perf
This commit also splits out handling of common base classes for ease of reading
Actually, why are we using a custom with_role deco?
rather than commands.has_any_role
I was going to adjust the with_role deco to support a silent failure if you don't have the perms
ah right
I need to run some errands, but feel free to merge that into my branch, I can adjust the with_role deco and then hopefully it should be hunky dory
I made those changes
If you could give my PR another look over, I can merge both down
Small, but error_handler.py line 136. "This command can not be ran in DMs@"
otherwise looks good
ah lol, yea
meant to be shift+1, hit shift+2
@sharp crag responding here cause I'm too lazy to switch over to GH. But essentially it's a command where the info is only relevant to the person executing to the command. So I figured it makes sense to make it ephemeral? In case someone wants to link their AoC but not necessarily want to show others that that is their account (in case it's linked to their actual GH username/realname/whatever)
The other commands (daystar, leaderboard, countdown) have info that others could still find useful.
That's my base thinking anyway, but I'm not hard set on it
The only one that 100% has to be ephemeral is the join one
Gotcha. The fact that they're all part of one group but those two (link/unlink) aren't is a little tricky. It doesn't seem like there's a way to made an app-command only command that's part of a hybrid group
Well actually, I did find one by source diving but it's not publicly documented so not sure how you feel about using that
I trust your judgement either way, so up to you
could you just name the two groups the same and as far as users are concerned they're the same?
LOL sorry Chris, I didn't realize you deleted my branch as I went to pull updates and accidentally pushed
I'll test that out and let you know. I feel like the code for that would be uglier than leaving all of them to be hybrid, but has the advantages user-side that kat mentioned
Oh Robin, the PR(s) that were just merged are deeeefinitely going to have hella merge conflicts. So it might be better to start fresh instead of fighting with it
Will keep in mind, thanks
Actually looks pretty simple (i hope). I'll just resolve them
Me being nosy and avoiding work, is it ready for a re-review?
Not yet, sorry. I've it locally but it needs a little more work. I'll push it tomorrowish and let you know once that's done
how do i become a dev
Hey @thorny obsidian, just poking you to let you know I've pushed some commits addressing your comment
Let me know if there's anything I missed or needs working on
Are you asking about contributing to the development of our open source projects, or how to become a developer in general?
!res if the latter, check out the below linked resources to help you get started with Python
The Resources page on our website contains a list of hand-selected learning resources that we regularly recommend to both beginners and experts.
@vocal wolf are you up?
ye
Emergency AoC lb fix
Bot is up in my testing server if you need to verify
approved
Issue is a pydantic setting getting default valued to None
yo @trim fable please approve PR thanks
Hey @tawdry vapor you like AoC right? :)
this is definitely one of the strategies to get PR approval lol
Thank you Mark, very cool
π my saviors
*\me trying to figure out how to approve a merged pull request* thanks for handling that for me π
You talk to your Microsoft Cortanaβ’ intelligent virtual and personal assistant to ask it to approve the PR.
Ah yes. Mhm. Let me grab my drink verification can then I can talk to Cortanaβ’οΈ
Hi, I have a blocker in my project, to integrate AI, help me, really urgent.
If you're looking for help, you can have a read of #βο½how-to-get-help
This channel is for discussing Python Discord projects specifically
Hello. Checking up since it's been a while, do you think it's possible for this PR to be completed?
sir-lancebot#1197
!remind 5 days review
5 is not a valid duration string.
!remind '5 days' review
'5 is not a valid duration string.
What now
I think you wanna do !remind 5d review
I thought we had converters for humanized dates
Commands for managing your reminders.
!remind 5d review
Your reminder will arrive on <t:1701902666:F>!
well according to the documentation, what you wrote should work
!remind "5 days" asdffdsaadfsafsdadfs
Your reminder will arrive on <t:1701902730:F>!
'5 is not a valid duration string.
Thanks Xith, i will do my duties
Sorry it took a while, i had completely gone dormant
Hello hello! Could use a review on sir-lancebot#1403 sir-lancebot#1404
Have left a review :)
I'll take a look at this today
Hi, is there an issue to update the UnambiguousUser converter failure message yet? It still mentions the old username#discriminator format #cybersecurity message
I don't think there is
A fyi, discriminators still exist and not all users have migrated yet so it isnt exactly wrong to keep it
I think we can chain converters, and the first one that is valid would do it
I dont doubt it I just say it isnt neccesarily worth removing from the embed
Ah yes I'm actually using what you're saying to say that we should have both
huh TIL
Can I get some thoughts on sir-robin#107?
What do you think about an !injection tag with text something like "concatenating variables into SQL statements is not safe. Instead use placeholders"... With maybe a link to more info or something?
for sir lancebot, are there checks for 2 users playing and guessing at the same time or only one can play at a time?
eg. for hangman game i was playing and someone else invokes the command at the same time?
!sql-fstring
Don't use f-strings (f"") or other forms of "string interpolation" (%, +, .format) to inject data into a SQL query. It is an endless source of bugs and syntax errors. Additionally, in user-facing applications, it presents a major security risk via SQL injection.
Your database library should support "query parameters". A query parameter is a placeholder that you put in the SQL query. When the query is executed, you provide data to the database library, and the library inserts the data into the query for you, safely.
For example, the sqlite3 package supports using ? as a placeholder:
query = "SELECT * FROM stocks WHERE symbol = ?;"
params = ("RHAT",)
db.execute(query, params)
Note: Different database libraries support different placeholder styles, e.g. %s and $1. Consult your library's documentation for details.
See Also
- Python sqlite3 docs - How to use placeholders to bind values in SQL queries
- PEP-249 - A specification of how database libraries in Python should work
@trim cradle fix. Thanks
bot#2817
why not good
too many words?
fewer do trick?
few words do trick
!raw 1180906240944119878
fixed
SQL & f-strings
Don't use f-strings (f"") or other forms of "string interpolation" (%, +, .format) to inject data into a SQL query. It is an endless source of bugs and syntax errors
-.
+, and people will hate you for it.
Additionally, in user-facing applications, it presents a major security risk via SQL injection.
Your database library should support "query parameters". A query parameter is a placeholder that you put in the SQL query. When the query is executed, you provide data to the database library, and the library inserts the data into the query for you, safely.
For example, the sqlite3 package supports using ? as a placeholder:
query = "SELECT * FROM stocks WHERE symbol = ?;"
params = ("RHAT",)
db.execute(query, params)
Note: Different database libraries support different placeholder styles, e.g. %s and $1. Consult your library's documentation for details.
Yo Xith, i'm looking at this rn
There's some error handling that needs to be done
a bit tricky
and then i'll make a new pr, gonna discard the old one
Bet
no
Dispatching errors is a pita
and, our error handler cog takes only the discord.ext.commands.Command class into account
a lot of attrs aren't available from context menu cmds
Here's your reminder: review
[Jump back to when you created the reminder](#dev-contrib message)
Yeah well, i need a response on this before #dev-core message
thanks
@thorny obsidian Found the issue with the paste service you were getting
running, locally I get this error pydis_core.utils.paste_service | WARNING | Paste service returned error HTTP 400: Bad Request (invalid content (exceeds size limit)) with status code 400, trying again (1/3).
the LB is >512kB
it's 55699 characters long
just so you are aware, I have seen the ping, and I'm doing the big think. Hopefully I have a meaningful response at some point.
Thanks!
I just didn't want to go in a direction that we wouldn't agree with, so I thought I'd ask
yuh
Can a core-dev please merge bot#2838 (it has required approval)
Done
Thanks π
@vale ibex you force pushing to a branch I already have locally to review is paaaaain 
also it can be merged whenever you're around. Avoiding merging rn because AoC is very active rn
Chris force pushes more than he keeps his eyes open during a day
just get gud at git
This is a human rights violation
Article 5
No one shall be subjected to torture or to cruel, inhuman or degrading treatment or punishment
[alias]
fp = "!git fetch --all && git reset origin/\"$(git rev-parse --abbrev-ref HEAD)\" --hard"
easy
just git fp
xD
There seems be sthg wrong with the notifications in #dev-log, we're not receiving all of them. Are we maybe being rate limited ? (I doubt since we're not having that many notifications, and we've certainly had a lot more before)
Looking at the status of webhooks, it seems to be normal
We are being ratelimmited, but that error wasn't being sent back to github, github was just getting a 500
I've fixed that in https://github.com/python-discord/workers/pull/200
you can use git-question-base to update your local branch to the upstream commits
Yea, those octopussed local stashes are great
though I never usually use stiffen-shell
It's useful if you want to squash the upstream commits after rebasing onto the trunk
true
Why did the bot stop saying "You either uploaded a .txt file or entered a message that was too long. Please use our paste bin instead."?
I believe it's ephemeral now
ephemeral messages can only be used for resposnes to interactions
We attempt to DM first now instead
it was part of the filter rewrite
o
Can we change it back? I sometimes see people try to paste things multiple times, whereas I didn't see that very often with the in-channel message.
I'm sure it can be changed yea. Just not sure if it is something we can do with the list config, or if it will require a code change
I'm also not sure of the reason it was changed in the first place, so might be best to raise an issue for comments
can i get a website template code?
This is the wrong channel for that, you probably want #web-development
HI
i want to contribute in python in mypy but i am facing problems
remote: Compressing objects: 100% (1014/1014), done.
error: RPC failed; curl 18 transfer closed with outstanding read data remaining
error: 753 bytes of body are still expected
fetch-pack: unexpected disconnect while reading sideband packet
fatal: early EOF
fatal: fetch-pack: invalid index-pack output
tell me how to solve this
problem
This channel is for assistance with our own projects, not external ones
You may be able to get some help in #1035199133436354600 / https://github.com/python/mypy/issues
@compact ruin
hi @fading galleon
how was your progress on the dark theme feature? asking in case there's any local work that wasn't visible in your fork
it looks like this issue is up for grabs again, and we still don't have a dark theme 
There's been some requests for a dark theme, and we came up with a feasible way this could be implemented. First, let's solve the actual theming on django-simple-bulma instead of here. I...
Hi, opinions on this before I commit https://github.com/python-discord/sir-lancebot/pull/1405#discussion_r1420337287
does anyone know the minimum required version of postgres for pydis site, or if it's documented anywhere?
when using postgres 14 I encountered an error, no more error when using postgres 16. I think we should mention the minimum required version somewhere in the contributing guides for site
What's the error you encountered?
The version is defined in the compose file, it's 15
damn, I checked Dockerfile instead, thanks!
psycopg.errors.SyntaxError: syntax error at or near "NULLS"
LINE 1: ...E api_filter ADD CONSTRAINT unique_filters UNIQUE NULLS NOT ...
^
should I PR to the contrib guide so it's reflected in the "Requirements" heading?
similar to "Python 3.11"
The thing is, the problem could be in your driver, eg psycopg
I don't think that's necessary
As versions don't get documented since they already all in the packages file or docker file
Otherwise we'd mention all versions of everything there
alright π
UNIQUE NULLS NOT DISTINCT clause got added in postgres 15 btw
hi @crude gyro, in django-simple-bulma the include_js flag added by volcyy seems to be unreleased (the latest v2.5.0 only includes the dynamic theming feature). it would be great if we could see a new release soon so pydis-site can use this feature for the dark mode. thanks!
can do
!remind 1w recheck the dark theme issue on gh
Your reminder will arrive on <t:1703236482:F>!
releasing django-simple-bulma 2.6.0 now, it should contain this fix. should be live within 10 minutes.
!rule 6
i wonder when people will read the channel description before spamming their project
||never||
There's something weird that started happening, and I don't seem to get why, I'm getting the following ClientResponseError from aiohttp
ClientResponseError(RequestInfo(url=URL('http://localhost:8000/api/bot/mailing-lists/pep/seen-items'), method='POST', headers=<CIMultiDictProxy('Host': 'localhost:8000', 'Authorization': 'Token badbot13m0n8f570f942013fc818f234916ca531', 'sentry-trace': 'abcc3f047a3a4bcaa673ae5deb57e91f-93194927acf541b6', 'Accept': '*/*', 'Accept-Encoding': 'gzip, deflate', 'User-Agent': 'Python/3.11 aiohttp/3.9.1', 'Content-Length': '5', 'Content-Type': 'application/json')>, real_url=URL('http://localhost:8000/api/bot/mailing-lists/pep/seen-items')), (), status=400, message='Expected HTTP/:\n\n b\'""\'\n ^')
The thing is, it's telling me that the status is 400, but the reques was ack and handled by the backend, and the record is persisted in the db (Look at the log in the picture)
The same request with requests or httpx, or even from my postman client, works just fine.
Looking at the headers sent with requests, I don't see a difference aside from the user agent
{'User-Agent': 'python-requests/2.31.0', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive', 'Authorization': 'Token badbot13m0n8f570f942013fc818f234916ca531', 'Content-Length': '5', 'Content-Type': 'application/json'}
Would anyone happen to have an idea why ? I really don't see what's wrong 
have you rebased onto main for the new bot-core version?
Yep
it seems like it's returning a 204, but still trying to read the content
did you rebuild your container to get the new bot-core dep?
Oh wait
I'm not running it in the container
ah
I think it's this
well, rebasing onto main won't help anyway, since I just realised that the PR isn't merged
I got confused because
1 sec
In github, the latest version is marked as 10.5.0
which is the version I have installed
I didn't make a github release I guess
whereas your PR to not read content is the 10.5.1
10.5.1 is latest
Indeed
However
Here's the version of the request method
Which is the correct one
bot#2853 cherry-picked the bump commit
What I don't understand is, why is ClientResponseError saying it's a 400
Ugh, too many questions
Approved, can you merge this so that I can rebase ?
I had this issue when the site was returning Response("", 204)
I think if there's no-content to return, it should return None
Yes I remember, but the version I have installed is indeed the latest
and does that return an empty string?
It doesn't even hit the return None line when stepping over, it as soon as I step over to send the request
I'm talking about site
it looks like this forcepush changed it to not return an empty string
I didn't verify
pythondiscord.com - A Django and Bulma web application. - Comparing a442d53ae7f4fd75c3c351980e1bfc98ff1e86ff..9e5b8640c098e862d91a353b6e0e90a4d87183a5 Β· python-discord/site
have you updated your site container after that?
Tbh, i don't recall which version of site I have atm
probably easiest to pull the latest commit from that branch, rebuild, and try again
Just wondering here, but suppose whether the site returns content or not, we're checking against the status code before we read anything, so why would that be an issue?
Well
That's our client
Not aiohttp's
So i guess that's why
π
Yea, it's an aiohttp internal thing
Good evening excuse me for bothering you I'm looking for someone who could help me bug a python application when I launch the bot discord it does not want to run on the contrary it closes I do not know how to do if you have the solution thank you for helping me very cordially
looks like they left
Sanity check, I'm reworking how the pinging new members that have already been harassed by the "never joined voice before ping" message works. We no longer need to track message ID's now that ephemeral messages and built in delete_after arguments have been added. Currently we use Redis to track those two things. Would I just do something like:
await self.redis_cache.set(member.id, None)
Or is there another way to just have the member id stored without futzing with having an empty value
Yea that's how we've done it in the past. I'm not sure if None will work though, you might need to pass it a meaningless sentinel string as a value
Oh der, in the file we have a NO_MSG = 0 const
So that'll work
Almost feels like a waste having a key but no value
"Looks like a douche, they get a 2"
Me when I join vc
You'd get an 11
β€οΈ
"His doucheness goes all the way up to 11"
I'm just happy there's the delete_after thing
Although...
Do you think it's more reliable than our system? Or should I still lean on our current system
What is the current system?
Schedule the message for deletion after a set period of time
We have our own thing for that?
Yarp
Lol
It was probably written before delete after was added to sendables
Use delete after for now, we should delete that custom impl at some point
In this case, the custom for this is just in the voice_gate cog
So tossing it out is trivial
That's where my time is going right now with the work I'm doing
Ahh right, thought it was done global util we had
Yea, that seems like something we can delete
Well that's annoying. My test bot is overriding my "Don't DM me in this server", so I can't quite test the channel ping
Oh huh, just thought of something
Is there a way to see if the user has message requests enabled?
I think a lot of our bot notification messages get caught there
Moving !done-idea convo here.
Iβm thinking of when someone types the command, potentially limited to helpers but thatβs to be seen, the OP gets a ping and an embed popup (potentially a DM aswell??). The embed has a message in the likes of: βsomeone seems to think this thread can be closed, confirm yay/nay?β
If confirmed we use the regular !close. If no clicked, delete the embed, no further action. If no action taken after say 5-10mins, anyone with the power to close a thread gets to see a/the embed: βOP seems afk and this thread is marked for closing, closing now?β This last one is without any pings to thread-closing power bearing users. It just arrives, if someone happens to to come across it, they can action.
Anyway, thatβs the raw idea. With some fine tuning and open to ideas as well.

@clever wraith what happened to the modlog?
Oh wait
Just in that file?
Sorry I'm dumb
I thought the entire cog was being removed
I did some abracadabra on it
Ahahaha
Embed popups can only be triggered via an interaction, and can only be sent to the person who triggered it. (only recently found that out while working on the voice button thing)
So it'd have to just be a regular ping or DM
But the DM wouldn't quite work as not everyone has DMs enabled anyway
(also ran into that issue during voice button)
What's the main incentive to do this? Have we had people having issues with threads closing? Sorry, I don't have the context for the initial convo
@tame pebble I appreciate the review, I'll have to check it out much later today or tomorrow. Christmas deliveries are punching me in the face
And thank you @dusky shore for the cheery yet mocking reaction
Anytime!
It was a long standing thing when the thread limits were still an issue, and maybe a bit of personal thing as sometimes youβre reading a thread, only to find out itβs solved and thatβs that. I suppose one could first scroll to the bottom to find out, but yeah.
So that + me wanting to learn more about git and contributing. And maybe a bit about discord bots.
Thought it might be a fun project for me to learn some more ^^
But thanks for the heads up on your recently found issues, Iβll give it another think. π
I was going to have a pop-up for new users who join the voice chat but that ended up being a no-go
I think the initiative is good, but the implementation effort and results won't be as promising for several reasons.
You can't force people to engage/read , and it's one of the main problems we've always had.
Look at the first embed that gets sent along whenever a thread is opened, it's 3 simple lines and I'd say 9/10 people don't read it.
Plus, closing the thread isn't a problem anymore sinec, like you said, such limits have been lifted with forum posts. And all threads are closed automatically after sometime.
Etc etc.
So, I'd you're interested in contributing and in discord bots, you can try implementing that for fun just like you can pick any issue in our repos and ask to get assigned to work on it.
I wouldnβt want to ask to be assigned to an issue, donβt want to kill dreams that it never gets finished. Rather just work on it quietly and see if I get it working. I know this might potentially be working for nothing, but until Iβm more comfortable I feel thatβs the best I can do. π₯²
Iβm also in the middle of house renovations, which doesnβt help with my available time on anything else to be honest.
Cheers for the feedback so far! Really appreciate it and will have a browse through the issues for sure πΌ
@tame pebble https://github.com/python-discord/bot/pull/2856#discussion_r1431919285 On that particular suggestion, the recommended change only changes the class name at the definition, but there's several references to it in the rest of the code. Do you care if I just change them on my side and not commit that singular change? I'm never sure what the etiquette is for things like that
Oh yes please do them on your side.
I mostly use that recommendation feature in order to highlight the difference, that's all.
lmao
Wtf is going on ahahahaha
Yeah I was wondering about that
I think they really want you to do it on your side
Really? I don't know, I'm not getting that vibe
Now if there were a few dozen more, then maybe I could see it
Coming right up
@tame pebble I'm having a hard time visualizing how we would break the button class down into smaller methods. It's all part of one continuous action and check. And I more or less lifted it entirely from the previous !voiceverify command
Most of the other methods covered tracking and pinging folks who hadn't been in voice before, as well as removing the messages tossed in that channel to verify
I don't have my laptop but I remember having the idea of
- Having a method that checks the role and send the according message (returns a bool to indicate whether we should move forwards)
- A method to fetch the data, and send error messages indicating errors if any, this returns data or none ( exit upon none)
- A method that runs the checks on the previous data ( given as arg) and sends the appropriate message if any
- Assign role and inform
Something like this
It summarizes the big callback into 4 parts.
- Does the user have the role?
- If not, get data
- If we have data, can they get the role?
- If yes, assign, else exit
Roger that. I'll take a look again
Here's your reminder: recheck the dark theme issue on gh
[Jump back to when you created the reminder](#dev-contrib message)
- Having a method specifically for role check isn't really necessary, since that's a quick:
if interaction.user.get_role(Roles.voice_verified):
log.trace("User already voice verified.")
await interaction.response.send_message((
"You have already verified! "
"If you have received this message in error, "
"please send a message to the ModMail bot."),
ephemeral=True,
delete_after=GateConf.delete_after_delay,
)
return
We already have the .get_role() thing to make that check
(Just working through my thoughts on this)
I did however move that check up to the top of the voice_button method so that we have an early out without API hit, as you mentioned in the review
Yeah okay, it's finally clicking how I can split this a bit
Sure, but I was mostly talking about including the handling of the case when the user did have it as in the sending of the message.
Why is @stable mountain trying to connect to this server over the testing server?
Ah, we don't use config.yml anymore
And of course the project is 3.11+ only including the botstrap script
recheck your .env
Yeah, I also realized that the environment got renamed.
I hacked together a Python 3.10 environment to run the bootstrapping script and fixed my .env file.
It works now.
I'm editing bot/exts/moderation/infraction/_utils.py, reloading all extensions doesn't pick up my changes.
I'm using docker compose and I have to rebuild the bot container to apply my changes.
Am I missing something obvious?
To my knowledge, hot reload isn't available in docker, or at least not without hacking around.
When you build the image, you build it with specific content / code.
Changing the source on your machine doesn't change the code in the container. Which is why reloading the exts doesn't do anything since the code didn't change.
Rebuild is the way to go.
Maybe there's a trick to doing it, so we'll see what others have to say and we might end up learning something new today.
We use compose volumes for this
Right, but IIRC we used volumes so ext reload does work
but it's fine, I'm used to 10/20s reloads from other projects, so it's tolerable
Sadly the ext reload command doesn't reimport separate modules
So it'll only pick up changes in that one file
You'll need to restart the bot
You can speed it up by doing docker compose up bot
I'm using docker compose restart bot for now
Ah cool, yea that's the way to do it
Yeah with volumes it'll be possible, but i don't remeber us using volumes for that
Well
anyway, the paste service is being a pain
We use a volume to mount the entire workspace, so there's no need to rebuild unless you change deps or the dockerfile
https://github.com/python-discord/bot-core/blob/8877fa154439f0ef44366d5808769a50f0c2915f/pydis_core/utils/interactions.py#L84-L88 for some reason, this isn't removing the view from the interaction
pydis_core/utils/interactions.py lines 84 to 88
def stop(self) -> None:
"""Stop listening for interactions, and remove the view from `β`βself.message`β`β if set."""
super().stop()
if self.message:
create_task(_handle_modify_message(self.message, "edit"))```
That's not default behaviour, you need to inherit from the view from bot core
Oh, that is bot core code, lol
How are you using it?
hmm, I suspect the version of pydis_core being used doesn't have this method
the stop method doesn't seem to exist
Yea alright, you'll need to rebuild the docker image whenever dependencies or the dockerfile changes
side-tangent, but it's only slightly annoying to work on this project using Python 3.8 :P
well, the ban command is broken, but it seems like bot#2316 should be good to go now once I push.
PTAL 
thanks for taking over!
you're welcome birdo!
Starting to go through and do some code reviews (while waiting on the ones for mine). Any specifically that we want to push forward before others?
I have seen the changes, it's just that I'm on vacation now so I can't review nor test.
Will get to them by tomorrow hopefully
I'd like an opinion on bot-core#198
And this should be easy to review bot-core#199
You're good! I wasn't trying to be like "UGH, why's it taking so long"
Is it ok to add new library dependencies in PRs where it makes sense and the license allows it? I didn't see any mention of it in the contributing guidelines
Yea for sure
Fantastic, thanks π
I saw that you've added the backoff one, it hasn't been active in while.
Are you familiar with tenacity?
Haven't looked at the license, but i've used it before, works pretty well and seems to be still active
& has more stars :p
Yeah tenacity is another option. I don't have a strong preference, I can use tencity if you'd prefer. π
I usually go for backoff because, if I remember correctly, it has a slightly nicer API for doing something, but I don't remember what it is. On the other hand tenacity may be more featureful, not sure
I've used both and they both get the job done
I just prefer using librairies that are maintained instead of deserted ones.
As for the functionalities, they both deliver
Could you leave a comment on the PR regarding the preference for tenacity? I will switch out the libs once I have a minute
I'm looking over bot-core#198, but I have to pick apart how we currently have the error handling before I can have a good opinion. Should have some thoughts soon
Thanks !
It's all done in a Cog ATM
The problem emerged because we wanted to start supporting slash commands errors
Which are done differently
When I tried to do some black magic to relay the slash command errors to our cog, it doesn't work as we rely quite a bit on the Context class
So multiple attributes aren't available anymore
Sure !
Most of these would just swap from context to interaction right?
Or are there more layers than that even?
Mostly, yes.
It's also the fact that the same exception can be thrown from a different type of command, so we need a way to convert from both Context and Interaction to something than can be later used in the handler's business logic.
We're not necessarily deprecating the old cog.
We're splitting the handling into their own units, bases on the exception type.
Instead of having a big fat class (the exception handling cog), that's trying to do everything and loaded with conditionals
The purpose is to increase the cohesion, & define boundaries better
Gotcha
@vale ibex We squash and merge, right?
depends on the PR
if there are meaningful commits in there, then merge commit, fi you want to squash to one commit, then squash merge
your commits are good so I'd merge commit personally
if you're talking about
bot#2856
Don't forget to announce it π
https://github.com/python-discord/snekbox/pull/197 ready for review
CI tests that the eval-deps can be installed on the container, so it's pretty low-risk
any ideas on what we could do for this sponsors section on the homepage for the dark mode?
they're somewhat readable, but either way it doesn't look very good
and I don't feel like using a light background for such a large section like this fits a dark mode that well
(doesn't fit above section (projects) nor bottom section (footer) either due to the neighboring sections having much darker backgrounds)
I think using a light background is probably the way to go. Even if it doesn't look great, I think readability is more important. Some brands might offer a separate logo for dark mode but not all would and I think modifying them ourselves would likely break brand guidelines.
Maybe the light background could be just for the box containing the logos, something like this?
hmm, I understand your reasoning
how about a simple grid so they have their own light backgrounds?
although... the images all have different sizes
trying to think of a site that shows sponsor/"used by" logos that has a dark theme, so I could see how they do it
ah yes, golang, how about this?
that looks good
yeah that looks nice
we are allowed to have all the logos the same size right? no restrictions on the sizes for specific companies that is
Yeah I think that should be fine
okies! I'll give it a try for the grid then
feel free to look for different logo shapes too, e.g. the cloudflare one used by go and in their press kit may be a better shape https://www.cloudflare.com/en-gb/press-kit/
why does the parent div have a different shade of grey to the rest of the page?
or is that 3 different shades of grey for bg colour?
I made that edit through the browser on top of the PR preview and it was already like that https://deploy-preview-1176--pydis-static.netlify.app/
I can see why since it's mirroring how it's also different shades in light mode, though it does feel like there's a lot of shades of grey on the page
ah yea, i see what you mean about lightmode now
it looks good on lightmode, but weird on darkmode with the current colour choice
yes I guess it's because the footer in light mode is dark so the sponsor section's shade looks alright
but in dark mode everything is dark
I could perhaps let the sponsor section have the same shade as other content (or footer) after having the per-logo backgrounds
here we go... https://deploy-preview-1176--pydis-static.netlify.app
We're a large, friendly community focused around the Python programming language. Our community is open to those who wish to learn the language, as well as those looking to help others.
TIL css requires math
fingers crossed none of the logos are squashed... off to bed for now 
Not sure actually
Probably
Relavant cog is here: https://github.com/python-discord/bot/blob/main/bot/exts/info/code_snippets.py
Multi-file support will be a problem
Everything the cog currently supports (which is GitHub, Gist, GitLab, and BitBucket BTW) is guaranteed to be a single file
more interesting paste
https://paste.pythondiscord.com/JC5A
apparently it's really two pastes under one name
That will be a giant pain
the 2nd raw points to a different paste
What's the context here? This sort of thing https://github.com/python-discord/bot/issues/2679?
Oh I didn't know there was already work on it
Yeah, that's the ask
No real [preexisting] context, just started talking about it
does this thing not have a nice structured api?
if so using that should make things pretty easy
parse the line spec from the url, use the api to get the contents
Here's a thing
You can have highlights in different files at the same time
Which one do you display?
I suppose we could do all of them
Probably either both or none would be fine
as many as you can fit ideally
Lance already does pick up if you have multiple GitHub links in your message
no non-deprecated show api? 
Not documented yet
is your instance up to date?
either no or I'm using the api wrong
kubernetes/namespaces/default/pinnwand/deployment.yaml line 24
image: ghcr.io/supakeen/pinnwand:v1.5.0-psql```
So... no
supakeen released this Jul 27, 2023
46 commits to master since this release
or the api doesn't use show as I assumed
or both
this one should work if you were at master
https://paste.pythondiscord.com/api/v1/paste/JC5A
We're not at master
I know
Wait
waiting
I just realized that its spelled pinnwand
The entire last several months I have been reading it as pinwad

And yeah, just to sanity check, prod matches the IaC
if you actually wanted a short term working thing you could scrape the web version to get the raw links
the url parsing would be the same between a short term and long term solution
or just support just single file pastes in the short term, since the raw link for the first file can be easily constructed
again the url parsing would be the same as a proper solution
I don't think it's that urgent, and the author is pretty responsive, so if someone PRd some docs then we could probably ask for a release.
We could also probably use master in prod for a bit tbh
live at headβ’οΈ
what could go wrong
who is DownDev in here? 
uhh, their pfp is that turtle from over the hedge I think
@clever wraith ?
yeah
so tl;dr: https://github.com/python-discord/bot/issues/2679 is unblocked at pinnwand head, but not in current release
should be enough to start work though
this api:
https://paste.pythondiscord.com/api/v1/paste/JC5A
should work at head to get paste info
That movie was so bad it was great
Is there a canonical deployment somewhere that will be up to date?
you probably know that better than me π
pinnwandis Python pastebin software that tried to keep it simple but got a little more complex.
relatable
Yeah, i asked Chris about it before and the reason we have it pinned it to avoid breaking changes
We could still pin to the latest commit, so we still wouldn't have to worry too much about breaking changes.
I've opened a PR for pinnwand to add docs for the added API route, so hopefully if that's merged a release can be put out fairly soon
It doesn't necessarily even need to block a bot PR anyway as it's really easy to run a pinnwand instance locally for testing
Some reason when I try to paste multiple files (all .c and .h files) it results in this, I also manually selected C instead of letting it "autodetect".
Can't have a look now but did you
- Try pasting .h files on their own
- Combine .py and .h files?
Not sure of whether it's a file type issue, which I suppose defaults to plain text, or maybe size?
I pasted only .h and .c files from multiple folders, could be that. As for the file sizes:
Checked our logs, it looks like it's this error (caused by below code), so I think it's because the combined sum of file sizes is too large
src/pinnwand/handler/website.py lines 224 to 226
if sum(len(f.fmt) for f in paste.files) > configuration.paste_size:
log.info("CreateAction.post: sum of files was too large")
raise error.ValidationError()```
What's the total size?
I think we cap it at around 512 kb
80 kb total for both the c and h files only.
seems to be 256 * 1024 on the file (in bytes) when I look at it on github.
I think the size limit could be based off the size of the file with syntax highlighting, which could be quite a bit bigger than the raw text
oh
It's configurable IIRC
We control the deployed instance
nice
I double checked the code and it does seem to be based off with syntax highlighting
i'll look into sending a PR to pinnwand to provide better user feedback for that error
We could also have a look through our logs and consider upping the limit if it's something people seem to be hitting frequently and we have plenty of storage space? Not sure if we will though
it would be nice if the error also provided text like:
Error: the provided code was {0} kb in size after syntax highlighting. The current limit is: {1} as a format string for the error.
That way the user would know easier.
I've opened a PR (https://github.com/supakeen/pinnwand/pull/225); Thanks for bringing this up!
It's been 5 months since this bug was introduced, but we only saw it today since it's thef irst time the commadn was ran since the change :P
This looks strange
I wonder if I can repro
Oh wait
Discord's not letting me upload files :3
what's stange?
Nothing
lol ok
ah
So we use unittest and unittest.mock. Why do we use those rather than everything through pytest?
it's just what was chosen ages ago afaik
if we were starting again from scratch we'd probably use pytest
Fair
hey guys, for the dark theme, our timeline page currently looks like this:
is it necessary to adjust the colors of those circles in the middle for dark mode?
that is, for those that aren't using the pydis logo
also, is the current link color that uses the pydis blurple suitable? personally I think it's a bit dark accessibility wise and it looks like a visited link UX wise
(for link hover I'm using the lighter blurple color)
good question. I think we were probably just on a bit of a blurple rampage when we made some of those choices originally @rapid igloo and that accessibility wasn't considered very carefully.
I'd be happy to consider some new choices that also affect colors in our light theme.
alright I'll have a go at experimenting with that π
what was the purpose of notification.css ? I found that it was deleted in the dewikification PR.
it appears to be different from normal warning boxes (such as that on the contributing guide), since the styles selects the message class.
the primary blurple looks alright on light theme, I think. we could perhaps opt for a lighter blurple for dark theme
how's this?
the breadcrumb section shows links in the primary blurple. the other links show the brighter blurple I'm testing with
link hovers with the logo's light blurple is still visible.
if using a brighter blurple for normal links in dark mode made hovers not very visible, hovers could perhaps use a plain white, just like in light theme hovers are black
might've been a dependency of the old wiki framework we used?
I quite like it
hmm did we have any sort of "message" content back then?
from the git history it looks like only gdude has modified it
and the commits suggest it was only used for a login page
I'm considering to reuse these colors for styling warning (etc) boxes for dark theme
oh hang on, seems like we did have messages displayed on the site sometimes, one time was about 100K members
never mind, ignore my questions above
it looks like those colors are not usable at all since they don't even differentiate different level of warning/info/success etc
how's this for a warning box?
forgive me if this is already known/reported, i haven't kept up with this channel recently:
i tried /tag message content intent and the bot is not able to match it with the 1st or 3rd option?
and are those actually 2 different tags?
i tried /tag message content intent and the bot is not able to match it with the 1st or 3rd option?
Is it matching the second ?
And I think the name should be typed with the hyphens/underscores, because it's not fuzzy matching IIRC.
and are those actually 2 different tags?
Those are the same tags, we just give aliases for "easiness of use"
bot/resources/tags/message-content-intent.md?plain=1 lines 1 to 5
---
aliases: ["mcintent", "message_content", "message_content_intent"]
embed:
title: "Discord Message Content Intent"
---```
The file is called message-content-intent (with a hyphen -), but we assign the message_content and message_content_intent (with an underscore _) aliases to it as well
There are sort of 2 separate issues here:
- The slash command doesn't fuzzy match. I don't think the old tag command did either, it's only when you're invoking the tag directly. One argument for the current behaviour is that it lets you search for a tag if the top fuzzy match isn't what you were looking for.
- The tag has aliases that are unnecessary since fuzzy matching will already allow the given names to be used. Aliases should only really be used for things that don't fuzzy match to the name.
Looks good to me π
thank you wookie! it's live on the netlify preview
and while you're here, could you check out whether the sponsors section look okay
I think it looks great. Navigating through the preview things are looking really clean, super impressive!
we don't have fuzzy matching on command invocations, because there's fuzzy matching while you type the command, to make sure you find the right tag before sending it
@hoary haven ^
hey guys! I've recently finished up my implementation of the dark mode feature for our site.
the PR site#1176 is now ready for reviews π
if you have a minute, I would appreciate it you take a look at the preview site try out the switch toggle on the navbar, and see if you notice anything weird or unacceptably unreadable. if you manage to find such a page I would actually be quite impressed.
anyway, reviews are also appreciated!
good bot
Hey!
I have just tested the welcome page really quickly, and I when I switch between dark/light themes, I can see raw html (unstyled) in a blink of an eye.
Not sure if you are aware of that
hmm doesn't happen to me on any of my devices
to be fair I haven't tested multiple browsers though, like a web dev should have. what browser & OS are you on? or could it maybe due to internet connection?
Happens to me on both phone and pc
I'm on an android 13
The browser was chrome
Even on pc it was chrome
And edge
ah on my phone there is a slight flash, but much quicker than yours
I'll see what I can do for it later in the week, thanks
hey @tame pebble, this commit seems to have fixed it. Unfortunately this makes the code slightly uglier since we're relying on the CSS filename given by django-simple-bulma.
do you still encounter the unstyled html flash on your devices? and do you think the tradeoff is worth it for a better UX?
Hey!
Yes, that did fix the flash, I don't have it on any on my devices anymore.
As for the change, and I must say that I'm not a connaisseur when it comes to this, it doesn't look that ugly to me, but as a User it's obviously way better than seeing it flash on change.
So you might want to have feedback from someone who knows how to hande these things better
no worries, thanks for your feedback :)
hey @thorny obsidian
I came across site#494 recently, I really liked your idea and decided to have a go at designing a quick prototype solution for the proposal. This is how it looks like currently as a proof of concept, after having adjusted your design a little. What do you think of it?
If the issue is still relevant could I get assigned (or self-assign) so I could start working on it? Although I'd need a few pointers if possible on how to fill in the content (event descriptions). Thanks!
All yours, feel free to ping me if you have questions about it
hi @crude gyro, you mentioned last time that you would like to review the dark theme PR once I've finished it, so here ya go: https://github.com/python-discord/site/pull/1176
your expertise and insights would be much appreciated, especially on these two points if applicable:
- positioning of the switch is rather obscure on mobile as of now. It requires toggling of the navbar and scrolling to the bottom
- flash of unstyled content observed when changing system theme preference: https://github.com/python-discord/site/pull/1176#pullrequestreview-1834627048
!contrib
Looking to contribute to Open Source Projects for the first time? Want to add a feature or fix a bug on the bots on this server? We have on-going projects that people can contribute to, even if you've never contributed to open source before!
Projects to Contribute to
- Sir Lancebot - our fun, beginner-friendly bot
- Python - our utility & moderation bot
- Site - resources, guides, and more
Where to start
- Read our contribution guide
- Chat with us in #dev-contrib if you're ready to jump in or have any questions
- Open an issue or ask to be assigned to an issue to work on
do we have any generic branding for code jams, like independent of specific years?
https://deploy-preview-1210--pydis-static.netlify.app/events/
The items in the events gallery feel more engaging when some logo or banner is included.
We're a large, friendly community focused around the Python programming language. Our community is open to those who wish to learn the language, as well as those looking to help others.
two snekbox prs for review snekbox#199 and snekbox#198
I'm not entirely sure, people who watch #dev-branding might be able to help
afaik we don't have any generic code jam branding and make something new each year
mm yeah it turns out to be the case (kat responded in dms)
I'll see if I can make something generic looking as a banner using the recent ones
This there any open source for beginners
!contribute
The Sir Lancebot project would be a good open source project for beginners I would say
Looking to contribute to Open Source Projects for the first time? Want to add a feature or fix a bug on the bots on this server? We have on-going projects that people can contribute to, even if you've never contributed to open source before!
Projects to Contribute to
- Sir Lancebot - our fun, beginner-friendly bot
- Python - our utility & moderation bot
- Site - resources, guides, and more
Where to start
- Read our contribution guide
- Chat with us in #dev-contrib if you're ready to jump in or have any questions
- Open an issue or ask to be assigned to an issue to work on
@woven lynx
@trim cradle you have committed the ultimate sin of not testing before pushing 
either way, PR looking good at a glance
Hi hedy. I am reviewing this today, sorry it took so long.
no worries for this one. and thanks!
alright @rapid igloo, left a big fat review. https://github.com/python-discord/site/pull/1176#pullrequestreview-1847096485
looks like the spammer flag doesn't do what a straightforward reading of the docs would indicate, so I'm just going to withdraw the PR anyway
from your suggestions:
updated nav+hero background, discord button, button background, html background
from my own observations:
updated waves colors, slightly dimmed codejam banner color, navbar hovers
html background used is a teeeeny bit lighter than suggested
I hope it's easier on the eyes now compared to the current site preview
I won't be fixing the brightness of the welcome video thumbnail because it uses an iframe and I didn't find a way to inherit data-theme there
yeah don't fix that that'd be insane
XD
using bulma without using SCSS is not a good experience
but I'm glad that with BULMA_SETTINGS it works right now
I hope Bulma v1 makes it better
alright, changes are live on preview
https://deploy-preview-1176--pydis-static.netlify.app/
We're a large, friendly community focused around the Python programming language. Our community is open to those who wish to learn the language, as well as those looking to help others.
timeline icon outlines are fixed as well
hopefully nothing unrelated is affected
my initial take is that this is a lot better.
but I'm on mobile
how hard is it to swap the sponsor icons?
like.. the code
not the assets
maybe I can get us some help for creating the assets
or help out personally
hmm, the sponsor images are added through the html tag. so when switching to dark mode we'll need to use css to change the image src
there are some solutions here
https://stackoverflow.com/questions/2182716/is-it-possible-to-set-a-src-attribute-of-an-img-tag-in-css
so it doesn't seem too hard
@obsidian patio you happen to be around today?
eh, I'll just roll up my sleeves and help out, @rapid igloo . if you start figuring out the code I'll start making a set of dark theme friendly sponsor icons
so we could have a directory pydis_site/static/images/sponsors_dark for a set of logos suitable for use on a dark background
note that we already have pydis_site/static/images/sponsors/netcup-white.svg for netcup
are we just fixing the homepage? or the resources logos and code jam sponsors as well?
alright
just gonna make an archive for you, I don't have the website cloned atm
yup that's fine
for the code, I'm not sure how we could implement it for resources though.
the only way I thought of is to add another key in the yaml to specify another logo for dark mode
yeah that's the way that I was thinking too
okay I think that's doable
here are all the images in question:
- https://github.com/python-discord/site/tree/main/pydis_site/static/images/sponsors
- https://github.com/python-discord/site/tree/78668be2dcc902ee52e85693c56977b0cc925fe4/pydis_site/static/images/resources
- https://github.com/python-discord/site/tree/main/pydis_site/static/images/events (only replit and DO is relevant it seems. tabnine's logo is fine on both light & dark backgrounds)
here you can see whether there are any other logos that need a dark version:
my code part is now complete
here are the sponsor logos
gonna look at the resources now
that resources folder is missing stuff like.. Corey Schafer
maybe it's a URL?
I'll just download all of those
and fix'em
looks great
I gotta fix some of the light mode logos for the resources too, they look like shit
like the kivy one wtf
it's low res as fuck
that's on me
here's all the events and resources dark modes, plus I've fixed a few of the light mode ones to be high res
@rapid igloo
also replaced replit's logo with their new logo
they recently changed it
hey @crude gyro it looks like there's one more for events sponsors:
https://static.djangoproject.com/img/logos/django-logo-positive.png
we were using URL for that one
a dark mode version of django would also be useful when we fix the baseline & CSS filter issue for the footer
I'll grab it real quick
weird, I can't open it
says "not a png file" when I try. but I'll find a way around it
then we will keep it simple
we are going to merge this PR today
it will be a very excellent day in pydis history
should almost put a new item on the timeline
moment of appreciation to whoever added the yaml pre-commit check
your review pretty much just took the pr to another level, @crude gyro
I'll wait for the preview deployment to finish and check over the pages one last time
I can still see improvements, but I believe I didn't make any careless mistakes in the lastest commit π
maybe we should include some new docs in the contributing site page after having the dark theme. it'll document the new classes people could use when writing content pages with images to support dark mode
the Filter Resources block isn't the dark theme color
everything else looks good to my eyes
this sounds wise and kinda necessary
I wonder if changing the primary variable (from settings) to the darker color would break anything...
my gut told me it's the right way to go. I've pushed the fix
hmm, I don't think it's showing up in https://deploy-preview-1176--pydis-static.netlify.app/resources/ yet
We're a large, friendly community focused around the Python programming language. Our community is open to those who wish to learn the language, as well as those looking to help others.
uhh it's there for me
or were you expecting the new color to match the navbar?
maybe clear the cache?
(or disable cache in devtools)
right yeah it looks good now after hard refresh
okay I guess we're maybe ready to merge?
or what do you think
I think... for an initial implementation it should be ready. I've taken notes on potential improvements and minor inconsistencies
merging
congrats, hedy, and thank you so much for your work on this
it was fun!!
it's aliveee 
thanks goes to @crude gyro @spare plaza @last patio @timid sentinel π
congrats! it looks amazing! really really good job
I've opened site#1215
awesome stuff guys! 
approved, looks good!
so this documents those classes, but did you ever document how one might change the colors for the dark mode? Is it all just BULMA_SETTINGS changes or are there lots of small changes that have to be made around everywhere?
just in case someone in the future want to modify the dark mode colors, I mean
(or the light mode ones)
well, for light mode there are many places with hardcoded colors in the CSS as well. from memory I think mostly homepage and timeline (gosh that one might need a serious refactor)
so I think what might be worth adding for the development side would be advice on
- adding bulma classes (
has-background-*) where applicable - (in general) when changing colors in settings.py they should do a project-wise grep on the color value, to modify those as well. (this was inevitable sometimes, as ugly as it is, I've described the reason in "Limitations" in the dark theme PR)
- something about how to add dark mode logos in the resources page
but where could this content belong?
