#dev-contrib

1 messages Β· Page 20 of 1

atomic ivy
#

This also falls under the above-mentioned rule 6. Please read the #rules.

formal socket
#

so how do i approve next time?

atomic ivy
formal socket
vale ibex
#

@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
]

outer oasis
#

I was just about to test

outer oasis
vale ibex
#

untested and written in discord chat box btw

#

so try it before committing :P

outer oasis
sharp crag
ripe wave
#

hello, can I talk to a mod or and admin? if there is please contact me

still comet
ripe wave
velvet helm
#

@clever wraith whats your website?

hoary haven
#

nvm it is claimed

mellow hare
#

dibs

mellow hare
#

Is it bad form to add something to the .gitignore file solely because I use something that isn't listed?

vale ibex
#

If you think other people would have similar need for it, sure. If not you could add it to your global ignore

mellow hare
#

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

vale ibex
#

Ah right, feel free to add it if you wanted

#

Add it to gitignore that is, not the repo

mellow hare
#

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

vale ibex
#

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

mellow hare
#

Pretty much any of my projects would have it

#

And it's not hard to set up

vale ibex
#

Basically saying do whatever makes it easier for you, it won't really matter to us

mellow hare
#

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?

vale ibex
#

Probably not, we might have JSON in the repo for something

mellow hare
#

Roger

#

And now to figure out buttons

#

Whee

clever wraith
mellow hare
#

Fair enough. I can if we want

vale ibex
#

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

velvet helm
#

whats so important about yaml?

#

why do we need it

vocal prairie
#

yaml the format in general?

#

or how it's used in some specific pydis project?

sharp crag
mellow hare
#

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)

thorny obsidian
mellow hare
#

Oooooooooooooooooooooooooooo

#

Thanks, kat!

dusk sinew
#

@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.

dim pelican
#

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

vale ibex
tawdry vapor
eager pulsar
#

hello

tribal agate
#

hii

unique minnow
#

can i get permission for talking

austere hornet
#

!voice

stable mountainBOT
#
Voice verification

Can’t talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.

austere hornet
tawdry vapor
#

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.

vale ibex
#

Probably not. It was a nice idea, but probably better to wait for RC builds.

grim prairie
still comet
#

#changelog message
It seems like OP might have accidentally created a new post instead of editing the original one

vivid wren
#

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!!

clever wraith
#

!contribute

Here's an overview

stable mountainBOT
#
Contribute to Python Discord's open source projects

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

  1. Read our contribution guide
  2. Chat with us in #dev-contrib if you're ready to jump in or have any questions
  3. Open an issue or ask to be assigned to an issue to work on
clever wraith
#

Is there somebody here thats wants to help me with a big project? Send PM!

mild arch
clever wraith
#

ohh

#

whats the right channel?

bleak temple
#

Does the Python bot not work with the warnings module?

#bot-commands message

clever wraith
#

That's not related to the warnings module

#

It's a usage problem

bleak temple
clever wraith
#

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

bleak temple
thorny obsidian
#

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!

thorny obsidian
# still comet 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)

GitHub

Our event bot, for managing community events. Contribute to python-discord/sir-robin development by creating an account on GitHub.

still comet
#

Regarding sir-robin#98, I'm pretty sure we were going to port the help command to bot-core

dusky shoreBOT
still comet
#

(bot-core#85)

dusky shoreBOT
thorny obsidian
#

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

still comet
#

I think I'll try something else, since I haven't used HelpCommand before

#

I'll have a go at sir-robin#97 then

thorny obsidian
#

@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

still comet
#

Alright, I'll keep it in mind

#

thanks

bleak temple
dusky shoreBOT
thorny obsidian
#

@bleak temple I can review later tonight, thanks for the PR!

bleak temple
clever wraith
#

It got forgotten at some point and didn't get enough traction

#

I'll get to it this weekend

median ferry
#

is the site not mobile friendly or is it just some pages?

vale ibex
#

Looks fine on my phone

median ferry
#

i mean the contributing in next line

#

and sub-articles being next to it looks kinda off

static canyon
#

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

dusky shoreBOT
teal smelt
#

i need help with my code for my doscprd bot

sharp crag
green oriole
#

Just in case

#

The changes announced by Discord about signed attachment urls will break the attachment log channel

#

... if that's still a thing

celest charm
#

iirc it is a thing

#

The uh... The ducky channel

static canyon
#

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

green oriole
#

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

static canyon
#

I figured it was purely Discord

celest charm
#

do you mean the attachments that are included in e.g. purgebans? yeah that's outside of discord

celest charm
static canyon
#

I wonder if you could just copy-paste them into Discord to view it though πŸ€”

celest charm
#

you can still "resurrect" them by posting them on discord, right?

static canyon
celest charm
#

to be fair, I'm not sure when this would be useful days after the incident

static canyon
#

Yeah, true

celest charm
#

Discord straight up ignores reports of anything that's deleted 🀷

green oriole
#

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

still comet
#

@sharp crag Could you re-review sir-robin#101? Turns out using a hybrid group can work just fine

dusky shoreBOT
wild torrent
#

is there a place where i can find issues that I can contribute to?

stable mountainBOT
#
Contribute to Python Discord's open source projects

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

  1. Read our contribution guide
  2. Chat with us in #dev-contrib if you're ready to jump in or have any questions
  3. Open an issue or ask to be assigned to an issue to work on
static canyon
#

Just find an open issue on one of those 3 repos that's approved & unassigned

wild torrent
#

thanks

wild torrent
wild torrent
#

ah

#

ok

static canyon
#

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

wild torrent
#

ty

clever crane
#

!contributing

stable mountainBOT
#
Contribute to Python Discord's open source projects

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

  1. Read our contribution guide
  2. Chat with us in #dev-contrib if you're ready to jump in or have any questions
  3. Open an issue or ask to be assigned to an issue to work on
clever wraith
#

bot#2726 review when

willow kettle
#

.

#

.

#

.

#

hiiiiiiiiiii

#

somehting

clever wraith
#

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.

cerulean light
bleak temple
#

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

static canyon
#

It can still be reported if abused though

bleak temple
clever wraith
bleak temple
hoary haven
#

and sending the message about moderators being alerted

clever wraith
#

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.

vale ibex
#

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

clever wraith
hoary haven
#

ah i see

willow kettle
#

an old player

thorny obsidian
#

@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

still comet
still comet
thorny obsidian
#

@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~)

mental solstice
#

Anyone need help with their project? im very bored and I havent worked on a project in a while.

vocal prairie
#

Our projects are always open for contribution

#

!contribute

stable mountainBOT
#
Contribute to Python Discord's open source projects

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

  1. Read our contribution guide
  2. Chat with us in #dev-contrib if you're ready to jump in or have any questions
  3. Open an issue or ask to be assigned to an issue to work on
thorny obsidian
sharp crag
thorny obsidian
#

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

thorny obsidian
#

@vale ibex pleading 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

vale ibex
thorny obsidian
#

Listen, I'm not responsible from where Sir Lancebot got it >_>

vale ibex
#

pr denied

#

you are both responsible for your new code, and all historic code you copied from

#

good luck

thorny obsidian
vale ibex
#

hello, kat

#

please run poetry run task precommit

thorny obsidian
#

I do need to figure out how to get poetry working on this machine again...

#

:3c

vale ibex
#

lol

thorny obsidian
#

my current strat of letting CI yell at me has worked so far

vale ibex
#

windows?

thorny obsidian
#

mhm

vale ibex
#

(Invoke-WebRequest -Uri https://install.python-poetry.org -UseBasicParsing).Content | py - there you go

#

no charge this time

thorny obsidian
# vale ibex 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

vale ibex
#

ah yea alright

#

lemme know if you need a ducky

thorny obsidian
vale ibex
#

alright cool, will give it a review tomorrow

thorny obsidian
vale ibex
#

Do we need both decos?

thorny obsidian
#

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

vale ibex
#

Wouldn't the second one also lock it to admins?

#

since it's an override

thorny obsidian
#

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.

vale ibex
#

ah right, so it's an override of the channel whitelist check?

thorny obsidian
#

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

vale ibex
#

I've already got a branch for doing that

#

basically updating the error handler to handle a bunch more errors

thorny obsidian
#

on Sir Robin?

vale ibex
#

ye

thorny obsidian
#

is it pushed?

vale ibex
#

no

thorny obsidian
#

:(

vale ibex
#

just need to finish it a bit, can push it in 10-20 mins

thorny obsidian
#

okie dokes

#

How much is it going to conflict with my shuffling of the files?

vale ibex
#

it's based on your branch

thorny obsidian
#

okay perf

vale ibex
#

Actually, why are we using a custom with_role deco?

#

rather than commands.has_any_role

thorny obsidian
#

I was going to adjust the with_role deco to support a silent failure if you don't have the perms

vale ibex
#

ah right

thorny obsidian
#

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

vale ibex
#

If you could give my PR another look over, I can merge both down

thorny obsidian
#

Small, but error_handler.py line 136. "This command can not be ran in DMs@"

#

otherwise looks good

vale ibex
#

meant to be shift+1, hit shift+2

thorny obsidian
#

@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

sharp crag
thorny obsidian
vale ibex
#

could you just name the two groups the same and as far as users are concerned they're the same?

thorny obsidian
#

LOL sorry Chris, I didn't realize you deleted my branch as I went to pull updates and accidentally pushed

vale ibex
#

lol

#

it auto deleted when I merged I think

sharp crag
thorny obsidian
#

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

sharp crag
#

Will keep in mind, thanks

#

Actually looks pretty simple (i hope). I'll just resolve them

thorny obsidian
sharp crag
naive heron
#

how do i become a dev

sharp crag
#

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

sharp crag
#

!res if the latter, check out the below linked resources to help you get started with Python

stable mountainBOT
#
Resources

The Resources page on our website contains a list of hand-selected learning resources that we regularly recommend to both beginners and experts.

thorny obsidian
#

@vocal wolf are you up?

vocal wolf
#

ye

thorny obsidian
#

Emergency AoC lb fix

#

Bot is up in my testing server if you need to verify

vocal wolf
#

approved

thorny obsidian
#

Issue is a pydantic setting getting default valued to None

vocal wolf
#

do we need two approvals for this to be merged?

#

I believe so

vocal wolf
thorny obsidian
#

Hey @tawdry vapor you like AoC right? :)

atomic ivy
vocal wolf
#

Thank you Mark, very cool

thorny obsidian
#

πŸ™ my saviors

trim fable
#

*\me trying to figure out how to approve a merged pull request* thanks for handling that for me πŸ˜…

tawdry vapor
trim fable
#

Ah yes. Mhm. Let me grab my drink verification can then I can talk to Cortanaℒ️

eternal raven
#

Hi, I have a blocker in my project, to integrate AI, help me, really urgent.

vale ibex
#

This channel is for discussing Python Discord projects specifically

vocal wolf
#

Hello. Checking up since it's been a while, do you think it's possible for this PR to be completed?

sir-lancebot#1197

dusky shoreBOT
stable mountainBOT
#
Bad argument

5 is not a valid duration string.

tame pebble
stable mountainBOT
#
Bad argument

'5 is not a valid duration string.

tame pebble
#

What now

vocal wolf
#

I think you wanna do !remind 5d review

tame pebble
#

I thought we had converters for humanized dates

vocal wolf
#

maybe it's dead

#

!source remind

stable mountainBOT
#
Command: remind

Commands for managing your reminders.

Source Code
stable mountainBOT
#
I got you.

Your reminder will arrive on <t:1701902666:F>!

vocal wolf
#

well according to the documentation, what you wrote should work

tame pebble
#

Yeah, it works in infractions etc

#

Weird

vocal wolf
#

!remind "5 days" asdffdsaadfsafsdadfs

stable mountainBOT
#
Sure thing!

Your reminder will arrive on <t:1701902730:F>!

vocal wolf
#

oh

#

it's double quotes?

#

!remind '5 days' sfdalhjksfadhjlkasdfhljk

stable mountainBOT
#
Bad argument

'5 is not a valid duration string.

tame pebble
#

Is it the single quotes?

#

Yeah

vocal wolf
#

yeah it's double quotes

#

wack

#

anyway, good to hear you're alive

tame pebble
#

Thanks Xith, i will do my duties

#

Sorry it took a while, i had completely gone dormant

vocal wolf
#

no problem

#

it is all good

outer oasis
#

Hello hello! Could use a review on sir-lancebot#1403 sir-lancebot#1404

static canyon
thorny obsidian
full fractal
#

Hi, is there an issue to update the UnambiguousUser converter failure message yet? It still mentions the old username#discriminator format #cybersecurity message

subtle kraken
tame pebble
subtle kraken
tame pebble
#

Ah yes I'm actually using what you're saying to say that we should have both

full fractal
#

huh TIL

still comet
#

Can I get some thoughts on sir-robin#107?

grim prairie
#

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?

median ferry
#

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?

stable mountainBOT
#
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. 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
vocal wolf
#

@trim cradle fix. Thanks

bot#2817

dusky shoreBOT
trim cradle
vocal wolf
#

few words do trick

trim cradle
#

!raw 1180906240944119878

trim cradle
# vocal wolf few words do trick

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.
tame pebble
#

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

vocal wolf
#

Bet

tame pebble
#

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

stable mountainBOT
tame pebble
vale ibex
#

@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

vocal wolf
tame pebble
#

Thanks!

#

I just didn't want to go in a direction that we wouldn't agree with, so I thought I'd ask

vocal wolf
#

yuh

static canyon
#

Can a core-dev please merge bot#2838 (it has required approval)

dusky shoreBOT
tame pebble
#

Done

static canyon
#

Thanks πŸ™Œ

thorny obsidian
#

@vale ibex you force pushing to a branch I already have locally to review is paaaaain spray

#

also it can be merged whenever you're around. Avoiding merging rn because AoC is very active rn

median ferry
#

could someone review the PR# 1405 πŸ‘€

#

on sir lancebot

tame pebble
vale ibex
#

just get gud at git

tawdry vapor
#

This is a human rights violation

vale ibex
#

Its it my human right to force push git branches

tawdry vapor
vale ibex
#
[alias]
  fp = "!git fetch --all && git reset origin/\"$(git rev-parse --abbrev-ref HEAD)\" --hard"
#

easy

#

just git fp

tame pebble
#

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

vale ibex
#

We are being ratelimmited, but that error wasn't being sent back to github, github was just getting a 500

last patio
vale ibex
#

Yea, those octopussed local stashes are great

#

though I never usually use stiffen-shell

last patio
vale ibex
#

true

trim cradle
#

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."?

outer oasis
#

I believe it's ephemeral now

vale ibex
#

ephemeral messages can only be used for resposnes to interactions

vale ibex
#

it was part of the filter rewrite

outer oasis
trim cradle
vale ibex
#

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

dawn comet
#

can i get a website template code?

last patio
compact ruin
#

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

static canyon
#

This channel is for assistance with our own projects, not external ones

#

@compact ruin

rapid igloo
#

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 lemon_pensive

GitHub

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...

median ferry
rapid igloo
#

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

tame pebble
#

The version is defined in the compose file, it's 15

rapid igloo
#

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"

tame pebble
#

The thing is, the problem could be in your driver, eg psycopg

tame pebble
#

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

rapid igloo
#

alright πŸ‘

rapid swallow
rapid igloo
#

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!

crude gyro
#

can do

rapid igloo
#

!remind 1w recheck the dark theme issue on gh

stable mountainBOT
#
Affirmative!

Your reminder will arrive on <t:1703236482:F>!

crude gyro
rapid igloo
#

!rule 6

stable mountainBOT
#

6. Do not post unapproved advertising.

last patio
#

i wonder when people will read the channel description before spamming their project

tame pebble
#

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 pithink

vale ibex
tame pebble
#

Yep

vale ibex
#

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?

tame pebble
#

Oh wait

tame pebble
vale ibex
#

ah

tame pebble
vale ibex
#

well, rebasing onto main won't help anyway, since I just realised that the PR isn't merged

tame pebble
#

I got confused because

vale ibex
#

1 sec

tame pebble
#

In github, the latest version is marked as 10.5.0

#

which is the version I have installed

vale ibex
#

I didn't make a github release I guess

tame pebble
#

whereas your PR to not read content is the 10.5.1

vale ibex
#

10.5.1 is latest

tame pebble
#

Indeed

#

However

#

Here's the version of the request method

#

Which is the correct one

vale ibex
#

bot#2853 cherry-picked the bump commit

dusky shoreBOT
tame pebble
#

What I don't understand is, why is ClientResponseError saying it's a 400

#

Ugh, too many questions

tame pebble
vale ibex
#

I think if there's no-content to return, it should return None

tame pebble
#

Yes I remember, but the version I have installed is indeed the latest

vale ibex
#

and does that return an empty string?

tame pebble
#

It doesn't even hit the return None line when stepping over, it as soon as I step over to send the request

vale ibex
#

I'm talking about site

#

it looks like this forcepush changed it to not return an empty string

tame pebble
#

I didn't verify

vale ibex
#

have you updated your site container after that?

tame pebble
#

Tbh, i don't recall which version of site I have atm

vale ibex
#

probably easiest to pull the latest commit from that branch, rebuild, and try again

tame pebble
#

I'll try doing that later, i need to leave now unfortunately

#

Thanks Chris!

vale ibex
#

πŸ‘

#

np

tame pebble
#

Well

#

That's our client

#

Not aiohttp's

#

So i guess that's why

#

πŸ˜…

vale ibex
#

Yea, it's an aiohttp internal thing

radiant flower
#

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

rapid igloo
#

lemon_thinking looks like they left

mellow hare
#

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

vale ibex
mellow hare
#

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

vale ibex
#

Such is life

#

You could assign each member a rating out of 10 and store that

mellow hare
#

"Looks like a douche, they get a 2"

vale ibex
#

Me when I join vc

mellow hare
#

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

vale ibex
#

What is the current system?

mellow hare
#

Schedule the message for deletion after a set period of time

vale ibex
#

We have our own thing for that?

mellow hare
#

Yarp

vale ibex
#

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

mellow hare
#

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

vale ibex
#

Ahh right, thought it was done global util we had

mellow hare
#

No no

#

Only global part is for the scheduler itself

vale ibex
#

Yea, that seems like something we can delete

mellow hare
#

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

drowsy ravine
#

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.

outer oasis
outer oasis
#

@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

tame pebble
#

Ahahaha

mellow hare
#

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

drowsy ravine
# mellow hare What's the main incentive to do this? Have we had people having issues with thr...

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. πŸ’­

mellow hare
#

I was going to have a pop-up for new users who join the voice chat but that ended up being a no-go

tame pebble
# drowsy ravine It was a long standing thing when the thread limits were still an issue, and may...

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.

drowsy ravine
#

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 🐼

mellow hare
#

@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

GitHub

Summary
Users have been having some issues knowing exactly what to do when trying to verify for voice permissions. I've gone ahead and converted the command (which people never quite seemed to...

tame pebble
dim pelican
tame pebble
#

Wtf is going on ahahahaha

mellow hare
#

Yeah I was wondering about that

sharp crag
#

I think they really want you to do it on your side

mellow hare
#

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

tame pebble
mellow hare
#

@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

tame pebble
# mellow hare Most of the other methods covered tracking and pinging folks who hadn't been in ...

I don't have my laptop but I remember having the idea of

  1. Having a method that checks the role and send the according message (returns a bool to indicate whether we should move forwards)
  2. A method to fetch the data, and send error messages indicating errors if any, this returns data or none ( exit upon none)
  3. A method that runs the checks on the previous data ( given as arg) and sends the appropriate message if any
  4. Assign role and inform
#

Something like this

#

It summarizes the big callback into 4 parts.

  1. Does the user have the role?
  2. If not, get data
  3. If we have data, can they get the role?
  4. If yes, assign, else exit
mellow hare
#

Roger that. I'll take a look again

stable mountainBOT
mellow hare
#
  1. 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

tame pebble
full fractal
#

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

full fractal
#

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.

full fractal
#

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?

tame pebble
# full fractal 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.

full fractal
#

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

vale ibex
#

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

full fractal
#

I'm using docker compose restart bot for now

vale ibex
#

Ah cool, yea that's the way to do it

tame pebble
#

Yeah with volumes it'll be possible, but i don't remeber us using volumes for that

#

Well

full fractal
#

anyway, the paste service is being a pain

vale ibex
full fractal
stable mountainBOT
#

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"))```
vale ibex
#

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?

full fractal
#

hmm, I suspect the version of pydis_core being used doesn't have this method

vale ibex
#

You might need to rebuild your image then

#

Or rebase into main and then rebuild

full fractal
#

the stop method doesn't seem to exist

vale ibex
#

Did you stop the bot and run docker build?

#

Docker compose build even

full fractal
#

I will in one second

#

I need to fix some merge conflicts trying to merge in main

vale ibex
#

Yea alright, you'll need to rebuild the docker image whenever dependencies or the dockerfile changes

full fractal
#

side-tangent, but it's only slightly annoying to work on this project using Python 3.8 :P

vale ibex
#

Well...yea

#

πŸ˜…

full fractal
#

well, the ban command is broken, but it seems like bot#2316 should be good to go now once I push.

full fractal
#

PTAL bongocatflower

full fractal
mellow hare
#

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?

tame pebble
#

I'd like an opinion on bot-core#198

And this should be easy to review bot-core#199

mellow hare
tough imp
#

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

tough imp
#

Fantastic, thanks πŸ‘

tame pebble
#

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

tough imp
#

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

tame pebble
#

I just prefer using librairies that are maintained instead of deserted ones.
As for the functionalities, they both deliver

tough imp
mellow hare
dusky shoreBOT
tame pebble
#

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

mellow hare
#

Most of these would just swap from context to interaction right?

#

Or are there more layers than that even?

tame pebble
#

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

mellow hare
#

Gotcha

mellow hare
#

@vale ibex We squash and merge, right?

vale ibex
#

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

timid sentinel
#

your commits are good so I'd merge commit personally

#

if you're talking about

#

bot#2856

dusky shoreBOT
tame pebble
vale ibex
#

CI tests that the eval-deps can be installed on the container, so it's pretty low-risk

rapid igloo
#

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)

timid sentinel
#

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?

rapid igloo
#

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?

atomic ivy
#

that looks good

timid sentinel
#

yeah that looks nice

rapid igloo
#

we are allowed to have all the logos the same size right? no restrictions on the sizes for specific companies that is

timid sentinel
#

Yeah I think that should be fine

rapid igloo
#

okies! I'll give it a try for the grid then

timid sentinel
vale ibex
#

or is that 3 different shades of grey for bg colour?

timid sentinel
vale ibex
#

ah yea, i see what you mean about lightmode now

#

it looks good on lightmode, but weird on darkmode with the current colour choice

rapid igloo
#

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

rapid igloo
#

TIL css requires math

#

fingers crossed none of the logos are squashed... off to bed for now lemon_sleepy

shrewd basalt
#

what's the 1 for actually?

#

file 1?

outer oasis
outer oasis
#

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

shrewd basalt
#

apparently it's really two pastes under one name

outer oasis
#

That will be a giant pain

shrewd basalt
#

the 2nd raw points to a different paste

timid sentinel
outer oasis
#

Oh I didn't know there was already work on it

outer oasis
shrewd basalt
#

does this thing not have a nice structured api?

#

if so using that should make things pretty easy

shrewd basalt
#

parse the line spec from the url, use the api to get the contents

outer oasis
#

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

timid sentinel
#

Probably either both or none would be fine

shrewd basalt
#

as many as you can fit ideally

outer oasis
#

Lance already does pick up if you have multiple GitHub links in your message

shrewd basalt
shrewd basalt
#

either no or I'm using the api wrong

stable mountainBOT
#

kubernetes/namespaces/default/pinnwand/deployment.yaml line 24

image: ghcr.io/supakeen/pinnwand:v1.5.0-psql```
outer oasis
#

So... no

#

supakeen released this Jul 27, 2023
46 commits to master since this release

shrewd basalt
#

or the api doesn't use show as I assumed

#

or both

outer oasis
#

We're not at master

shrewd basalt
#

I know

outer oasis
#

Wait

shrewd basalt
#

waiting

outer oasis
#

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

shrewd basalt
#

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

timid sentinel
#

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

shrewd basalt
#

live at headℒ️

timid sentinel
#

what could go wrong

shrewd basalt
#

who is DownDev in here? pithink

timid sentinel
#

uhh, their pfp is that turtle from over the hedge I think

shrewd basalt
#

@clever wraith ?

timid sentinel
#

yeah

shrewd basalt
outer oasis
outer oasis
shrewd basalt
#

you probably know that better than me πŸ˜…

#

pinnwand is Python pastebin software that tried to keep it simple but got a little more complex.

#

relatable

tame pebble
timid sentinel
#

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

hearty crane
#

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".

tame pebble
#

Not sure of whether it's a file type issue, which I suppose defaults to plain text, or maybe size?

hearty crane
timid sentinel
stable mountainBOT
#

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()```
tame pebble
#

I think we cap it at around 512 kb

hearty crane
hearty crane
timid sentinel
#

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

hearty crane
tame pebble
#

We control the deployed instance

hearty crane
#

nice

tame pebble
#

Test wookie's theory by limiting the number of files to 2

#

One c and one h

timid sentinel
#

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

hearty crane
#

That way the user would know easier.

timid sentinel
mellow hare
#

Do we have a contrib guide for writing tests?

#

Yes

#

Yes we do

#

Ignore the Hemlock

vale ibex
#

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

tame pebble
#

This looks strange

#

I wonder if I can repro

#

Oh wait

#

Discord's not letting me upload files :3

vale ibex
tame pebble
#

Nothing

vale ibex
#

lol ok

tame pebble
#

It's my understanding that was wrong

#

ahahhaha

vale ibex
#

ah

mellow hare
#

So we use unittest and unittest.mock. Why do we use those rather than everything through pytest?

timid sentinel
#

it's just what was chosen ages ago afaik

#

if we were starting again from scratch we'd probably use pytest

mellow hare
#

Fair

rapid igloo
#

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)

crude gyro
#

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.

rapid igloo
#

alright I'll have a go at experimenting with that πŸ‘

rapid igloo
#

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.

rapid igloo
#

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

crude gyro
crude gyro
rapid igloo
#

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

rapid igloo
rapid igloo
#

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?

hoary haven
#

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?

tame pebble
stable mountainBOT
#

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"
---```
tame pebble
#

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

timid sentinel
#

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.
timid sentinel
rapid igloo
#

thank you wookie! it's live on the netlify preview

rapid igloo
timid sentinel
vale ibex
#

@hoary haven ^

rapid igloo
#

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!

dusky shoreBOT
rapid igloo
#

good bot

tame pebble
rapid igloo
#

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?

tame pebble
#

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

rapid igloo
#

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

tame pebble
#

Sure thing!

#

Great work btw

rapid igloo
#

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?

tame pebble
#

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

rapid igloo
#

no worries, thanks for your feedback :)

rapid igloo
#

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!

dusky shoreBOT
thorny obsidian
rapid igloo
#

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:

  1. positioning of the switch is rather obscure on mobile as of now. It requires toggling of the navbar and scrolling to the bottom
  2. flash of unstyled content observed when changing system theme preference: https://github.com/python-discord/site/pull/1176#pullrequestreview-1834627048
solemn vine
#

!contrib

stable mountainBOT
#
Contribute to Python Discord's open source projects

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

  1. Read our contribution guide
  2. Chat with us in #dev-contrib if you're ready to jump in or have any questions
  3. Open an issue or ask to be assigned to an issue to work on
rapid igloo
# thorny obsidian All yours, feel free to ping me if you have questions about it

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.

vale ibex
#

two snekbox prs for review snekbox#199 and snekbox#198

dusky shoreBOT
vale ibex
timid sentinel
#

afaik we don't have any generic code jam branding and make something new each year

rapid igloo
#

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

woven lynx
#

This there any open source for beginners

austere hornet
#

!contribute

The Sir Lancebot project would be a good open source project for beginners I would say

stable mountainBOT
#
Contribute to Python Discord's open source projects

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

  1. Read our contribution guide
  2. Chat with us in #dev-contrib if you're ready to jump in or have any questions
  3. Open an issue or ask to be assigned to an issue to work on
austere hornet
#

@woven lynx

vocal wolf
#

@trim cradle you have committed the ultimate sin of not testing before pushing hyperlemon

either way, PR looking good at a glance

crude gyro
rapid igloo
#

no worries for this one. and thanks!

crude gyro
trim cradle
rapid igloo
#

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

crude gyro
#

yeah don't fix that that'd be insane

rapid igloo
#

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

#

timeline icon outlines are fixed as well

#

hopefully nothing unrelated is affected

crude gyro
#

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

rapid igloo
# crude gyro like.. the code

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

crude gyro
#

@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

rapid igloo
#

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?

crude gyro
#

I think it'll be fairly quick to just do them all

#

from an asset pov at least

rapid igloo
#

alright

crude gyro
#

just gonna make an archive for you, I don't have the website cloned atm

rapid igloo
#

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

crude gyro
#

yeah that's the way that I was thinking too

rapid igloo
#

okay I think that's doable

crude gyro
#

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

rapid igloo
#

yes some of them are URLs

#

looks pretty good πŸ‘

crude gyro
#

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

rapid igloo
#

lemon_eyes that's on me

crude gyro
#

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

rapid igloo
#

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

crude gyro
#

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

rapid igloo
#

if needed

crude gyro
#

yeah I'll just use the svg

#

you want it as png though?

rapid igloo
#

I don't think it matters

#

up to you for this one

crude gyro
#

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

rapid igloo
#

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

crude gyro
#

happy I could help

#

I agree it's really starting to come together

rapid igloo
#

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

crude gyro
#

everything else looks good to my eyes

crude gyro
rapid igloo
#

my gut told me it's the right way to go. I've pushed the fix

crude gyro
rapid igloo
#

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)

crude gyro
#

right yeah it looks good now after hard refresh

#

okay I guess we're maybe ready to merge?

#

or what do you think

rapid igloo
#

I think... for an initial implementation it should be ready. I've taken notes on potential improvements and minor inconsistencies

crude gyro
#

merging

rapid igloo
#

(at least it didnt touch the backend. nothing should blow up)

crude gyro
#

congrats, hedy, and thank you so much for your work on this

rapid igloo
#

it was fun!!

#

it's aliveee lemon_surprised

#

thanks goes to @crude gyro @spare plaza @last patio @timid sentinel πŸŽ‰

spare plaza
#

congrats! it looks amazing! really really good job

rapid igloo
#

same goes to you :)

#

well, now I can delete my fork

rapid igloo
hoary haven
#

awesome stuff guys! SunglassesFluent

crude gyro
#

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)

rapid igloo
#

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?

crude gyro
#

might be like.. just a big docstring above the BULMA_SETTINGS maybe. you'd have to suspect people would at least end up going there sooner or later if they intended to change colors, right?

#

a sort of HOLD UP, IT'S NOT THAT SIMPLE