#dev-contrib
1 messages · Page 27 of 1
!int e ```py
import aiohttp
import os
async with aiohttp.ClientSession() as session:
async with session.get("https://api.github.com/repos/python-discord/organisation", headers={"Authorization": f"Bearer {os.getenv("API_KEYS_GITHUB")}"}) as resp:
print(await resp.json())
In [6]: import aiohttp
...: import os
...: async with aiohttp.ClientSession() as session:
...: async with session.get("https://api.github.com/repos/python-discord/organisation", headers={"Authorization": f"Bearer {os.getenv("API_KEYS_GITHUB")}"}) as resp:
...: print(await resp.json())
...:
{'message': 'Not Found', 'documentation_url': 'https://docs.github.com/rest/repos/repos#get-a-repository', 'status': '404'}```
(it uses the same token)
(huh)
that's odd
cause bot isn't using that token lol when it makes requests
ah well
bot/constants.py lines 265 to 273
class _Tokens(EnvConfig, env_prefix="tokens_"):
giphy: SecretStr = ""
youtube: SecretStr = ""
tmdb: SecretStr = ""
nasa: SecretStr = ""
igdb_client_id: SecretStr = ""
igdb_client_secret: SecretStr = ""
github: SecretStr = ""
unsplash: SecretStr = ""```
yeah it is
branding manager
bot/exts/backend/branding/_repository.py lines 19 to 21
# A GitHub token is not necessary. However, unauthorized requests are limited to 60 per hour.
if Keys.github:
HEADERS["Authorization"] = f"token {Keys.github}"```
bot/exts/info/code_snippets.py line 111
headers=GITHUB_HEADERS,```
`bot/exts/info/code_snippets.py` line 30
```py
GITHUB_HEADERS = {"Accept": "application/vnd.github.v3.raw"}```
hey joe can i add a pr to add this
does it need that
see above:
# A GitHub token is not necessary. However, unauthorized requests are limited to 60 per hour.
get flashbanged by a comment lmao
I think I hit it once
the idea is that even if users get us ratelimited with code snippets the token for branding is unaffected
we'd rather cut users off after 60 requests and have branding remain fine than have something go terribly wrong and fuck the branding github PAT
for a user to hit the limit they would need to send about 5000 requests
and given its the same token..... well lance already uses the token to fetch issues and pulls
Users can hit that limit by sending 2500 pull request references, even if they don't exist
yea
but its 5000 in an hour
bot/exts/info/code_snippets.py line 30
GITHUB_HEADERS = {"Accept": "application/vnd.github.v3.raw"}```
hell yeah it works
that was unrelated lol
main/bot/exts/evergreen/githubinfo.py
Vulnerable, bot fails on .github user gvanrossum/followers.
.github user gvanrossum/followers
ah yea
i'm away from my dev env, share the traceback?
not logged in
it just came to dev-alerts
TypeError: list indices must be integers or slices, not str
same bug as said to have fixed
this just reminded me i accidently yeeted the github user command out of my bot lol
shit
take another, for fun
nothing that time
-# how about now
oh
this is a regex bug
that should have caused a sentry event
@patent pivot app emojis are so dope
automatic syncing from octicons is now added to my bot lmao
(we should add this to pydis bots too)
app emojis means that when I made this change in logic it was simply a redeploy of the bot, where app emojis were then automatically synched upon boot, and then loaded the new emojis into the constants configuration variables (which isn't the greated, but eh)
made it backwards compatible with a global configuration object by using setattr on the pydantic settings object, after getting the new emoji from syncing, including making a minimal number of requests by caching state.
That is all to say: no more needing to sync app emojis in a server, no more needing staff to upload a new emoji, no more needing to keep the old one around for a minute while updating:
and for pydis staff: no more needing to update your local copy if the emoji in the test server is removed and replaced with a new emoji
This emoji is the wrong size (issue open) and rather than fix it with a single new upload and ID replacement + redeploy..... I would rather implement app emojis into pydis core
but to do that we need a unified configuration system where the bot can provide configuration to pydis core. Which we can do but it should have a unified object
so pydis core can sync app emojis by providing an object to the bot class upon instantiation etcetra etcetra
will figure this out when I have time later but yeah app emojis are really cool
-# this was literally just a redeploy of the bot and it updated all of those emojis for me
as soon as we have emojis that are being used on multiple bots we may as well go back to emoji servers
app emojis is only useful when only one app is using them, else it's a bit crap
unless they added team emojis yet
why?
because the sync is slow, each app using identical emotes now has a unique ID for it, and it just makes more sense to store things once that store them twice, all the apps can still have the syncing, for us it just makes more sense for that to be to an emoji server
I never store an ID in git
right, we currently do though and I'm trying to be careful before we commit to some big revamp of the config system
I don't know that I agree with something as major as you're proposing, we want to make both the implementation and usage easier, not make the implementation more complex to make the usage easier
was gonna say its not slow but 13 emojis is 4 seconds to sync when they don't exist
and 2.6 seconds to sync when they do exist
sadge
at minimum we could change the existing implementation to use PartialEmojis rather than mentions which would already improve internal usage
I use PartialEmoji's for definitions of the name's of the emojsi but upgrade them to full Emoji objects during sync
@blissful olive was the issue you opened discussed anywhere in the server?
Bbbut it's not even hacktoberfest anymore
#dev-log message /t
You're right. I see now. Makes sense to keep them as guild emojis and make votstrap sync from the source: if needing to change an existing emoji pydis can just do it in tandem
Questions like "what month is it" are too hard to understand for hacktoberfest spammers
I've seen a lot of random issues on popular repos though
python/cpython#123456
^someone spammed multiple issues just to get to issue #123456
no it wasnt i just thought of that command and opened the issue
python/cpython#123456 what colour did you all use for this emote?
hmm
- how did you determine that colour
it looks better than the github default
.colour hex 0x59636E
Your input was invalid: Cannot convert #0x59636E to a recognizable Hex format. Hex values must be hexadecimal and take the form #RRGGBB or #RGB.
Usage:```
.colour hex <hex_code>
.colour hex 59636E
that's the github default for skip
.colour hex 878e97
hmm no it's not that
i don't know if we have the original assets anywhere actually
i don't see why we'd have changed the default from what is provided in octicons
ah octicons isn't coloured though is it
nope
Had to read the octicons primer documentation for which colour goes to wich emote
ah the emoji server is not the test server #dev-contrib message interesting
oh?
because it could be condensed down to 1
a lot of the emotes date back to times where we used text logs and didn't use embeds etc.
a lot of the emotes we don't need / use anymore
ah
emoji server 1: 

















































emoji server 2: 

















































emoji server 3: 






& half of those are just used as URLs instead of actual emotes
:failmail: 👌 applied timeout to @patent pivot until <t:1762295178:F> (10 minutes) (reason: emoji spam - sent too many emojis).
The Moderators have been alerted for review.
oh hey now I can point out the inconcistency
the issue open emoji needs to be remade with 16 rather than 24
and issue closed (red) can be deleted: its no longer used
.bm
we use 35 actual emotes on bot by the looks of it
rest is basically discord-as-a-cdn
hilarious
which we may as well rsync onto pydis.wtf or something
What API does @dusky shore use for rendering latex?
oh
what
i thought we forked that
oh wait
it's under owl corp
what's owl-corps relation to pydis
it's the reason you haven't noticed anything
unrelated
and you can't get us to say otherwise

Joe I think it’s time to say you’ve got too many emojis
The duplicates are getting out of control
lmao are you in the emoji servers
please let us know if you want a support contract

yea there's a reason those ones got duplicated though
they got moved from emoji server -> here because moderators started needing to react to things with them
they don't need to be in there though
Oh it’s actually not all the emoji servers
nomination votes get closed out by a moderator reacting with 
it's here, the test server and the emoji server
Yea
lol
Had to send them to see them on mobile
you only need two of those
we need 1 of those
no you need two
well i suppose test server needs one
Oh no I can press and hold
also wait is @stable mountain in the test server
no
lucky
wow as a dev who doesn't have that luxury have you considered opening up your emoji servers
considered it but would never make sense to let people add their bots there
would just add hassle
also joe I hope you noticed that I made botstrap work for the official test server
the emoji bootstrapping was something that people wanted to solve a long time ago
yea
webhook bootstrapping also exists now
please read my release notes
to be clear it did previously but what I changed was name matching so you only need one webhook per channel and it'll match automatically @patent pivot :D
💪
Thread did not close: https://discord.com/channels/267624335836053506/1435218641326182564
Strange
It seems to have been locked
Unless that was a mod but not closed
Rather, archived
User doesn't seem to have been banned @mortal bluff
Nothing unique in either payload
{
"flags": 0,
"guild_id": "267624335836053506",
"id": "1435218641326182564",
"last_message_id": "1435218964916600912",
"last_pin_timestamp": "2025-11-04T10:46:29.493000+00:00",
"member_count": 2,
"member_ids_preview": [
"409107086526644234",
"328539281964400641"
],
"message_count": 4,
"name": "Totap beginner",
"owner_id": "1415617306654019687",
"parent_id": "1035199133436354600",
"permissions": "704656061090880",
"rate_limit_per_user": 0,
"thread_metadata": {
"archive_timestamp": "2025-11-04T10:46:29.165000+00:00",
"archived": false,
"auto_archive_duration": 60,
"create_timestamp": "2025-11-04T10:46:29.165000+00:00",
"locked": true
},
"total_message_sent": 4,
"type": 11
}```
```json
{
"avatar": null,
"banner": null,
"collectibles": null,
"communication_disabled_until": null,
"display_name_styles": null,
"flags": 10,
"joined_at": "2025-11-04T10:40:04.363000+00:00",
"nick": null,
"pending": false,
"permissions": "704656057945152",
"premium_since": null,
"roles": [
"463658397560995840",
"1074780483776417964",
"897568414044938310"
],
"unusual_dm_activity_until": null,
"user": {
"avatar": "14bb561944ba982caa2ac722dd71124a",
"avatar_decoration_data": null,
"clan": null,
"collectibles": null,
"discriminator": "0",
"display_name_styles": null,
"global_name": "BLISSXVX",
"id": "1415617306654019687",
"primary_guild": null,
"public_flags": 0,
"username": "bliss_xvx"
}
}```
https://agents.pydis.wtf/ ? access portal?
don't worry about it
....the archive timestamp is not none and matches the creation timestamp which is weird
it was probably a discord API error
Yes Sir
It's weird how it gets locked but not archived though
And it's the third or so time this week they've seen it so I'm looking at seeing if there's a possible fix
Ah you manually closed it now
please don't access over an insecure connection
The part that should be impossible is the channel being locked and not archived
tor + mulvad requirement
possible yeah, unlikely though
audit log shows nothing for that thread, not even a lcok
I suppose the solution here is check on startup if any unarchived threads need to be closed
How the hell
wait what, how
users have permissions to edit their own threads
otherwise they wouldn't be able to close/rename it nativly
but, lock them?
I mean yeah it's impossible to remove that
Yeah it doesn't show up on mobile
im using a laptop tho
Older mobile clients can also lock threads
So it's not indicative of a self bot either
probably a Discord API error
can you see dicord API errors in the logs?
nah
side topic: what happened to this, https://discord.com/channels/267624335836053506/458224812528238616
reddit killed their API
historic significance
once i got a load of upvotes and want everyone to know that forever
/archived
We can probably reopen it lol
API is still a ripoff
what do you mean
Will dm
WTH is the docs
Sus
Actually not sure if I can trust you to not report it lmao
so you mean you want to scrape the website?
What
It's a really stupid workaround but it works lmao
Not sharing it here so it doesn't get patched
probably some random unpatched endpoint lol
can you DM it to me
please add litestar to the docs command? https://docs.litestar.dev/latest/objects.inv is where the inventory is located
I'll contact support
its github pages
!doc refreshdoc
+ litestar
class litestar.app.Litestar```
Bases: [`Router`](https://docs.litestar.dev/latest/reference/router.html#litestar.router.Router)
The Litestar application.
`Litestar` is the root level of the app - it has the base path of `/` and all root level Controllers, Routers and Route Handlers should be registered on it.
I will give a full review tomorrow when I have time
been busy with schoolwork and python/sphinx/pytest prs today
shamazing
It's hilarious
Most of my prs to big projects are documentation fixes
I have 4 PRs to black and all 4 of them are a couple line changes
My first python PR? A single line change
-# but I'm solving real issues
@celest charm why do you want to switch the bot license from MIT to GNU?
I am not saying that it's what we should do
GPL is a viral license. In other words, if you want to use a library that's licensed under the GPL, your program must also be distributed under the GPL
(and the library you linked is GPL'd)
where is this discussion spawned from?
can you explain?
what fix said
we are scared of the GPL, it's too powerful
we cannot use that license on bot because it is licensed under MIT
it would be fine if bot was licensed under GPL and we used a MIT library
it doesn't work the other way around
I see. and why did we pick MIT?
MIT is the standard license to use when you want open-source but don't want it to be annoying for people to use your software
we wanted open source, not viral open source
we also likely cannot easily relicense the bot
we don't have our contributors sign a CLA which is generally the way you handle relicensing on projects with multiple contributors
so we either have to contact every contributor to bot and get their approval (and those who decline we have to remove their contributed features/rewrite it ourselves) or we can't do it
so the short answer is: we cannot use that library
🤔 That's not how that works, is it? I can just make a fork of the bot and license it under the GPL
Got it. Thanks for explaining.
you cannot relicense someone elses works, no
you could fork the bot, change the license but you'd have to include the original MIT license anyway
the condition of the MIT license is that the license is shipped with any derivative software work (which is why we have a third party licenses file on bot)
Yeah, it'd be a derivative work from the previous MIT version
yeah, which you probably can relicense but until you have reached a point where you're no longer a deriative work it'd have to include the original MIT disclaimer
the GPL explicitly prohibits relicensing to more permissive licenses
So we can have the next version of bot licensed under the GPL (and being a derivative work based on the previous commit), but we'd also need to include the MIT license explaining this change, and that's too confusing just to use one library. Something like that?
yeah, you can do things along these lines
because then all further contribution will be adopted under GPL licensing and the usage of the new library would also come under that
you just say "contributions prior to commit XXYYZZ were licensed under the MIT license found at LICENSE-OLD.txt or something"
e.g. if the next version of discord.py is licensed under the GPL (more likely AGPL?), it'd be a different story
more likely LGPL for libraries
AGPL is more for services, it has the provisions that if you interact with an AGPL service over the network that source code be made available for it (with modifications)
this obviously all becomes null and void when you have contributors agree to a CLA
Maybe Rapptz wants more monies and so will offer a dual license with AGPL
- what library
- what relicense
- go on
@ joe why does it say read-only permissions? https://github.com/python-discord/bot/pull/3434
i'm being censored by the deep state
nah dude you fell off, deep state doesn't care about you anymore
mmm, it because of copilot
yea progably because i technically opened the PR
You could also not port code from bot to pydis core and use it in @radiant merlin 🙂
Actually you couldn't port code to big brother at all
Is rapptz relicensing?
no, that's a hypothetical situation
So what's the library you were talking about using in bot lol
we'd probably split license if we did that
but also bot -> pydis_core is rare and only wehn we are moving utilities over
for things like this it's reasonable to just ask contribs if they're happy for it to be moved to a project with a more permissive license
and if they aren't it just gets rewritten in the migration
it's asking contribs for the whole project that becomes infeasible
yeah
most of our utils are written in-house
i plan to migrate botstrap to pydis_core
actually i partially wanna make it its own library lol
(discord api testing moment)
yea i'm not opposed to the idea but needs to be fully specified as an issue somewhere beforehand
because it's probably almost at the scope of needing a feature branch / a milestone
yeah
the current pull is pretty nearly done i just haven't had time to do the fixes
i got sidetracked with wanting to fix tens of projects documentation
working on a four+ year old sphinx bug
hopefully will fix a broken thing for pip, black, pytest-cov, and more
maybe we should add a CLA
i swear we had a discussion about that at one point but can't find it now
so what package is it?
an owl corp alternative will be available shortly
I can't believe I just read the entire #changelog channel
changelog isn't even the oldest place where we dumped server updates
Hey Joe wanna put the love fest and AOC changes in #changelog ?
nah i think it's fine
same reason we didn't for the other stuff
it gets naturally surfaced
changelog doesn't need to be a record of every parameter inside server settings we've changed otherwise it's just noise
people can already look at #roles, use !subscribe or now use the native functionality
we didn't changelog the changes to add roles to onboarding and that role is now astronomically larger
!role Announcements
463658397560995840
#000000
0.00 0.00 0
19531
43
6442450944
yes it goes back to 2020 #changelog message
time to look at announcements then
What was the server first called when you created it?
nah
me and a few friends
lemon joined a few months after it was created
i didn't know lemon prior to pydis
Another question, if you don't mind. Why do you not have the Founders role?
wanted the devops icon
oh lol
What happend to this lol: #announcements message
I kinda wish this was still there, though I know why it was removed
gdude loved minecraft
in fairness i think it got removed primarily because staff got bored rather than resource constraints lol
there is probably a world backup somewhere
how many people played?
like approx
concurrently probably peaked at like 10-15 people
Is the mod OSS somewhere?
How about now? 
With the 2025 levels of activity in pydis I bet we could get it to at least 20 now
lol
there was a mindustry server for a while
trying to think if we had anything else
Reopening the server for like a week or 2 every year would be a fun event
I mean with 400k+ people We can get atleast 1k peak
why?
we do not have 400k active users
looking at the communicator figures we do have a decent amount of retention long term, because a lot of people come back over the span of years asking questions here, but they are not active inbetween that
so we have a large communicator total figure but a much lower active communicator figure looking at the metrics i collect
Still, would be fun though.
ya would be fun
Should I or you bring this up in #community-meta
uhh
bring up in meta if you would like
although
we have plans for the immediate future
so is probably a longer term idea
so not sure bringing it up in discord is the best thing
where should I bring it up?
wdym?
events
hmm
i guess meta repo on github
is a place
What special?
what did you do?
and why hasnt chris spawned yet
he's on a pilgrimage right now to switzerland
removed the distribution of erlang
man
now i need to upgrade the debian distro to fix this i think
It's ok I broke my Linux install earlier
Also I just came back from the depression and I have like 5 major projects due in the next month so botstrap is gonna take a backseat
I'll try to get it done before aoc ends though
Nvm AOC ends a day before the final day of the semester lmao
I just found out you can host a minecraft server via Discord(who uses someone else for hosting) You can add mods, etc. And I think it costs boosts. This is still in Beta btw
Official discord post: https://support.discord.com/hc/en-us/articles/35370817986839-Game-Servers
Discord’s Game Servers feature lets you transform your Server Boosts into dedicated game servers for popular titles, creating seamless multiplayer gaming experiences for your community.
What this a...
oh damn
Needs review, staff and core devs
https://github.com/python-discord/site/pull/1567
Also fixes dependabot
probably needs DevOps as well
well now it just needs any staff member one review
I don't understand how it works even with beta enabled actually 🤔 https://github.com/python-discord/sir-lancebot/pull/1701
Bumps pillow from 11.0.0 to 12.0.0.
Release notes
Sourced from pillow's releases.
12.0.0
https://pillow.readthedocs.io/en/stable/releasenotes/12.0.0.html
Removals
Remove support for Free...
why is every repo different
that one does support locking
Python is shocked at your request
@fallen patrol Had to time to sit down and create all the relevant issues for the 12-day AoC. Assigned you to the ones where you indicated you wanted to implement it. LMK if you want any other issues.
If anything comes up with them, feel free to ping me here. I have pretty much all my GH notifications turned off.
neat
Also as long you fulfill the intent behind the issues, then you have pretty wide latitude to implement behavior that you think would be best; I trust your opinions.
fixing sir-robin#107 before i commit to fixing 25 to 12 days
@thorny obsidian how do i get that AOC_RAW_LEADERBOARD session value?
i rember something about dev tools
Log in, then dev tools, them memory storage, it'll be the cookie titled session.
If you need an example of the format the bot reads it in as lmk. It's a slightly special format because we read in several leaderboards
huh, that explains why its not working how I'm currently doing it
i don't know if this key was here previously https://adventofcode.com/2024/leaderboard/private/view/1063434.json?view_key=8e07d5c8 but its now possible to just have a URL
...unless the reason for that session ID is that view key expires
where does the view key come from?
This is what my .env for sir-robin looks look https://paste.pythondiscord.com/LLCA
Ah, I'd need to go collect them from all the LB owners
it doesn't seem to be fully documented either
Yeah, that's definitely a new feature
but the session cookies also only last for about a month anyhow
this is also new:
There are different ordering methods available:
[Local Score], which awards more points for earlier stars from each part of each puzzle. For N users, the first user to get each star gets N points, the second gets N-1, and the last gets 1. If you add or remove users, the points will be recalculated, and the order can change. This is the default. [Global Score], which uses scores from the global leaderboard. Ties are broken by the user's local score. [Stars], which uses the number of stars the user has. Ties are broken by the time the most recent star was acquired. This used to be the default.
Yeah. Mine is pulled now and then I use my other AoC account to produce the fallback about halfway through so its seamless the entireway through
also, would you please do me a favour and join the leaderboard with code 1063434-a304d92e so I have two users?
huh, that's wild
could you join at https://adventofcode.com/2024/leaderboard/private too 😅
oh, was cached, we're good
I'll start the process of getting each LB owners to get the readonly link. We can switch over to that as the primary method and if that doesn't exist then go with the session ID as the fallback.
If you want you can create a new issue, otherwise I can do it later. It's not critical for the 12-day milestone but does seem to be nice if we can remove one more thing off my yearly prep todo-list.
I probably won't rewrite that at the moment, snce 25 and 12 is important
!remind 1H Starting bother admins current and former
Your reminder will arrive on <t:1762640205:F>!
will implement all of 25 -> 12 in one swoop ignoring revival of code for this deadline
Oh yeah, revival of code is so low priority dw about that
i didn't even notice it this year 🥲
-# It's because it didn't happen this year >_>
do you want to order by stars or by time?
that api order was changed since last year as part of sir-robin#107 i might as well keep consistent
....and i ran with fakeredis
Here's your reminder: Starting bother admins current and former
[Jump back to when you created the reminder](#dev-contrib message)
ok i think i fixed the leaderboard in 107 which familarized me with the code to do the 25 -> 12 conversion
🤔 I don't see a year implementation on daystar
it might be possible to just make it 12 instead having to support history 25
&help aoc daystar
You are not allowed to use that command here. Please use the #aoc-bot-commands, #sir-lancebot-playground, #bot-commands channel(s) instead.
these checks are really something ><
Ah neat, if it only supports the current year then that makes it easy
yeah... found some other things though so I'm sidetracked
where should i report a pydis security bug
put together a patch already
dm modmail. If it's not a huge "can take over the server" thing you can probably just pr it
yeah check modmail
well I can't anymore, so I'll let someone else 😛
ah i see
!remind 1H check
Your reminder will arrive on <t:1762648470:F>!
Okay, saw that its been patched in roles
Requesting reviews from devops and staff members sir-robin#163
er devops to sir-robin#162
requesting comment on https://github.com/python-discord/bot/pull/3417#discussion_r2471020763
@thorny obsidian For aoc, what's the category look like? I can't remember if there's an aoc announcements channel, and advent_of_code is the discussion channel
I think its
- aoc discussion
- aoc commands
- aoc forum channel (to be created)
oh heck
lmao
technically this is accurate /s
okay, thoughts on this?
in the end i figured when making the leaderboard changes it made sense to add the faq embed
also wording changes in the about embed
...probably need to change about and faq
What's wrong with the about?
had a global leaderboard reference
but noticed that the above faq is basically just different questions than what's on the about
and is the new puzzle supposed to be sent in #aoc-announcements or #advent-of-code?
oh, we used #1047673173447020564 last few years, pog that'll make automatic implementation a lot easier
working on the rest of the new changes first though
I'd like it to go in #aoc-announcements? maybe? It gets auto-send in the general aoc channel atm
gotcha, Will try to get that done if I have a chance this week
as for now... ping because github silenced: @thorny obsidian
sir-robin#164
sir-robin#165
sir-robin#166
hello
i went to bed at 9pm and turned my notifications off until now
catching up with everything
wtf sir robin is still using a hard-coded policy lol
great things coming to pydis_core team
@patent pivot does core have an escape markdown method
Or an escape for codeblock method
probably not
It also doesn't have an ext reload command lol
yea
well
hmm
don't all our other reacts tie into seasonal bot functionality
yea but there is normally a season
Oh in branding and in changelog
yeah
Ic
basically if we add that we should be proper and add a season as well with branding
Ah
yea but it's small enough that restarting the bot is fine
I mean it's kind of annoying for dev lmao
I ran it on more than one time before the cog had loaded lmao
Side bar, updated leaderboard command:
If you provide a user who's not present then it does continue to error because that's an effective way of seeing if the user is in the leaderboard
If you don't provide a user but your linked user isn't in the message it provides a notice. I may actually catch this message being shown in memory to not send it every single embed. Eg if the user runs the command again it won't show up then either
This is sir-robin#166
Also we should either work branding into bot core or something else.... It would be great to have that API for assets and a synchronized state
Branding microservice when
Also I kind of want to refactor date/time locks on lance and Robin into bot core, doing a different thing from month locks.
We can keep the month locks but instead we have yearless date objects which we set a before and after. If it changes each year there can be an API implementation
It's somewhat frustrating to develop for a time that isn't current because overrides have to be set on a lot of the get time methods so it would be great to implement it in a way that the bot can have a "start time" set in dev which sets all datetime objects to begin from that time. Would also make midnight debugs easier
hmmm
yea this is true
Also I start a lot of messages with also
Shckxksn what if custom context in bot core with add_trashcan argument
we should do a lot of things with custom context tbh
Real
I really want messages to use buttons for delete
I know it's sort of big but the UI is a lot better especially for mobile users
Plus the implementation should be easier to do
Send button, process in listener
One callback. One listener, many buttons
finally
How does the Pygame-ce server still have their reddit channel working?
there are ways to make it work
if someone wants to contribute one that is not an abuse of the API i don't mind merging it
the problem is that most of them are abuses/workarounds of the API
Maybe @lucid orbit knows?
Hey mines not an abuse
Can you DM?
@patent pivot why are you pinning the minimum uv version?
Just curious if there’s a specific problem you’re solving or if you’re jus being proactive
where was the code for the old one?
no real reason, just quality of life for any new features we want to support and i have picked latest
0.9 brings python 3.14 support, 0.9.7 is just the latest
it'll be in git history
we didn't store a copy anywhere
there is purposefully not an upper bound of the support, so it's primarily more thinking about it as a compatibility date than a specific version we are going to use
report-uri/wrangler.toml line 3
compatibility_date = "2023-09-04"```
like around jan?
yea maybe
Nothing? Chris said it's a webhook
it isn't run by bot
it's run by lancebot
If you added an upper bound I would contest that until removed.
The contributing friction....
well yeah that's why i didn't and said it was purposeful lol
adding an upper bound would be stupid
we just need to be sensible about keeping the lower bound updated
poetry was the right choice until uv came around
still is the right choice for some uses
Sort of
I wouldn't ever use poetry for a library
The enforced infectious upper bound on Python version
For poetry it enforced it for a long while
look at the diff on my PR
If you had any dependency that wouldn't lock with 4.0 you couldn't either
I see it.
[tool.poetry.dependencies]
python = "^3.11"
Which is >=3.11,<4
Which is exactly what I'm talking about
which you don't need to have
the default is >=
go run poetry new and see what it generates
Now it is. It didn't used to be that way
Not for a long while.
FAQ
Why is the dependency resolution process slow?
While the dependency resolver at the heart of Poetry is highly optimized and
should be fast enough for most cases, with certain sets of dependencies,
it can take time to find a valid solution.
This is due to the fact that not all libraries on PyPI have properly declared their metadata
and, as su...
They finally added a workaround. Nice.
[project]
# ...
requires-python = ">=3.7" # used for metadata when building the project
[tool.poetry.dependencies]
python = ">=3.7,<3.11" # used for locking dependencies
for bot-core#306 are we not better just exposing a cog that users can add as opposed to adding it bot-side
we have the exts folder for this reason
Oh I didn't notice that lmao
I trusted you
they hated jesus because he told the truth
Imo base error handling, source, internal eval, and ext reloading should be on core optionally
ext reloading yea
source yea
int eval we never really need/use/want on the other bots
int eval is a last resort on main bot and that's where it should end
ideally we don't use it
only time it's used for actual server functionality is for raid management
Very nice for dev use lmao
Only load it if bot debug is true
Or something idk
I've been debating leaving the internal eval command out of my bot deployments
I'd just add the file to docker ignore and call it a day
It would improve security and even not have that code in the deployment which would be a second win too
Much lower risk of attack in that regard
But yeah a consistent development environment is what I want
Botstrap for all, eval, ext management, error handling, consistent checks. Unified UI....
Most of the error messages can be in core because so many bots use that error messages
Like positive_replies and so forth
ye
A lot of the base colours can be in core cause so many bots use the colours....
I want to subclass config eg a base channel config in core and then extend it in any bot with additional channels it needs
Most of the bots need #dev-log, ot, python discussion, announcements, etc.
And if those values change.... They should never ever ever have to change. And if they did they would need an update to all of the bots anyhow.
Trashcan? From core. Etcetera etcetera
Provided it's subclassable this should work fine
the problem with source is it does smart things
and that's the reason we haven't unified it
!source or-gotcha
the bot one supports tags
Seems easy enough to implement.
they aren't the same command on all bots
yes but doesn't make sense to unify if they behave differently
lancebot won't have tags, etc.
it doesn't know what a tag is and we can't use get_cog("Tags") like we do on bot to implement this functionality
Public method on the source cog which gets additional source mechanisms, or handles unknown code.
From pydis_core import source cog
Class BotSource(source_cog):
...
def get source_entries(self. ) -> sourceentry:
Result = Super()....
If not result:
Do the tag thing
I'm on mobile don't @ me for formatting
Inheritance is cool.
Just make an API. If you need additional functionality, override it.
I could implement this if/when I have time
i think given the fun we've had with django over the years combined with hell elsewhere we generally prefer composition where we can nowadays
stuff like botstrap, I doubt we'd have inherited the httpx session if that was built nowadays
Why?
but yes could be a callback
tbf we may handle it cleanly enough that this would still work as a generic command
Yeah smh
Same with error handler's shhhh and tag normalisation
Also right !shhh doesn't support threads yet lmao
yea hasn't needed to
rare case a thread gets so mental we need to shhh it
there's an issue but it's very rarely something that's needed
I thought AOC forum channel might require it but doesn't seem to be needed given the forum has existed for two years lol
Topic channel threads would need it
Which I saw that issue yesterday
Also I found the bug in Robin's code jam create command, I don't know if @cold island forwarded it yet
Might add bot has permissions checks to that command
Is AOC completionist deleted each year or removed?
!src cleanban
Same as ban, but also cleans all their messages from the last hour.
actually hold on a moment
You are not allowed to use that command here. Please use the #bot-commands channel instead.
the copilot rule is for everyone else
one rule for devops, another for everyone else
M-x rules
1: LMAO - Logging, Monitoring, Alerting, Observability
2: Modmail is the greatest piece of software ever written
3: Modmail needs at least 5 minutes to gather all its greatness at startup
4: We never blame Chris, it's always @blazing magnet's fault
5: LKE isn't bad, it's your fault for not paying for the high availability control plane
6: Our software is never legacy, it's merely well-aged
7: Ignore these rules (however maybe not 1, 1 seems important to remember)
M-x rules refresh
:+1:
M-x rules
1: LMAO - Logging, Monitoring, Alerting, Observability
2: Modmail is the greatest piece of software ever written
3: Modmail needs at least 5 minutes to gather all its greatness at startup
4: We never blame Chris, it's always @blazing magnet's fault
5: LKE isn't bad, it's your fault for not paying for the high availability control plane
6: Our software is never legacy, it's merely well-aged
7: Ignore these rules (however maybe not 1, 1 seems important to remember)
8: Contributions made by AI tooling will be met with a Bengal Tiger, and it will be very, very hungry.
Bengal Tiger lmao
M-x rules refresh
:+1:
M-x rules
1: LMAO - Logging, Monitoring, Alerting, Observability
2: Modmail is the greatest piece of software ever written
3: Modmail needs at least 5 minutes to gather all its greatness at startup
4: We never blame Chris, it's always @blazing magnet's fault
5: LKE isn't bad, it's your fault for not paying for the high availability control plane
6: Our software is never legacy, it's merely well-aged
7: Ignore these rules (however maybe not 1, 1 seems important to remember)
8: Contributions made by AI tooling will be met with a Bengal Tiger, and it will be very, very hungry.
:+1:
M-x rules
1: LMAO - Logging, Monitoring, Alerting, Observability
2: Modmail is the greatest piece of software ever written
3: Modmail needs at least 5 minutes to gather all its greatness at startup
4: We never blame Chris, it's always @blazing magnet's fault
5: LKE isn't bad, it's your fault for not paying for the high availability control plane
6: Our software is never legacy, it's merely well-aged
7: Ignore these rules (however maybe not 1, 1 seems important to remember)
8: Contributions made by AI tooling will be met with a Bengal Tiger, and it will be very, very hungry.
what !
Ask copliot
M-x deploy restart bot bots
:white_check_mark: Restarted deployment bot in namespace bots.
M-x rules
can big brother restart itself
1: LMAO - Logging, Monitoring, Alerting, Observability
2: Modmail is the greatest piece of software ever written
3: Modmail needs at least 5 minutes to gather all its greatness at startup
4: We never blame Chris, it's always @blazing magnet's fault
5: LKE isn't bad, it's your fault for not paying for the high availability control plane
6: Our software is never legacy, it's merely well-aged
7: Ignore these rules (however maybe not 1, 1 seems important to remember)
8: Contributions made by AI tooling will be met with a Bengal Tiger, and it will be very, very hungry.
:white_check_mark: Restarted deployment king-arthur in namespace bots.
you asked copilot.... right?
king arthur will never have any useful public facing commands
M-x ed
what !
M-x ed
what !
1: LMAO - Logging, Monitoring, Alerting, Observability
2: Modmail is the greatest piece of software ever written
3: Modmail needs at least 5 minutes to gather all its greatness at startup
4: We never blame Chris, it's always @blazing magnet's fault
5: LKE isn't bad, it's your fault for not paying for the high availability control plane
6: Our software is never legacy, it's merely well-aged
7: Ignore these rules (however maybe not 1, 1 seems important to remember)
8: Contributions made by AI tooling will be met with a Bengal Tiger, and it will be very, very hungry.
:+1:
M-x rules
1: LMAO - Logging, Monitoring, Alerting, Observability
2: Modmail is the greatest piece of software ever written
3: Modmail needs at least 5 minutes to gather all its greatness at startup
4: We never blame Chris, it's always @blazing magnet's fault
5: LKE isn't bad, it's your fault for not paying for the high availability control plane
6: Our software is never legacy, it's merely well-aged
7: Ignore these rules (however maybe not 1, 1 seems important to remember)
8: Contributions made by AI tooling will be met with a Bengal Tiger, and it will be very, very hungry.
lmfao
Captain Fisher got pinged so much lol
no idea
like $120 in linode or something i think
hmmm lol
!int e ```py
import importlib
print(importlib.metadata.metadata("pydis_core"))
In [4]: import importlib
...: print(importlib.metadata.metadata("pydis_core"))
...:
Out[4]:
File "/bot/bot/exts/utils/internal.py", line 181, in _eval
res = await func()
...
"an embedded header: {!r}".format(value))
email.errors.HeaderParseError: header value appears to contain an embedded header: '# bot-core ![Version]\n[Version]: https://img.shields.io/github/v/tag/python-discord/bot-core?label=latest&logo=version'```
oh, linode is cheap
lol
another problem with supporting commands from pydis_core
!int e ```py
print(type(self.bot.get_command("src")))
In [9]: print(type(self.bot.get_command("src")))
<class 'pydis_core.utils._monkey_patches._Command'>```
ah. because of that
looking at .module will probably fix it though
though that's a string
so i guess the only thing we can do there is startswith("pydis_core") but i don't love it
oh actually .callback will be fine
it's only the command object we patch
ye
well, I know the person who set up the reddit integration, so... @supple moon 😁
Thanks!
Uh
Well we use Make.com for it at the moment and some json editing for proper embeds
Is there any code/method you can share?
(make.com is a no-code solution)
I admit I didn't go super deep on internals, just make.com Reddit nodes, one bot account in the subreddit that is used to poll new posts and that was it
Right now we're also only naively polling for new posts, which works for r/pygame's activity levels, not sure about how that'd be on r/python
Without a bot account it's also possible to poll http://www.reddit.com/r/subreddit/new.json?sort=new periodically as well
https://www.reddit.com/r/python/new.json?sort=new that just works wtf
i don't actually remember what was wrong with our last implementation
oh yeah
no merge conflicts wtf thanks joe
!int e ```py
import base64
print(base64.b64decode("RmFsc2U="))
In [53]: import base64
...: print(base64.b64decode("RmFsc2U="))
...:
b'False'```
hmm
let's enable it and see what's up
!int e ```py
import base64
print(base64.b64encode("True"))
In [54]: import base64
...: print(base64.b64encode("True"))
...:
Out[54]:
File "/bot/bot/exts/utils/internal.py", line 181, in _eval
res = await func()
^^^^^^^^^^^^
File "<string>", line 7, in func
File "/usr/local/lib/python3.13/base64.py", line 58, in b64encode
encoded = binascii.b2a_base64(s, newline=False)
TypeError: a bytes-like object is required, not 'str'```
In [55]: import base64
...: print(base64.b64encode(b"True"))
...:
b'VHJ1ZQ=='```
yea i'm built different
i am an unstoppable force and chris is an immovable object
huh
the nasa rovers thing is fucked
cool
!remind 2D ???
Your reminder will arrive on <t:1762906657:F>!
what happened
it was restarting ? lol
this has always beena. bug
we probably use the wrong restart policy
ohhh two instances running
api seems to have been vaporised
yeah i was wondering for the longest time how does pydis seemingly never have downtime
whereas every reboot for my bot has 30 seconds of downtime
yea we could do proper healthchecks
i think we just use the natural overlap and it mostly lines up about right
.mars
.space mars
Invalid rover curiosity.
Rovers: ``
The images look so cool!
time to disable
Me and 400k other users depend on this command daily, please don't disable
me and 400k bengal tigers who are very hungry depend on users using AI to contribute to pydis projects every day
🤣
had dnd on
I expect nasa to work again once the usa government works
yeah
no deadline that we can set for now then
lol
⚠ Service Outage Notice: This API is currently experiencing an unscheduled outage. We are working to resolve the issue as quickly as possible. We apologize for any inconvenience.
where is that
aaaaaaaaaa you gave me a great idea for my bot
thanks joe
healthchecks for APIs I use which are implemented into command checks
graceful disablement of commands if the api is down
hmm
sounds like a good way to lock users out when an api experiences a transient error
but don't you always want to retry
sort of?
and presumably that'd stop stuff showing up in !help
**```
&adventofcode
**Can also use:** `aoc`
*All of the Advent of Code commands.*
**Subcommands:**
**`adventofcode countdown`**
*Return time left until next day*
hmmm
would have to implement it into the help command but yeah I'll probably do it for my bot regardless
vendoring rediscache is going to be fun
why not just reimplement it, get rid of the global state
you did that yourself
yeah
yes :)
fixed
fredrick repo seems to get new dependabot problems literally everyday
mental
The Law of Concentration states that whatever you dwell upon grows. The more you think about something, the more it becomes part of your reality.
— Brian Tracy
-# Powered by zenquotes.io
@blissful olive 
@patent pivot#0002 can you please review kthx?
is it
i'm normally pretty good at not breaking bot thorugh other peoples changes
it's normally mine
i broke snekbox recently
idk i just don't have high hopes after breaking black's ci for a moment
:)
this was the last two hours
did you test in the main test server
I intentionally added support for that server
hence the webhook name matching
no more hitting the 15 webhook limit per channel :D
oh
wait a moment
joe wait a moment
🤨
i might have actually broken it
why
i can't remember if bot owned webhooks can have the token read by anyone but the bot whom created it
current implementation would mean non-executable webhooks get selected
hmmm
yea i can't see the URL from discord client
but as long as the bot creates them that's fine right?
yeah but the bot might be able to
well in the test server its multiple bots owning webhooks
this now matches to the one webhook, but it might not be readable
i can't test right now currently breaking i mean fixing black
oh yay it worked
what a stupid feature that users can't see the tokens of webhooks created by bots
it makes a lot of sense IMO
i own the guild lol, the webhooks being hidden is just a pain in the ass
it's not like it offers any actual security
oh brilliant i can't use this webhook but i have access to the panel so i'll just make one myself and use that instead
enshittification at it's finest
it's not like they've even made webhooks created by apps visually different to users
if they'd at least done that maybe i'd understand
something in the modal to say "oh this webhook is owned and executed by ...!!"
i'm just not sure what this is actually preventing
at the very least it should be an option on the webhook creation payload
oh that's actually an easy fix for the wrapper
just need to check if token exists
was thinking I had to check the application owner and match it to self but no, its just dumb fuck check if there's a token
yea
also i remember when you were working on the custom shipit emojis in #dev-log? https://api.github.com/emojis
but like spell emojis correctly or don't
Says the one with the 404ing link
yes i was talking to myself
yes
i need to figure out the mapping between github and discord though
they named 🤗 for example :hug: on github
AND THERE'S NO TWEMOJI MAPPING
yeah you can't do it though
discord are fortunately good API consumers and validate the HMAC
Danny actually explained it to me
i forgot bot owned hooks can do funky shit
interaction buttons etc
which is components to the bot itself yeah
Danny actually helping someone?
stupid decision
but pydis actually doesn't use those


