it's because of the way our backend works
// merch: https://merch.krazam.tv
1 messages · Page 167 of 1
it's because of the way our backend works
// merch: https://merch.krazam.tv
how do we create Tim’s repo?

@magic arch keep up, I already answered that
heck ye
veeery cool
omg finally
BUT HOW does Tim exist before his repo?? are you going to make a folder without a repo like a crazy person?
yes
I'm going to code him in system python
and put the file in a systemd service
straight into /opt/
NO SUBFOLDER
I'M TALKING /OPT/TIM.PY
nice @spare plaza, starting to look dark themey
not 100% sure about the colors, but I'm guessing they're not final.
NOOOOOO STOPPP
no we will have to poll between 100,000 color combinations
god I hope not
blurple is kind of hard to pick nice dark colors for for some reason
it is. I'm thinking possibly if they're bluer dark colors, it could work
also possibly we could lift colors from discord
that feels like it ought to work
I mean, our blurple is originally a discord color
so maybe client dark mode colors would compliment it well
we tried github's dark dimmed theme, and then tried with discord's default dark theme
website contains a lot more blurple that the server ever did though
true
for some comparison
discord versus github dark dimmed
we could possibly consider taking some of the blurple out of the page when in dark mode, too
well I think the dark dimmed theme is just way too dark to work with bright blurple
the contrast is too extreme
is there a deploy preview, @spare plaza?
maybe you should open a draft PR or something (does netlify still build draft PRs?) so people can play around in inspect element with the preview.
he's currently screen sharing it with us lol
lol I can do. 1 sec
the normal wave won't work during, as I'm trying to figure the best way to either style the SVG or swap between the two.
I also need to align the button icons & figure out the glow stuff as it looks tacky in dark mode
We're a large, friendly community focused around the Python programming language. Our community is open to those who wish to learn the language, as well as those looking to help others.
Also some links turn black on hover
Possible issue with the bot: #help-donut message
Someone pointed it out in python-general, just passing the message along.
i can't find the message now, but discord seems to be fitzzing out. may be related
probably related 
That is the message LX linked to. But we did get a few dev-alerts error from Discord suddenly disconnecting. It also impacted Chris and I with some server management stuff we were doing at that time.
oh, i misunderstood mina thinking that she couldn't see the linked message 🤦♀️
yeah haha it was smth in an alert channel that i saw
did you reply to me twice? or is that discord's doing
Hi, I don't think I am willing to contribute to pydis projects anymore for several reasons, the core devs could put all my PRs for up-for-grabs. Thankyou everyone for helping me out throughout the process and making it wonderful :D
discord was having a status incident
Hey could I get a contrib review on bot#2074?
It’s literally just deleting the file, this is more of a formality
page seems broken on mobile. hamburger doesn't work.
Ah, I'll take a look into how I broke it. Mostlikely due to the switch / new button in someway
Ty
smh scale, _
bot/utils/extensions.py lines 20 to 23
for module in pkgutil.walk_packages(exts.__path__, f"{exts.__name__}.", onerror=on_error):
if unqualify(module.name).startswith("_"):
# Ignore module/package names starting with an underscore.
continue```
I was under the impression that it's gonna be reworked a bit.
adding a warning and an early return in setup could also be a valid solution
it doesn't mess the Git history this way
@patent pivot @clever wraith @green oriole @fallen patrol
I get what you're saying, but also, that's not how git works
https://github.com/HassanAbouelela/TestHistory
I'd also appreciate that people who want to make snarky comments make them during the PR process, because as far as I know, I went through all the proper channels, asked for reviews multiple times, and left it up for a couple days.
Put up or shut up
understandable, I didn't mean to be snarky 😓
I also haven't been checking the issues or pulls too much as of late. Just surprised it was deleted but then, I've committed my fair (and more) share of git shit
Lol it's not a big deal
yeah, you're right
and yeah, aware the PR has been up and should have commented, but just because we merged it doesn't mean we can't set a process for how we want to do this down the line
like, maybe we should encourage removing the add cog line, or add a disabled flag to the cog or something, it's not critical, git blame is rarely super relevant, but when it is, it's nice to have it
oh yeah, this hahah
is pydis still manually adding domains to the scam list?
what did I do lmao
yes
is there a reason for not using lists such as sinking yatchs?
do y'all even have someone in the phishing server
quality mainly
we might integrate at some point, but so far we've only ever used data we've sourced ourselves for moderation, so it's a notable shift in policyb
probably doesn't want checks notes a third party that can potentially be hacked and say legitimate links are illegitimate.
well sinking yatch is curated by the whole community and hacked domains are removed
it's nothing we'd never do
I mean, pydis could participate to the fish project and help curate the domains
it's just not something we've talked about or needed thus far
but yeah, I perfectly understand
but it's been mentioned, but all discussions will be internal
if y'all are curious what an implementation could look like: https://github.com/Akarys42/StarBot/blob/main/starbot/modules/filters/phishing.py
it is pretty much as efficient as the current system as everything is kept in memory
I think the sources we've mentioned so far are google safe browsing and manual reports inside DMD
so that's probably what we'd do first
oh yeah, ak meant to look at safe browsing but never did lol
it's fairly alright
yea I know of a few
initially at least GSB is the one to go for - we could also integrate with discords own list (though their upcoming auto mod stuff probably does this)
right, there is also the discord automodding
I wonder if it will be as effective as the fish project
oh I'm silly, vco is here too
Good to know I'm low quality 🙃
This PR has 3 approving staff reviews. Just needs a core dev to approve and merge
I'm not sure where you picked up that I or anyone else thought that, I wasn't even aware you have a source of phishing data, just saying that in general maintaining our own list is higher quality than anyone else since we have full curation control, I'm not saying other lists are low quality
was mostly a joke :P
I only use upside down ironically
ahh okay, just making sure 👍
it was based on this since me and cactus' api is a major source for this api 
but yeah I don't have hard feelings I was just being self deprecating for lols
good good hahahha
when you type !guilds it shows an embed with hyper link "communities page" but the page looks like this
oh right, that should be https://www.pythondiscord.com/resources/?type=community now
embed needs an update I guess
also, when you try to use !src guilds it sends into invalid page
ah right, that link is missing a /bot/ in the middle
does this need an open issue for this or nah?
Communities
The communities page on our website contains a number of communities we have partnered with as well as a curated list of other communities relating to programming and technology.
It seems to redirect /resources/communities but not /pages/resources/communities
interesting. yeah I didn't know about this edge case.
it's easy to fix though.
just add a few lines to redirect.yaml
wanna open a PR, @clever wraith ?
Just had a look into this, seems like if I only serve one style sheet it works 
this is how I have it serve both, so removing one of them makes it work.
{% bulma %}
{% bulma 'dark' %}
Any pointers? I haven't got any idea of how this could cause that.
I haven't a solitary clue. very strange.
seems like the JS is being sent twice too, not just the CSS
so it has two event handlers assigned
which makes it just not work at all
Might have to look into allowing django-simple-bulma to have this django syntax for passing multiple .css themes.
{% bulma 'default', 'dark' %}
``` Although I'm unsure what the best identifier for default would be, as 'default' would be a theme name in itself
I'm not familiar with Django extensions, but it might be easier to just send one no matter how many tags exist.
After removing one event listener attached to the burger menu via dev tools, it works.
done!
Does anyone have an idea as to why lint is failing on sir-lancebot#1022?
trailing whitespace is the failing check
yeah the files you've submitted have after the ?
you need to ensure the last character on each line is not whitespace
Oic, but I don't see that in my editor
Try running the pre-commit hook
poetry run pre-commit run --all-files
since it seems to be an error from a pre-commit hook
Ok I fixed it thanks @patent pivot and @vocal prairie !
noticed bot#1641 when going through some old notifications, any updates on that?
I read through the issue quickly. From a quick glance I have nothing against having it in the linting workflow. As for the hook.. I'll check it out later this week. :)
That's just my opinion, will discuss it with the rest of the team.
Well our beginner project is @dusky shore . A good place to start is to read the contributing guidelines and start to get familiar with the code. After that, look through the open issues and PRs on the github page and either take on an issue, or review a PR
I read the guidelines
Disclaimer
Ik Intermediate python programmin
Will tht be an issue for me?
Although I learned CPP before Python
I don't think it will be an issue, but 2 / 3 of our projects are discord bot focused, with the 3rd being the site
Using django?
Hopefully i contribute something
Yeah the site is using django
!src
Alrighty, what issues are you running into?
Ahhh
Isn't the python ext .py
Yes
Also y is there Dockers
Thts a web cloud computing thingy
Can't find any extension with .py
We use Docker to have a uniform environment for us to all use
Ohhhhhhhhh
The structure of the project has the "code" in the bot folder, with the commands being in the exts, and then the other aspects of the bot logic being in utils or resources
Ohhh
I see
Just found the src files
Thx
Soo we just try to resolve all the bugs and issues ryt?
Its not done in a day and not done by one person. But yes, review the issues that are open and do not have a PR linked to them, or review the PRs that close issues
If you find someone willing
How abt u 🥲
I'm not looking to collab at this time as I have other projects on my plate
If you run into any issues, ask in this channel
I'm not around 100% of the time, and there are a lot of very talented devs that watch this channel
@crude gyro, could I have your input on this? What would you think the best resolution would be?
that sounds accurate. the tag brings in everything
Are y'all still using that font-awesome license? If so, the kit is ready to be updated to font-awesome 6 whenever, and I can drop someone a copy of the pack download if needed
Just let me know o7
would you want the solution to be in the django-simple-bulma package? I feel like that would be the correct place to solve this
i'll make an issue on that repo explaining it, if you agree
naw, it broke for local stuff so we swapped it with a non-pro one. and recently I've been using https://css.gg icons for that lean 1KB look
All good, then o7
it lets you import only the specific icons you need, like, I want these two and nothing else.
is very nice
worth a look
and it's pure css
sure, that's probably wise.
are you thinking that you'd separate the css and the js imports into two different tags?
I was thinking of allowing the user to define multiple themes on the bulma tag
{% bulma 'light', 'dark' %}
Although idk how you would specify the real default theme
separating them into js and css tags would work too.
I'll make a issue on the github repo, explaining what I want to do etc. so other devs can see
does disabled=true attributes work for link tags?
maybe django-simple-bulma could even include some JS to swap the active theme
yes
that is how i'm switching
Hmm, I have a feature request I would like to made - ping groups!
The idea is to be able to sign up to a type of mailing list that you can assign yourself or remove from yourself anytime. I would like to be able to ping staff that sign up for Project Winter games, but getting a role for that increases friction for people to signup or remove themselves from it. Another issue is that I won't be able to ping that role unless we make it pingable by anyone which means that members of the community can ping the role.
The proposal would just be a command to toggle the group and a command to ping a particular ping group. Doing so will have the bot format pings for everyone who's signed up and send a message with all of those user pings. The issue is that this requires persistence (PostgreSQL), but it's not really a typical @stable mountain feature (more-so @dusky shore).
Where would I open the issue for this?
Just to make sure I understand correctly.
If let's say a 100 people assign themselves to one of the group, the bot will tag all of those people, one by one?
(btw. who can create those "mailing lists"? Anyone, or just staff?)
This would be staff-internal for my purposes. I see no point in allowing this to the public - if they would like to organize groups of people this isn't the server for that.
Yes if 100 people assign themselves to one group, the bot will send a message with 100 pings.
Alright that's what I expected 😄
I could imagine something like that, however if it's staff-internal I believe it would be more like a bot thing in my opinion.
Yeah because I need the storage that bot has
That would be more requests and hits ratelimits
@molten perch should I create an issue and consider it approved already? Or wait for potential discussion on it?
Yeah, create an issue. So that we can discuss it further, in depths.
Yes I'll create an issue either way so that it can be tracked
Sounds good!
...and some staff have DMs disabled
didn't mean to ping, sorry
That's fine
isn't it better to just have a Thread with the interested people, then @ everyone in it?
I don't have permission to do that unless we enable the permission for me specifically
Also are you sure pings work like that? Is that documented somewhere so that Discord doesn't change it and I accidentally summon all of staff
i think @ here would work
Threads also have somewhat bad discoverability for long-running stuff, since I'd want this to be re-used I would have to still manually see who is in the thread to join them into the new one.
yeah pretty sure that at-everyone and at-here don't work in threads
sorry
not don't work
don't add all members
the role pings add all members
Tl;Dr at-everyone and at-here will ping everyone in roles, but specific role pings add all members of it
Is that what you mean because I am confused
yeah
at-everyone and at-here in threads will just ping the existing thread members
at-role will ping all role members and add them
You can edit in a ping to add users to a thread without pinging
Actually isn't there a 50 users limit so you don't take down a server by using something like the developer role in a thread
I think there is, I remember someone talking about it
This is only really suitable for, say, mods
100
and a message flag
because discord
Integrate your service with Discord — whether it's a bot or a game or whatever your wildest imagination can come up with.
FAILED_TO_MENTION_SOME_ROLES_IN_THREAD 1 << 8 this message failed to mention some roles and add their members to the thread
just made a thread in NC, edited a message to contain help thread auto add, and it added everyone; nice
oh god please edit that
i will make a pr right now brb

actually nvm cba
Is there yet opened issues for the !guilds, the communities page hyperlink gives 404 when visited
Also the !src <tag> results to 404 page on github
i think blob changed to tree which causes the second issue
yeah https://github.com/python-discord/bot/blob/main/bot/exts/info/source.py#L72 needs to be changed to /tree/main
bot/exts/info/source.py line 72
url = f"{URLs.github_bot_repo}/blob/main/{file_location}{lines_extension}"```
@gritty wind would it be ok if I make a quick PR to fix that for bot and lance ^^
There already is a PR for it
But no that’s not the cause
Otherwise the entire source command would break
!src help
An interactive instance for the bot help command.
No PR yet actually, but the issue and cause are described in bot#2022
It no longer errors though?
!src with
The link just isn't correct
The link is /blob/main/resources instead of /blob/main/bot/resources
Although when it does work it uses the wrong path so that should be fixed in the source cog at L68
It works depending on the loading of the cons
Ah right
So it can break after a restart
👍
!resources
The Resources page on our website contains a list of hand-selected learning resources that we regularly recommend to both beginners and experts.
What about the communities page hyperlink on the !guilds?
tag needs updating to point to https://www.pythondiscord.com/resources/?type=community
We're a large, friendly community focused around the Python programming language. Our community is open to those who wish to learn the language, as well as those looking to help others.
if you're going to update one, make sure to update !tools and all other tags that point to the old resources page
There are more than just few that needs to be fixed on?
i'm not sure, but there are a few tags that point to resources
!remind 1d write a worker to do redirects from old resources to new
ah
no remind
I might not be able to do that in this case, but if no one else does I can try doing it
Here's your reminder: nump docs fixed?
[Jump back to when you created the reminder](#dev-contrib message)
Here's your reminder: bonk joe for member stats
[Jump back to when you created the reminder](#dev-contrib message)
lol
Who's the user who has been asking about bot#2079?
I think someone was just going to fix the redirect, not sure if that’s still happening
you don't need to do this, why would you do this.
old resources mostly already redirect to new, there's just one or two exceptions that were missed
hmm, both tools and guilds are broken
and we have SEO on both
I wasn't aware we had attempted to redirect those, but they're not redirecting
If we can do a 301 in Django, let's do that, it's just not there not and I wasn't sure if we'd attempted that
!guilds
Communities
The communities page on our website contains a number of communities we have partnered with as well as a curated list of other communities relating to programming and technology.
!tools
The Tools page on our website contains a couple of the most popular tools for programming in Python.
The guilds tag uses /pages/resources/communities, we don’t handle that case
it'll fill the width if there's enough text to wrap, otherwise it shrinks
I find that confusing, but I'm very much not a web developer. is this something we can "fix"?
@crude gyro@crude gyro@crude gyro@crude gyro@crude gyro@crude gyro@crude gyro
yeah that's pretty easy to address.
you just set a min-width on the cards
I'm guessing if it's set to min-width: 100% it would probably always fill the width
yeah, fixed if you set the div that contains the cards to min-width: 100%
technically I haven't fixed it yet, just figured out what's wrong.
but okay, I'll submit a fix for both the card width and the redirects tonight.
thank you lemon
Would the correct return type for an inner of a decorator, that returns whatever the wrapped function returns, be t.Any?
since what it returns will be different depending on what function it wraps
typevar
T = TypeVar("T")
def deco(func: Callable[[...], T]) -> Callable[[...], T]:
def inner(...) -> T:
...
def decorator(func: types.FunctionType) -> types.FunctionType:
@command_wraps(func)
async def wrapper(*args, **kwargs) -> t.Any:
so would i change types.FunctionType to callable, that returns T
yeah
if it was 3.10 youd use ParamSpec for the parameter types
are any of our repos on 3.10 yet 
currently blocked on hiredis-py
mind that I used FunctonType there specifically as the command_wraps decorator won't work with arbitrary callables
Ah right
Not sure if there's any generic version of that
Yea, me neither
We're a large, friendly community focused around the Python programming language. Our community is open to those who wish to learn the language, as well as those looking to help others.
that one works too.
We're a large, friendly community focused around the Python programming language. Our community is open to those who wish to learn the language, as well as those looking to help others.
We're a large, friendly community focused around the Python programming language. Our community is open to those who wish to learn the language, as well as those looking to help others.
my disappointment is immeasurable.
@crude gyro put this pointless command on the backburner; we need a rickroll
We're a large, friendly community focused around the Python programming language. Our community is open to those who wish to learn the language, as well as those looking to help others.
We're a large, friendly community focused around the Python programming language. Our community is open to those who wish to learn the language, as well as those looking to help others.
lemon is always a step ahead
yay
also that URL with the non-alphanumeric characters worked, though we can also use a regex to pre-emptively remove those.
We can use typing_extensions though
any updates 😅
oops, have been really busy and it slipped my mind 😅 will send one now
no worries haha
sent
I wonder if there is a Twitter that could be DMed, like we did back then for pycares
That url just straight up crashes the discord iOS client
Gotta love it
It does omg, good job Discord
lmao
Doesn't even do anything on click on desktop
@vale ibex I'm getting hella merge conflicts trying to pull in Fronto's latest changes to the Trivia Night PR. What do I need to do to get it working? This is due to the force-push from a few days ago, right?
alright cool cool cool. pre-commit is preventing me from unfucking this. gotta fucking love precommit.
will bot.get_user(id) work in a cog's on_ready
or do i need to use fetch_user
it's probably better to use bot.wait_until_guild_available() (in a task created on startup) because that's when the users will be cached
👍
do you mean bot.wait_until_ready() or bot.wait_until_guild_available()?
im guessing its the latter
yeah the latter, my bad
why are you using cog listeners for on_ready?
wdym
you said you're using a cog's on_ready
not anymore
friendship ended with on_ready
wait_until_guild_available is my new best friend
okay good, you shouldn't be using on_ready
where are you using wait_until_guild_available tho
in a coro which i schedule in __init__ with self.bot.loop.create_task
also why is this
see warning there
applies to dpy as well so 
'ight
ic
also pycharm not warning me for not awaiting coroutines is really pissing me off
lol
Probably Yea, it was rebased onto main, you may need to force pull
Do it the opposite way around
Put awaits in front of everything
See what complains
It will only warn you in specific cases
Specific cases being when it is just a bare statement
For example
channel.send("Hi!")
```is an obvious error
This statement has no effect
But consider
message = channel.send("Hi!")
Should the !unsubscribe be removed from this, it doesn't seem to be valid command anymore. #roles message
message is a coroutine, that you could be passing to another function or awaiting later
So it could be a potential error. But it could also very well be intended.
Imo unsubscribe should be added as an alias
Since that command allows you to do both
makes sense
I'll take care of this one, thanks.
I've written a fix for this. Currently playing with adding a search bar to the resource page, so I'll include it in that PR as a kaizen commit.
wrote a fix for this now, will include as kaizen in an upcoming PR.
What even is kaizen. Is it the same as kaizer?
🤔
Even people who think that japanese and Turkish are related agree.
(that's a real theory)
interesting
yes it's not a language family, it's just a smaller part of the japanese vocabulary that refers to words they borrowed from Chinese.
a subset of japanese
quite a lot of common japanese words came from chinese.
one of my favorite books, The Pragmatic Programmer, talks about kaizen. When a small improvement can be made easily, no matter whose job it is to make that improvement, you should just do it. You should pick up that pen that fell on the floor, even if you're the CEO. You should fix that typo in the documentation, even if it's for a feature you didn't implement, even if it's out of scope for what you're working on
if we all make tiny improvements all the time, it helps prevent software rot, and keeps everything tidy.
where I work, we encourage everyone to make "kaizen commits" when they're writing code
that is, if they see something they can quickly and easily improve, just improve it and commit it into whatever branch you're working on. A small bug, some misleading comments, a flaky test, just fix it.
thinking I'll stick the search bar here
looks nice
maybe a little wide though (it doesn't line up, but it's not a big deal) (or perhaps it could be widened?)
hmm it's ok, but my immediate thought is that it searches for filters
I'd expect the resource search to be above the resources
maybe that's resolved by changing the placeholder text
yeah, that might be good
like, this helps. there may be a better text though
just "Search Resources"?
why titlecase
idk 😅
oh, you mean with the filter
yeah, sorry
feel like I need the same top margin too then
which is a bit airgapped but I don't hate it
maybe the smaller top margin is nice actually
I also wouldn't mind it taking up the full width
But it doesn't really matter, no need to worry about it
I did try that too
but I feel like it looks odd
the rounded corners probably are part of why, and I could make them square.. but, eh
I want a distinct border
margins help with that
this is probably best
looks a bit weird
mkay
I think I agree
okay, sticking with the one you replied to there then
now to write some code to make it actually work
could use an approval on sir-lancebot#1026
oh it's down rn
PR above fixes the reason why it's down though
approved.
thanks!
https://github.com/farzher/fuzzysort might use this library for fuzzy matching
seems nice
@crude gyro the two scoops for django link is pointing to a 404 site. probably wanna switch the url to https://www.feldroy.com/books/two-scoops-of-django-3-x
Feldroy is a small indie publisher of technical and fiction books.
when im done with a web project here involving a lot of flask/css/js im gonna start reading it and dive into the world of Django 🙂
good call
I'm revisiting the rearchitecture of the infraction system I started a while ago, though I'm not hard-set on the idea that it will ever be completed, let alone merged into main. Though it occurs to me that even if there's a class for each type of infraction, since they aren't cogs, they can't get self.bot.anything. https://paste.pythondiscord.com/xixatobifa.py
On the flip side, the way I've written it, I think this is all the additional code that's needed for warnings and notes to exist
class ShadowInfractionMixin:
@t.final
async def notify_infraction(self):
"""Causes the notify_infraction method to do nothing"""
pass
class Warn(Infraction):
pass
class Note(ShadowInfractionMixin, Warn):
pass
naw. I like it with margins.
the bot instance is a global under the bot package
just, from bot import bot?
bot/__init__.py line 31
instance: "Bot" = None # Global Bot instance.```
so probably import bot and then bot.instance as instance alone doesn't tell you much about what it is
why does Note inherit from Warn?
aren't notes currently pretty much silent warnings?
kind of, but it looks like a Warn is just a bare Infraction anyway
tbci dont even know how it's currently implemented, i was just curious
you ever see mine? maybe compare notes, that sort of thing https://paste.pythondiscord.com/tadokineva.py
Haven't touched this in over a year though probably
@tawdry vapor I haven't seen this, but it looks like you were taking a similar approach
warnings don't have any unique behavior, and any time the string warn is needed, it's inferred from the name of the class.
and then notes are just warnings that don't send a DM.
though it also occurs to me that I wanted to make warnings "fail" (not get entered to the database) if they're issued in a mod channel but the infractee has DMs off, since that undermines the whole point of the warning.
in fact, that was what inspired all this... 
I'm planning to solve this with a different approach #mod-announcements message
my way is better. (<-- this is not a serious message)
it's either Stel's way or the highway
@trim cradle sorry just saw that you requested a review from me, not sure why i didn't get a notif about it earlier
would a re-work allow for better customized layouts of !infr search results? in essence, allowing us to only see the relevant fields per infraction type. for notes for example things like duration, expiry, shadow, dm sent are all irrelevant
From what I remember, it doesn't really need a rework
The formatting code would have to get changed to be a bit more modular
But that's about it
It is doable with the current code, and in a clean manner
that's okay, I just added a new commit. as I recall you like giving input on wording-related things.
There's nothing blocking such changes now, the code is just pretty messy
oic
Is there a way to make bot commands without writing out literal function definitions?
command_stuff = [
(('ban', 'kick'), (UnambigousMemberOrUser, Optional[Expiry], Optional[str]), some_func),
(('mute',), (UnambigousMemberOrUser, Optional[Expiry], Optional[str]), some_other_func)
]
for aliases, signatures, func in command_stuff:
register_command(aliases, signatures, func)
I think what the decorator does is pretty much creating a Command instance so you can try that
may have to edit the annotations directly for the converters, not sure if there's a direct way for it
Here's your reminder: See referenced message.
[Jump back to when you created the reminder](#dev-contrib message)
sir-lancebot#778
;-;
You mean for colours? Those still aren't supported on mobile yet, and I believe it actually shows the literal characters rather than just not colouring it. So, it looks pretty awful.
Unrelated, this is ready for review now that GH Actions has fixed local workflows for PRs https://github.com/python-discord/snekbox/pull/133
Website related stuff:
They are separate. They're different django apps.
They just live in the same repo. What would be the benefit of doing otherwise?

Sorry I'm dumb I can't read Django yet
Oh yeh not separating it in repo would make ui testing hard?
URL updating as I type into the search bar looks cool
basic search is working. gotta iron out some bugs and make it more beautiful.
it's more or less instantaneous, updates results for every character typed.
right now it only searches the name of the resource, considering whether to let it search the description too.
I'm thinking it would give a lot more false positives if we did that, though.
since the search is quite fuzzy
although I can adjust the fuzziness thresholds..
the fuzzyness also gives it pretty good matches for search queries with typos
now showing a tag when a search is active.
although alignment is for some reason a bit out of whack.
will fix
lemon this is so great
the X on the right side, is that new? is that for like, clear all filters?
yep!
Hello <@&295488872404484098> and <@&587606783669829632>. I'd love some feedback on the new resource search feature!
You can play with it here: https://deploy-preview-660--pydis-static.netlify.app/resources/
The pull request is here if you wanna review it: https://github.com/python-discord/site/pull/660
We're a large, friendly community focused around the Python programming language. Our community is open to those who wish to learn the language, as well as those looking to help others.
Forms is a different project altogether.
It is a website, but it performs a far different function than the main site.
It's stack is also different, the frontend being a React app and the backend being a FastAPI site, rather than a full Django project.

Sesnsb
I was gonna explain what I thought but I don't know 
Basically you helped me realize that
Api is just like a function waiting to be called and forms is the call
And frontend is just frontend
Is there a documentation for the site?
Like why is it like that, what's the general design
the 2 forms repos are completely separate from the site repo as far as I know
site repo is basically for our website pythondiscord.com with some postgres stuff related to the discord server
forms repos (as far as i know) are for making one-time webforms. so far it's been used for the giveaway we did last year, as well as a couple internal staff forms
Does anyone else have issues opening this link? https://github.com/python-discord/bot/pull/1961/files
it initially opens fine for me, but actually loading all of the content makes my browser OOM
IE if you scroll down you'll see the whole page hasn't loaded
opening while logged out is fine though
huh
was laggy for a bit when loading but works fine othewise
I wonder if it's only going to be bad for people with merge perms to the branch then
since it's fine for me when I log out
That would mean it would be tied to all of the suggestions
@cold island I see you are here 👁️
could you try and reproduce if you have a chance?
could you try to open that link logged in and then logged out of github?
can reproduce
yeah same
that's highly annoying
yeah haha
guess I'll have to comment via the conversation tab lol
It managed to load everything after a minute or two
hmmm
guess I'll just leave the tab open and hope for the best
hopefully 16 gigs of ram is enough
otherwise I'll need to head over to desktop lol
Awesome, thank you 😄
They just keep coming, did you add the comments one by one 😅
yup, files changed tab isn't loading
so you get them 1 by 1
😄
well, it is loading now
just the slowness that's the problem lol
unfurl
Hm, we probably shouldn’t have rebased like that
It messes the history worse than a couple merge commits
We've narrowed down the issue to be caused by having write perms to the branch and there being lots of suggestion comments
how so?
There’s a bunch of false history now with you being a committer to every single commit, despite that not being the case in reality (technically is), which is more confusing than a single “merged main into branch x”
And how does it play with review bot now that you’ve committed to the PR
well, I'm going to be comitting more, so I'm going to be blocked from policy bot regardless
yeah I also prefer merge commits
hmm, I've always preferred rebasing, since the merge conflict changes are easier to see
otherwise they're lost in one huge merge commit diff
Not on GitHub afaik?
One sec I’ll get an example
Here's a merge commit with no conflicts:
https://github.com/python-discord/bot/pull/2052/commits/b9df3f2ba73c12cd0b4f32e3007bd6bdc9944fd1
Here is a merge commit with conflicts:
https://github.com/python-discord/bot/commit/5dcaea7eb760c1eb65208437c5484f430e0bfe16
Only the conflicts are displayed if there are any
oh interesting
I've never viewed in github, only ever used cli for looking at diffs
but this does seem nicer
I think my IDE does the same thing, but I don't particularly use git directly from the CLI
Anyways, it's not a big deal, but we should discuss a more formal policy on the matter sometime
We can then block the other option
is the commiter a problem? I usually merge as rebases can be a pita if a conflict comes up in some piece of code with more commits, but I don't really see an issue with the rebase
Yea, I like using rebase since it make squashing after the fact easier
but I admit it's likely not to happen on this branch
When looking through the history at a glance, I find the rebase commits to be confusing, because the date, authors, and sometimes messages depending on who does the rebase are changed from what they were
Making it a little unclear what had actually happened
since sqaushing to a commit before a merge commit will rewrite the commits in the merge commit
I don't mind rebasing, but it's nice to see who did what, and force pushing makes a mess in a PR
Merge commits do add noise to the history, but I think rebases do too, and our history is mostly far gone anyway
Yea, i don't mind going with merge commit some times, but I wouldn't want to block rebasing entirely
since sometimes I want to get my branch up to date with main, but don't want to block myself from squashing to those previous commits in future
I mean, is it even possible to disable rebases? We'd need to disable force pushes lol
Yea, you can disable merge commits, or disable forcepushes
If we make a decision, it'll be about general SOP, then devs can use their better judgement
ye
I don't mind using a merge commit here btw, if you want to force push your local changes
Not really, and I don't think I had any worthwhile changes either way
I did get the page to load, but I had to leave it frozen for a while
I know this page used to work, even after all the comments, so this has to be a recent update in something
yea, must be
couldn't find anything with lazy googling
Raised a ticket with github support anyways
Tiny diff, pls approve bot#2082
i ran over to my laptop to approve but alas, i was too late
hah
@vale ibex i managed to get the whole page to load: temp fix is turn this off for each edited file
but the comments are the things i want 😅
I can survive on the conversation tab for now, since it gives what I need
yes but then once you have it off and all of them like this you can turn it back on for the one file at a time
but it also means I need to reply one by one, rather than build reviewing
hmmm true, I'll see if that works
legit the lag stopped when i turned it off of the first one 🤔
which had no tags whatsoever
lol I turned off the first one and then by the time I got to the second the tab froze and crashed
You also don't have write perms to the source branch, so I don't think you're seeing the same issue
ah
Since it works completely fine if I sign out of github
@cold island @vale ibex@gritty wind
A good rule of thumb is to rebase at any point before you create the PR, and to try to avoid rebasing after a PR has been created, and especially after you've received reviews.
rebasing after a review can really mess things up
but before then, it has practically no impact on anything other than to keep things nice and tidy
I would hate for us to block rebases altogether
I use them very actively
but usually before the PR is opened
not having that option would mess up my entire workflow
We wouldn't block rebases, my suggestion is to only allow merge commits when it's on github (aka the PR has been created, so the same as what you're saying)
We already advise against force pushes post PR, so this is mostly in line with our existing policy
that feels fine to me, but is it possible?
What about squashing before merge?
yeah I agree
I say it depends on the content
If it's a large PR with many changes where the commits mean something, no
If it's just 3 commits changing one text file, with 2 being lint fixes
Squash away
fwiw I'm not talking about the squash & merge button in github
I'm talking about fixup commits etc
right, yeah, that's part of my normal workflow
I don't think we can actively block it beyond disabling force pushes, but it's just a matter of what we want to make our policy
disabling force pushes to all branches means it could affect branches that haven't yet been opened as a PR, though
Since fixup commits are something I do quite often during reviews and then rebase to squash the down into the relevant commit
yeah me too
We don't ban force pushes in general, just ask people to use them wisely
and using merge commits means you can't squash a fixup to a commit bnefore the merge
Wouldn't want to disable them all together anyway
since it rewrites the commits in the merge
that seems reasonable. People definitely should use them wisely.
Well, not people
Our policy is don't force push unless you get approval from a core dev
so core devs really
is it?
We had a vote on it a while back, let's see if we put out an announcement
first I'm hearing of it
seems totally silly to me if we're talking about force pushing to your own local branch.
I force pushed quite a bit when cleaning up, never asked anyone and never had anyone complain
Actually it might be in our contrib guides
The reasoning behind it is to prevent people who don't know what they're doing from making life harder on others, I think you mostly know what you're doing
it looks like @stable mountain's embed when linking from GitHub is not guarded from escaping ```? ( see #sir-lancebot-playground )
there's quite a few lines to guard from escaping backticks, but perhaps someone found a way around it
hah nice, not a huge bug though, since we use allowed_mentions, something we should solve though, thanks 😄
before allowed_mentions, this would've been an all-out disaster
I see they already tried to ping everyone
yea, for sure
ez bypass n0ob
hahaha, wow.
xD
you must be new here
i think those checks are only for eval command
allowed_mentions is restricted/ turned off by default, I'd assume
:incoming_envelope: :ok_hand: applied mute to @clever wraith until <t:1644766876:f> (9 minutes and 59 seconds) (reason: discord_emojis rule: sent 40 emojis in 10s).
seems you clowned yourself, @clever wraith
lol
okay let's clean this up.
!tempmute @clever wraith 2D we don't call people noobs here.
:incoming_envelope: :ok_hand: applied mute to @clever wraith until <t:1644939174:f> (1 day and 23 hours).
!ban 940910003525681202 spamming clown emojis to me via DMs in some sort of celebration that they figured out a minor bug in our 20,000 LOC bot
:incoming_envelope: :ok_hand: applied ban to @crimson fable permanently.
20,000? damn nice lol
Can't find an announcement about the force push policy, so for now work under the assumption that we don't have one
I used to have a plugin for jetbrains which counted how many lines you had in a project, but that stopped getting updates unfortunately
We can check online though
theres an extension in vscode to check how many lines a project has.
very nice
Can we please have a cmd where it adds a backtick to the code?? I can't find the one on my keyboard
||shame intensifies||
Colemak on a apple keyboard that is connected to a tablet which is a Google keyboard
Here's a ref for some common layouts, not sure if this helps https://superuser.com/questions/254076/how-do-i-type-the-tick-and-backtick-characters-on-windows/254077#254077
Otherwise you could just copy/paste it from online like at https://www.fileformat.info/info/unicode/char/00b4/browsertest.htm
should be possible to type with the alt code, too. hold left alt and type 96 on the numpad. might not work on all operating systems, though
Copying it is probably not convenient for something you might need frequently, but I find I need the backticks outside of discord too while programming, so I would figure it out
yeah, backticks are useful for stuff like template strings in js too
Alright thanks!
(Exactly where I got this link from 😉 )
were some messages deleted?
i read something about moderation and decisions and now its not here
that's a weird decision to make
No not really because mod discussions should technically be private (at least if I was mod I wouldn't want to publicly discuss mod actions)
eh, there's a lot of publicly visible ban messages, infraction count is accessible, etc
not discussion about the mod actions, usuallly
Its just... odd to delete a message that says use #helpers after its been visible, doesn't look that great
anyway, move on
all messages were deleted by their respective authors fyi. we can return to the channel topic (thanks vivek!)
lol that's even weirder, for different members (all staff to delete their messages) but i'll drop it... :3
anyone wanna trade a code review? I need a review for https://github.com/python-discord/site/pull/660, what do you need a review for? Let's trade!
Yes
I shall review but I don't have anything to trade for.
No no go away I was about to make the deal of a lifetime
hahaha
Lol
sir-lancebot#1022 needs reviews!
you should review too
yeah, the deal is good for all three of you!
I know next-to-nothing about Django
I'm a bit worried Mark is going to send me some unholy demonic monster PR though
Not really
then I'm happy to review. I've set aside the next 20 or so minutes to review whatever you guys send me.
It's a big diff but it's cause stuff is copied over. https://github.com/python-discord/snekbox/pull/133 it's CI this stuff is ezpz right :)
I gotchu
ty I'll review yours shortly
While we’re handing out reviews, check out my timeit PR 😄 https://github.com/python-discord/bot/pull/1602
one question lemon, what does this mean?
Fully reactive! ✨ Every keypress triggers a search.
Do you mean when you're clicked into the search box or just anywhere on the page?
specifically when you change the contents of the input
typing, removing stuff, copy pasting into it..
but only that specific input
i.e. the search field
the event handler is .on("input") for that input tag
is the search supposed show a 404 duck pond if there are no results found?
is the .on method a jquery thing?
oh that's right, it's not when I go here: https://deploy-preview-660--pydis-static.netlify.app/resources/?search=discorbdasg
will fix, nice find.
It does with normal filters (e.g. https://deploy-preview-660--pydis-static.netlify.app/resources/?type=podcast&payment-tiers=paid), just not search (only)
it does it with filters + search too, because I specifically implemented that
so the edge case is search but no filters
but I can imagine why that happens
should be easy to solve
show ducks if fuzzysearch returns 0
If you add a filter and it shows the duck pond and then you type something it also disappears
another interesting edge case. noted.
thanks for sharing
I enjoyed reviewing it
I've given this a review too, approved. ✅
Yep, I saw, thanks
Thank you. Reusable workflows are pretty cool. Cutting edge stuff, really.
yeah! I mean I'm doing reusable workflows for work, since CI/CD is a huge part of what my department does
we're also doing custom github actions and working very hard on the best possible developer experience for the different product teams
They just fixed this a few days ago https://github.com/github/feedback/discussions/10679#discussioncomment-2146119
Reusable workflows when triggered are failing with this parse error The workflow is not valid. [my-org]/[my-repo]/.github/workflows/reusable_workflow.yml@[git-sha]: Expected document start parse ev...
They had finally released locally referenceable re-usable workflows, like the templates feature I missed from Azure. But it was broken for CI triggered by PRs and took them a few more weeks to fix
but I haven't seen this needs.build.outputs.tag kind of thing before and that's incredibly useful. Maybe it's been around for a bit but it's new to me.
yes, I've been waiting for this, too
great news that it's been fixed!
Also, since you asked and we're here, have a read through this in your spare time https://coderwall.com/p/fkfaqq/safer-bash-scripts-with-set-euxo-pipefail
excellent, will do.
There is also an excellent comment at the bottom about shopt -s inherit_errexit
Well bash scripts have quite bad default behaviour IMO, so these options are a bare minimum for any script that's more than a single command in length
np I dropped you a review as well
It's surprising how cool it looks given the relatively small amount of code changes
I think it's cause auto updating interactive stuff is just fun to look at
yeah! and fun to code.
of course, fuzzysort does some of the heavy lifting
and it helps that I'm just expanding on some code I already wrote, improving on it slightly, sticking with the same approach. Helps minimize the amount of code dramatically.
@tawdry vapor this one, to me, just looks unprofessional. But I really hate titlecase for almost anything.
it just looks so Download My Favorite Songs On Napster In 2001 to me
I don't feel strongly about it. It just looked off to me
does anyone else here have an opinion? It's the difference between this:
and this
also worth noting that we do the same down here
..but the filters themselves have titlecase all over the place.
it's a bit inconsistent.
and the resources also consistently use titlecases
@tawdry vapor This one is interesting. What's your browser?
Firefox
To me that seems to be the better one, title case just looks symetric 😄
thread_update events are only triggered for cached threads
So on_thread_join is triggered on:
probably more too, but these are the relevant ones for now
also fixed an issue in the gino iterate calls which was causing some deadlocking
Very cool stuff
“Gnio iterate cells” >.>
I can’t begin piecing together what that means though
actually
the more I think about it, the less I think that's right still
async with db.transaction() as tx:
async for db_thread in tx.connection.iterate(Thread.query):
await db_thread.update(archived=db_thread.id not in active_thread_ids).apply()
I have a feeling that this update doesn't use the transaction
gino docs aren't too useful
at least not that I have been able to find so far
it might be better to do in 2 update queries
gino not being an orm mean sit isn't really designed to do this
everywhere suggests getting gino to run sqlalch queries
I can probably get it to work
Invalid workflow file: .github/workflows/main.yaml#L28
The workflow is not valid. .github/workflows/main.yaml (Line: 28, Col: 19): Invalid secret, KUBECONFIG is not defined in the referenced workflow.
Oh wrong chat
well
still wtf
Oh okay, this is just me not reading carefully. Working as expected.
@crude gyro
It was an original rule in the first draft of the contrib guidelines, but got scrapped later after some internal discussions. It was too controversial.
As far as I know, it never made into an official rule.
yeah ak just comfirmed that
I wonder if we still have draft somewhere on notion
It might have been lost
If I remember correctly there was a vote about it, around a year ago. Should be able to find it in the core dev announcement channel.
actually, this does work
.wa 243 - 8 - 2 - 124 - 10
yea, only in testing though
!e print(243 - 8 - 2 - 124 - 10)
@clever wraith :white_check_mark: Your eval job has completed with return code 0.
99
Is it
Okay that was a big net lag
What are the 99 missing channels lmao
Well y'all might wanna add it to that embed
Also @molten bough might wanna watch that PR
... Right, haha
because the enum entry for forum channel isn't supported
Ah, so it doesn't fall back to the regular thread behavior
so it's not cached, and causing an exception on fetch
@trim cradle merged https://github.com/python-discord/bot/pull/2072
Thanks ali
Y'all have access to forum channels?
Rare recent instance of partner testing before DMD testing I guess
The rust community server also has it
"fixed" by ignoring it
I don't think they are partnered, are they
I'd be surprised if they aren't haha
They are
I thought they'd be under the threshold
I guess they are lower than k thought
You can partner at like 500 members
It's just harder
But anyway we're going off topic haha
I've only been denied partnership 9 times 🥲
Rip
Lmao stop, we can't even get verified
admittedly twice was a server solely focused on the letter h where h is the only thing you can say
I somehow never thought that Quilt could get verified
h
Quilt meets the criteria but they can't believe that kashike is involved despite being owner of the official server and using a Quilt email and linking the twitter to his account
You love to see it
Okay, ot1
Neh I'm cooking, gonna peace out haha
Haha, fair
Discord: hey dmd and partners test this new feature
Lib devs: we can try this? to make features for bots?
Discord: smiles
Discord: releases feature
Lib devs: ... so you want us to develop this feature and push it as a release in like... a week?
@magic arch merged https://github.com/python-discord/bot/pull/2075
!int e print(bot.get_channel(942510511403175977))
In [1]: print(bot.get_channel(942510511403175977))
None```
!int e print(await bot.fetch_channel(942510511403175977))
In [2]: print(await bot.fetch_channel(942510511403175977))
Out[2]:
File "/bot/bot/exts/utils/internal.py", line 180, in _eval
res = await func()
File "<string>", line 5, in func
File "/usr/local/lib/python3.9/site-packages/discord/client.py", line 1495, in fetch_channel
raise InvalidData('Unknown channel type {type} for channel ID {id}.'.format_map(data))
discord.errors.InvalidData: Unknown channel type 15 for channel ID 942510511403175977.```
🙃
Fork time?
testing it on disnake and nextcord
@vale ibex my god I haven't looked at the bot's PRs for a while because of school, there was 29 when i started today
huh, wasn't the bot using 3.10? or only snekbox?
readies pypi push perms we'll see about that /s
snekbox is 3.10, bot is 3.9
I know, I saw Kord trying to support new discord features
Literally having to reverse engineer the client right in Quilt because having a test guild is apparently a no no
chris what're the chances I can get you to send me a forum channel object so I can implement it in nextcord 
I'll take that for Kord as well
it only involves screwing with discord.py internals because 2.0 removed the socket response event a little bit of code :)))
Oh also hey @thorny obsidian we started writing the docs for forms unit testing, normally we should have it by, let's say, max Wednesday
just want the dict()?
ah wait no, that won't work
https://github.com/python-discord/bot/pull/2083 needs review pls thanks
it's just removing one newline lol
tag speedrun so it only needs one approval :)
@vale ibex fyi I've left comments on bot#2045 and bot#2010. If you're able to, I'd appreciate responses tonight so I can work on them when I get to school tomorrow (in just under 12 hrs). No worries if you can't though, as they're not high-priority issues 👍
Amazing, thank you!
@vale ibex could you dm me those forum channel payloads, it would be really helpful
oh lol, send it to me too pls
!int e ```py
print(await bot.http.get_channel(942513478256713788))
In [2]: print(await bot.http.get_channel(942513478256713788))
{'id': '942513478256713788', 'last_message_id': '942513575493271552', 'type': 15, 'name': 'test', 'position': 0, 'parent_id': '749735995460550726', 'topic': None, 'guild_id': '267624335836053506', 'permission_overwrites': [{'id': '714562188236423278', 'type': 0, 'allow': '1024', 'deny': '0'}, {'id': '267624335836053506', 'type': 0, 'allow': '0', 'deny': '1024'}], 'nsfw': False}```
@fallen patrol @fervent sage
.bm
hmmm, possible to get the http payload of a thread on it as well?
!int e ```py
print(await bot.http.get_channel(942538360231186513))
In [3]: print(await bot.http.get_channel(942538360231186513))
{'id': '942538360231186513', 'guild_id': '267624335836053506', 'parent_id': '942513478256713788', 'owner_id': '126811506632294400', 'type': 11, 'name': 'foo', 'last_message_id': '942538370142306334', 'thread_metadata': {'archived': False, 'archive_timestamp': '2022-02-13T21:50:56.595000+00:00', 'auto_archive_duration': 4320, 'locked': False, 'create_timestamp': '2022-02-13T21:50:56.595000+00:00'}, 'message_count': 4, 'member_count': 2, 'rate_limit_per_user': 0, 'member': {'id': '942538360231186513', 'flags': 1, 'join_timestamp': '2022-02-13T21:50:56.799000+00:00', 'muted': False, 'mute_config': None, 'user_id': '409107086526644234'}}```
ty ty
also if you have questions about disnake or nextcord respectively, me and vco can answer them
lmfao yea
actually I can answer some of both tbh
mostly disnake tho
.bm get all issues I've commented on
Does it actually work
I would've thought it wouldn't be in the cache and things would break
it did work
funny api thing I learned which actually means I've written some code that will never ever fire
api returns the resolved message in that reply
That's.. unusual
nice ty!
yeah, but it makes sense
it won't always provide it either
I now have three abstract classes in my rewritten infraction system dreamscape. And I wonder if this would actually make the system easier to understand, or just change the way in which it's difficult to understand 
Ok so I opened this issue
but how do I add new python modules to a project?
mm yeah
Yeah it’s because discord is called discord.py
Is your VSC running the same environment as your terminal?