#dev-contrib

1 messages · Page 167 of 1

magic arch
#

how do we create Tim’s repo?

vale ibex
crude gyro
#

@magic arch keep up, I already answered that

vale ibex
#

heck ye

crude gyro
#

veeery cool

magic arch
#

omg finally

magic arch
crude gyro
#

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

crude gyro
#

nice @spare plaza, starting to look dark themey

#

not 100% sure about the colors, but I'm guessing they're not final.

magic arch
hoary haven
#

no we will have to poll between 100,000 color combinations

crude gyro
#

god I hope not

hoary haven
#

blurple is kind of hard to pick nice dark colors for for some reason

crude gyro
#

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

hoary haven
#

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

crude gyro
#

true

hoary haven
#

for some comparison
discord versus github dark dimmed

crude gyro
#

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.

vale ibex
#

he's currently screen sharing it with us lol

spare plaza
#

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

#

Also some links turn black on hover

slim widget
#

Someone pointed it out in python-general, just passing the message along.

hoary haven
#

i can't find the message now, but discord seems to be fitzzing out. may be related

thorny obsidian
#

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.

fallen patrol
#

oh, i misunderstood mina thinking that she couldn't see the linked message 🤦‍♀️

hoary haven
#

yeah haha it was smth in an alert channel that i saw
did you reply to me twice? or is that discord's doing

short snow
#

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

fallen patrol
gritty wind
#

Hey could I get a contrib review on bot#2074?

dusky shoreBOT
gritty wind
#

It’s literally just deleting the file, this is more of a formality

crude gyro
spare plaza
#

Ah, I'll take a look into how I broke it. Mostlikely due to the switch / new button in someway

#

Ty

stable mountainBOT
#

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```
patent pivot
#

yeah we probably should have done that

#

deleting and re-adding feels messy

molten perch
#

I was under the impression that it's gonna be reworked a bit.

clever wraith
#

adding a warning and an early return in setup could also be a valid solution

#

it doesn't mess the Git history this way

gritty wind
#

@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

clever wraith
#

I mean I joined back like 15 minutes ago haha

#

I didn't know this PR existed

fallen patrol
#

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

gritty wind
#

Lol it's not a big deal

patent pivot
#

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

clever wraith
#

is pydis still manually adding domains to the scam list?

clever wraith
#

is there a reason for not using lists such as sinking yatchs?

#

do y'all even have someone in the phishing server

patent pivot
#

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

fallen patrol
clever wraith
#

well sinking yatch is curated by the whole community and hacked domains are removed

patent pivot
#

it's nothing we'd never do

clever wraith
#

I mean, pydis could participate to the fish project and help curate the domains

patent pivot
#

it's just not something we've talked about or needed thus far

clever wraith
#

but yeah, I perfectly understand

patent pivot
#

but it's been mentioned, but all discussions will be internal

clever wraith
#

it is pretty much as efficient as the current system as everything is kept in memory

patent pivot
#

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

clever wraith
#

oh yeah, ak meant to look at safe browsing but never did lol

patent pivot
#

it's fairly alright

clever wraith
#

there is also fisherman

#

I think it integrates the fish project

patent pivot
#

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)

clever wraith
#

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

fervent sage
#

Good to know I'm low quality 🙃

obsidian patio
#

This PR has 3 approving staff reviews. Just needs a core dev to approve and merge

dusky shoreBOT
patent pivot
# fervent sage Good to know I'm low quality 🙃

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

fervent sage
#

I only use upside down ironically

patent pivot
#

ahh okay, just making sure 👍

fervent sage
#

but yeah I don't have hard feelings I was just being self deprecating for lols

patent pivot
#

good good hahahha

cursive relic
#

when you type !guilds it shows an embed with hyper link "communities page" but the page looks like this

vocal prairie
cursive relic
#

embed needs an update I guess

#

also, when you try to use !src guilds it sends into invalid page

vocal prairie
#

ah right, that link is missing a /bot/ in the middle

cursive relic
#

does this need an open issue for this or nah?

stable mountainBOT
#

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.

sleek steppe
#

It seems to redirect /resources/communities but not /pages/resources/communities

crude gyro
#

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 ?

spare plaza
crude gyro
spare plaza
#

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.
spare plaza
trail pilot
#

done!

austere hornet
#

Does anyone have an idea as to why lint is failing on sir-lancebot#1022?

dusky shoreBOT
patent pivot
#

yeah the files you've submitted have after the ?

#

you need to ensure the last character on each line is not whitespace

austere hornet
vocal prairie
#

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

austere hornet
#

Ok I fixed it thanks @patent pivot and @vocal prairie !

brazen charm
#

noticed bot#1641 when going through some old notifications, any updates on that?

dusky shoreBOT
molten perch
#

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.

late tree
#

Hiii

#

Looking forward to work on the beginner projects

#

Sooo

#

Where do i strt?

dim pelican
#

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

late tree
#

Disclaimer
Ik Intermediate python programmin

#

Will tht be an issue for me?
Although I learned CPP before Python

dim pelican
#

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

late tree
dim pelican
#

Yeah the site is using django

late tree
#

Nice

#

Where's the src code

#

For lancelot

dim pelican
#

!src

stable mountainBOT
dim pelican
#

Wait

#

.src

dusky shoreBOT
late tree
#

I am new to github

#

Plis help me out

dim pelican
#

Alrighty, what issues are you running into?

late tree
#

Ahhh
Isn't the python ext .py

dim pelican
#

Yes

late tree
#

Also y is there Dockers
Thts a web cloud computing thingy

late tree
dim pelican
#

We use Docker to have a uniform environment for us to all use

late tree
#

Ohhhhhhhhh

dim pelican
#

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

late tree
#

Ohhh

#

I see

#

Just found the src files

#

Thx

#

Soo we just try to resolve all the bugs and issues ryt?

dim pelican
#

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

late tree
#

Oh
Okay

#

Can i collab with someone

dim pelican
#

If you find someone willing

late tree
#

How abt u 🥲

dim pelican
#

I'm not looking to collab at this time as I have other projects on my plate

late tree
#

Oh okay

#

But can i ask for ur help

#

?

dim pelican
#

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

spare plaza
crude gyro
#

that sounds accurate. the tag brings in everything

molten bough
#

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

spare plaza
#

i'll make an issue on that repo explaining it, if you agree

crude gyro
molten bough
#

All good, then o7

crude gyro
#

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

crude gyro
#

are you thinking that you'd separate the css and the js imports into two different tags?

spare plaza
#

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

crude gyro
#

does disabled=true attributes work for link tags?

#

maybe django-simple-bulma could even include some JS to swap the active theme

spare plaza
#

that is how i'm switching

brisk brook
#

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?

molten perch
brisk brook
#

Yes if 100 people assign themselves to one group, the bot will send a message with 100 pings.

molten perch
molten perch
brisk brook
#

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?

molten perch
brisk brook
#

Yes I'll create an issue either way so that it can be tracked

rapid swallow
#

didn't mean to ping, sorry

brisk brook
#

That's fine

wind ruin
#

isn't it better to just have a Thread with the interested people, then @ everyone in it?

brisk brook
#

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

wild prism
#

i think @ here would work

brisk brook
#

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.

patent pivot
#

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

brisk brook
#

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

patent pivot
#

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

green oriole
#

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

fallen patrol
#

and a message flag

#

because discord

#

FAILED_TO_MENTION_SOME_ROLES_IN_THREAD 1 << 8 this message failed to mention some roles and add their members to the thread

fervent sage
# fallen patrol 👀

just made a thread in NC, edited a message to contain help thread auto add, and it added everyone; nice

fallen patrol
#

i will make a pr right now brb

fervent sage
fallen patrol
#

actually nvm cba

cursive relic
#

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

fervent sage
#

i think blob changed to tree which causes the second issue

stable mountainBOT
#

bot/exts/info/source.py line 72

url = f"{URLs.github_bot_repo}/blob/main/{file_location}{lines_extension}"```
fervent sage
#

@gritty wind would it be ok if I make a quick PR to fix that for bot and lance ^^

gritty wind
#

There already is a PR for it

#

But no that’s not the cause

#

Otherwise the entire source command would break

#

!src help

stable mountainBOT
#
Help Command

An interactive instance for the bot help command.

Source Code
fervent sage
#

oh

#

guess I'm just stupid lol

gritty wind
#

No PR yet actually, but the issue and cause are described in bot#2022

dusky shoreBOT
static canyon
#

!src with

stable mountainBOT
static canyon
#

The link just isn't correct

#

The link is /blob/main/resources instead of /blob/main/bot/resources

gritty wind
#

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

static canyon
#

Ah right

gritty wind
#

So it can break after a restart

static canyon
#

👍

summer garden
#

!resources

stable mountainBOT
#
Resources

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

cursive relic
patent pivot
#

if you're going to update one, make sure to update !tools and all other tags that point to the old resources page

cursive relic
#

There are more than just few that needs to be fixed on?

patent pivot
#

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

cursive relic
#

I might not be able to do that in this case, but if no one else does I can try doing it

stable mountainBOT
#
Sorry, your reminder should have arrived earlier!

Here's your reminder: nump docs fixed?
[Jump back to when you created the reminder](#dev-contrib message)

#
Sorry, your reminder should have arrived earlier!

Here's your reminder: bonk joe for member stats
[Jump back to when you created the reminder](#dev-contrib message)

patent pivot
#

lol

trim cradle
#

Who's the user who has been asking about bot#2079?

dusky shoreBOT
sleek steppe
crude gyro
#

old resources mostly already redirect to new, there's just one or two exceptions that were missed

patent pivot
#

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

stable mountainBOT
#

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.

patent pivot
#

!tools

stable mountainBOT
#
Tools

The Tools page on our website contains a couple of the most popular tools for programming in Python.

patent pivot
#

Oh tools works, nevermind

#

Guilds doesn't though yeah

sleek steppe
#

The guilds tag uses /pages/resources/communities, we don’t handle that case

trim cradle
#

fills the width:

#

shrinks:

#

seems to happen any time we filter down to one resource

thorny obsidian
trim cradle
#

I find that confusing, but I'm very much not a web developer. is this something we can "fix"?

last patio
#

@crude gyro@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%

last patio
#

thank you lemon

#

I have no idea how you fixed that in sixty seconds

crude gyro
#

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.

last patio
#

thank you lemon

vale ibex
#

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

placid ermine
#

typevar

T = TypeVar("T")
def deco(func: Callable[[...], T]) -> Callable[[...], T]:
    def inner(...) -> T:
        ...
vale ibex
#
    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

placid ermine
#

yeah

vale ibex
#

kk

#

thanks 😄

placid ermine
#

if it was 3.10 youd use ParamSpec for the parameter types

#

are any of our repos on 3.10 yet pithink

vale ibex
#

not yet I don't think

#

bot#1879

dusky shoreBOT
vale ibex
#

currently blocked on hiredis-py

brazen charm
vale ibex
#

Ah right

brazen charm
#

Not sure if there's any generic version of that

vale ibex
#

Yea, me neither

trim cradle
#

that one works too.

vale ibex
trim cradle
#

my disappointment is immeasurable.

#

@crude gyro put this pointless command on the backburner; we need a rickroll

vale ibex
trim cradle
vale ibex
#

lemon is always a step ahead

trim cradle
#

yay

#

also that URL with the non-alphanumeric characters worked, though we can also use a regex to pre-emptively remove those.

sleek steppe
placid ermine
#

any updates 😅

cold island
#

oops, have been really busy and it slipped my mind 😅 will send one now

placid ermine
#

no worries haha

cold island
#

sent

green oriole
gritty wind
#

Gotta love it

magic arch
#

It does omg, good job Discord

hoary haven
#

lmao

magic arch
#

Doesn't even do anything on click on desktop

thorny obsidian
#

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

placid ermine
#

will bot.get_user(id) work in a cog's on_ready
or do i need to use fetch_user

sleek steppe
#

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

placid ermine
#

👍

#

do you mean bot.wait_until_ready() or bot.wait_until_guild_available()?

#

im guessing its the latter

sleek steppe
#

yeah the latter, my bad

fallen patrol
fallen patrol
#

you said you're using a cog's on_ready

placid ermine
#

not anymore

#

friendship ended with on_ready
wait_until_guild_available is my new best friend

fallen patrol
#

okay good, you shouldn't be using on_ready

#

where are you using wait_until_guild_available tho

placid ermine
#

in a coro which i schedule in __init__ with self.bot.loop.create_task

fallen patrol
#

👏

#

very nice, ty

placid ermine
fallen patrol
#

smh i don't want to write it out again

#

just a sec

fallen patrol
#

see warning there

#

applies to dpy as well so shrug

placid ermine
#

'ight

#

ic

#

also pycharm not warning me for not awaiting coroutines is really pissing me off

fallen patrol
#

lol

vale ibex
gritty wind
#

Put awaits in front of everything

#

See what complains

clever wraith
#

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!")
cursive relic
#

Should the !unsubscribe be removed from this, it doesn't seem to be valid command anymore. #roles message

clever wraith
#

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.

vale ibex
#

Since that command allows you to do both

cursive relic
#

makes sense

crude gyro
#

I'll take care of this one, thanks.

crude gyro
# trim cradle fills the width:

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.

crude gyro
trim cradle
#

What even is kaizen. Is it the same as kaizer?

vale ibex
#

sino-japanese for improvement

#

the idea of improving things "while you're there"

trim cradle
#

Sino Japanese

#

That's not a language family

vale ibex
#

🤔

trim cradle
#

Even people who think that japanese and Turkish are related agree.

#

(that's a real theory)

vale ibex
#

interesting

crude gyro
#

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.

crude gyro
#

thinking I'll stick the search bar here

vocal prairie
#

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?)

cold island
#

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

crude gyro
#

maybe that's resolved by changing the placeholder text

cold island
#

yeah, that might be good

crude gyro
#

like, this helps. there may be a better text though

cold island
#

just "Search Resources"?

crude gyro
#

why titlecase

cold island
#

idk 😅

crude gyro
vocal prairie
#

yeah, sorry

crude gyro
#

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

vocal prairie
#

I also wouldn't mind it taking up the full width

#

But it doesn't really matter, no need to worry about it

crude gyro
#

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

vocal prairie
#

got it got it

#

yeah, that looks worse than your original version

cold island
crude gyro
#

not this?

#

where its side margins line up with the filter

cold island
#

looks a bit weird

crude gyro
#

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

trail pilot
#

could use an approval on sir-lancebot#1026

#

oh it's down rn

#

PR above fixes the reason why it's down though

crude gyro
#

approved.

trail pilot
#

thanks!

crude gyro
#

seems nice

somber swallow
crude gyro
#

damn good book

somber swallow
# crude gyro damn good book

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 🙂

crude gyro
#

good call

trim cradle
#

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
crude gyro
#

naw. I like it with margins.

brazen charm
trim cradle
stable mountainBOT
#

bot/__init__.py line 31

instance: "Bot" = None  # Global Bot instance.```
brazen charm
#

so probably import bot and then bot.instance as instance alone doesn't tell you much about what it is

wild prism
#

why does Note inherit from Warn?

brazen charm
#

aren't notes currently pretty much silent warnings?

wild prism
#

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

tawdry vapor
#

Haven't touched this in over a year though probably

trim cradle
#

@tawdry vapor I haven't seen this, but it looks like you were taking a similar approach

trim cradle
#

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

cold island
trim cradle
#

my way is better. (<-- this is not a serious message)

rapid swallow
#

it's either Stel's way or the highway

wild prism
#

@trim cradle sorry just saw that you requested a review from me, not sure why i didn't get a notif about it earlier

hoary haven
#

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

clever wraith
#

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

trim cradle
cold island
hoary haven
#

oic

trim cradle
#

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)
brazen charm
#

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

stable mountainBOT
#
It has arrived!

Here's your reminder: See referenced message.
[Jump back to when you created the reminder](#dev-contrib message)

fallen patrol
#

sir-lancebot#778

dusky shoreBOT
fallen patrol
#

;-;

tawdry vapor
#

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.

wooden axle
#

Website related stuff:

  1. Why don't we separate frontend from backend? In website
  2. why are some forms in other repo's?
tawdry vapor
#

They just live in the same repo. What would be the benefit of doing otherwise?

wooden axle
#

Sorry I'm dumb I can't read Django yet

wooden axle
crude gyro
#

URL updating as I type into the search bar looks cool

crude gyro
#

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

crude gyro
#

now showing a tag when a search is active.

#

although alignment is for some reason a bit out of whack.

#

will fix

last patio
#

lemon this is so great

#

the X on the right side, is that new? is that for like, clear all filters?

crude gyro
#

yep!

crude gyro
#

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

GitHub

Implements a search feature on the resources page

Features

Uses fuzzysort to do fuzzy matching against resource titles.
Fully reactive! ✨ Every keypress triggers a search.
Updates the URL to matc...

vocal prairie
#

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.

wooden axle
vocal prairie
#

Err, which part of that was confusing?

#

I'm not the best at explaining.

wooden axle
#

Sesnsb

#

I was gonna explain what I thought but I don't know yert

#

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

hoary haven
#

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

vale ibex
#

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

brazen charm
#

was laggy for a bit when loading but works fine othewise

vale ibex
#

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?

vocal prairie
cold island
#

yeah same

vale ibex
#

that's highly annoying

vocal prairie
#

yeah haha

vale ibex
#

guess I'll have to comment via the conversation tab lol

cold island
vale ibex
#

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

cold island
#

lmfao

#

16 gigs is all I have

vale ibex
#

rebased it onto main, going to action some of the comments

#

maybe all, who knows

cold island
#

Awesome, thank you 😄

gritty wind
#

They just keep coming, did you add the comments one by one 😅

vale ibex
#

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

gritty wind
#

What PR is this

#

Ah ofc

vale ibex
#

unfurl

gritty wind
#

Hm, we probably shouldn’t have rebased like that

#

It messes the history worse than a couple merge commits

vale ibex
#

We've narrowed down the issue to be caused by having write perms to the branch and there being lots of suggestion comments

gritty wind
#

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

vale ibex
#

well, I'm going to be comitting more, so I'm going to be blocked from policy bot regardless

cold island
#

yeah I also prefer merge commits

vale ibex
#

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

gritty wind
#

Not on GitHub afaik?

#

One sec I’ll get an example

#

Only the conflicts are displayed if there are any

vale ibex
#

oh interesting

#

I've never viewed in github, only ever used cli for looking at diffs

#

but this does seem nicer

gritty wind
#

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

brazen charm
#

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

vale ibex
#

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

gritty wind
#

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

vale ibex
#

since sqaushing to a commit before a merge commit will rewrite the commits in the merge commit

cold island
#

I don't mind rebasing, but it's nice to see who did what, and force pushing makes a mess in a PR

gritty wind
#

Merge commits do add noise to the history, but I think rebases do too, and our history is mostly far gone anyway

vale ibex
#

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

gritty wind
#

I mean, is it even possible to disable rebases? We'd need to disable force pushes lol

vale ibex
#

Yea, you can disable merge commits, or disable forcepushes

gritty wind
#

If we make a decision, it'll be about general SOP, then devs can use their better judgement

vale ibex
#

ye

#

I don't mind using a merge commit here btw, if you want to force push your local changes

gritty wind
#

Not really, and I don't think I had any worthwhile changes either way

vale ibex
#

chrome just is having a bad time

#

this is leaving it load

gritty wind
#

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

vale ibex
#

yea, must be

#

couldn't find anything with lazy googling

#

Raised a ticket with github support anyways

#

Tiny diff, pls approve bot#2082

dusky shoreBOT
sullen phoenix
#

i ran over to my laptop to approve but alas, i was too late

vale ibex
#

hah

fallen patrol
#

@vale ibex i managed to get the whole page to load: temp fix is turn this off for each edited file

vale ibex
#

but the comments are the things i want 😅

#

I can survive on the conversation tab for now, since it gives what I need

fallen patrol
#

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

vale ibex
#

but it also means I need to reply one by one, rather than build reviewing

#

hmmm true, I'll see if that works

fallen patrol
#

legit the lag stopped when i turned it off of the first one 🤔

#

which had no tags whatsoever

vale ibex
#

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

fallen patrol
#

ah

vale ibex
#

Since it works completely fine if I sign out of github

crude gyro
#

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

gritty wind
#

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

crude gyro
#

that feels fine to me, but is it possible?

vale ibex
#

What about squashing before merge?

crude gyro
#

squashing before merge into main?

#

I would hate that.

#

destroys history

gritty wind
#

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

vale ibex
#

fwiw I'm not talking about the squash & merge button in github

#

I'm talking about fixup commits etc

crude gyro
#

right, yeah, that's part of my normal workflow

gritty wind
crude gyro
vale ibex
#

Since fixup commits are something I do quite often during reviews and then rebase to squash the down into the relevant commit

crude gyro
#

yeah me too

gritty wind
vale ibex
#

and using merge commits means you can't squash a fixup to a commit bnefore the merge

gritty wind
#

Wouldn't want to disable them all together anyway

vale ibex
#

since it rewrites the commits in the merge

crude gyro
gritty wind
#

Well, not people

#

Our policy is don't force push unless you get approval from a core dev

#

so core devs really

crude gyro
#

really?

#

where is that stated?

brazen charm
#

is it?

gritty wind
#

We had a vote on it a while back, let's see if we put out an announcement

crude gyro
#

first I'm hearing of it

#

seems totally silly to me if we're talking about force pushing to your own local branch.

brazen charm
#

I force pushed quite a bit when cleaning up, never asked anyone and never had anyone complain

gritty wind
#

Actually it might be in our contrib guides

gritty wind
wind ruin
#

it looks like @stable mountain's embed when linking from GitHub is not guarded from escaping ```? ( see #sir-lancebot-playground )

crude gyro
#

there's quite a few lines to guard from escaping backticks, but perhaps someone found a way around it

vale ibex
crude gyro
#

before allowed_mentions, this would've been an all-out disaster

#

I see they already tried to ping everyone

vale ibex
#

yea, for sure

clever wraith
#

ez bypass n0ob

crude gyro
#

hahaha, wow.

clever wraith
#

xD

crude gyro
#

you must be new here

clever wraith
rapid swallow
stable mountainBOT
#

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

crude gyro
#

seems you clowned yourself, @clever wraith

vocal wolf
#

lol

crude gyro
#

okay let's clean this up.

crude gyro
stable mountainBOT
#

:incoming_envelope: :ok_hand: applied mute to @clever wraith until <t:1644939174:f> (1 day and 23 hours).

crude gyro
#

!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

stable mountainBOT
#

:incoming_envelope: :ok_hand: applied ban to @crimson fable permanently.

gritty wind
#

20,000? damn nice lol

crude gyro
#

might be a bit high. I don't know

#

didn't do a count

#

is there an easy way to check?

gritty wind
#

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

somber swallow
gritty wind
#

28K according to

crude gyro
#

very nice

wooden axle
#

Can we please have a cmd where it adds a backtick to the code?? I can't find the one on my keyboard

crude gyro
#

haha, I'm not sure we should solve that with a command.

#

what's your keyboard layout?

wooden axle
#

||shame intensifies||
Colemak on a apple keyboard that is connected to a tablet which is a Google keyboard

magic arch
crude gyro
#

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

gritty wind
#

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

crude gyro
#

yeah, backticks are useful for stuff like template strings in js too

gritty wind
#

Yeah precisely

#

I think you can get them from the code embed

#

!code

#

A bit spammy

wooden axle
#

Alright thanks!

magic arch
fallen patrol
#

were some messages deleted?

#

i read something about moderation and decisions and now its not here

#

that's a weird decision to make

austere hornet
fallen patrol
#

eh, there's a lot of publicly visible ban messages, infraction count is accessible, etc

rapid swallow
#

not discussion about the mod actions, usuallly

fallen patrol
#

Its just... odd to delete a message that says use #helpers after its been visible, doesn't look that great

rapid swallow
#

anyway, move on

hoary haven
#

all messages were deleted by their respective authors fyi. we can return to the channel topic (thanks vivek!)

fallen patrol
#

lol that's even weirder, for different members (all staff to delete their messages) but i'll drop it... :3

crude gyro
tawdry vapor
#

Yes

vocal prairie
#

I shall review but I don't have anything to trade for.

tawdry vapor
#

No no go away I was about to make the deal of a lifetime

crude gyro
#

hahaha

tawdry vapor
#

Lol

austere hornet
#

sir-lancebot#1022 needs reviews!

dusky shoreBOT
vocal prairie
crude gyro
#

yeah, the deal is good for all three of you!

vocal prairie
#

I know next-to-nothing about Django

crude gyro
#

I'm a bit worried Mark is going to send me some unholy demonic monster PR though

tawdry vapor
#

Not really

crude gyro
#

then I'm happy to review. I've set aside the next 20 or so minutes to review whatever you guys send me.

tawdry vapor
crude gyro
#

I gotchu

tawdry vapor
#

ty I'll review yours shortly

sleek steppe
vocal prairie
#

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?

crude gyro
#

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

vocal prairie
#

cool cool, perfect

#

just wanted to make sure it was doing what was intended

crude gyro
#

the event handler is .on("input") for that input tag

sleek steppe
#

is the search supposed show a 404 duck pond if there are no results found?

crude gyro
#

mmmyes.

#

does it not?

somber swallow
#

is the .on method a jquery thing?

vocal prairie
crude gyro
#

you can do it in vanilla js too

#

the syntax is just a bit different

vocal prairie
crude gyro
#

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

somber swallow
#

show ducks if fuzzysearch returns 0

sleek steppe
#

If you add a filter and it shows the duck pond and then you type something it also disappears

crude gyro
#

another interesting edge case. noted.

crude gyro
#

thanks for sharing

#

I enjoyed reviewing it

crude gyro
austere hornet
tawdry vapor
crude gyro
#

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

tawdry vapor
#

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

crude gyro
#

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.

crude gyro
#

great news that it's been fixed!

tawdry vapor
crude gyro
#

excellent, will do.

tawdry vapor
#

There is also an excellent comment at the bottom about shopt -s inherit_errexit

crude gyro
#

I'm familiar with set -e

#

but this is like that turned up to 11

tawdry vapor
#

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

crude gyro
#

very nice

#

thanks Mark, I appreciate it

tawdry vapor
#

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

crude gyro
#

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

tawdry vapor
#

I don't feel strongly about it. It just looked off to me

crude gyro
#

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?

tawdry vapor
#

Firefox

molten perch
vale ibex
#

found the issue, and fixed it

#

metricity#13

dusky shoreBOT
vale ibex
#

thread_update events are only triggered for cached threads

#

So on_thread_join is triggered on:

  1. Thread creation
  2. When the bot joins a thread
  3. When an uncached thread is unarchived
#

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

gritty wind
#

Very cool stuff

#

“Gnio iterate cells” >.>

#

I can’t begin piecing together what that means though

vale ibex
#

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

tawdry vapor
#

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.

clever wraith
#

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.

vale ibex
clever wraith
#

Have y'all created a forum channel already?

#

!server

stable mountainBOT
#
Server Information

Created: <t:1483877013:R>
Roles: 95
Member status: status_online 64,686 status_offline 247,334

Members: 312,020

Helpers: 139
Moderation Team: 35
Admins: 15
Owners: 3
Contributors: 44
Leads: 8

Channels: 243

Category: 31
News: 8
Staff: 68
Stage_Voice: 2
Text: 124
Voice: 10

clever wraith
#

.wa 243 - 8 - 2 - 124 - 10

vale ibex
clever wraith
#

!e print(243 - 8 - 2 - 124 - 10)

stable mountainBOT
#

@clever wraith :white_check_mark: Your eval job has completed with return code 0.

99
vale ibex
#

d.py and some of the forks don't support it though

clever wraith
#

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

vale ibex
#

can't

#

see my message above

clever wraith
clever wraith
vale ibex
#

The channel type isn't supported 😅

#

so ThreadChannel.parent is None

clever wraith
#

That's... weird ?

#

Why wouldn't it be the forum channel itself

vale ibex
#

because the enum entry for forum channel isn't supported

clever wraith
#

Ah, so it doesn't fall back to the regular thread behavior

vale ibex
#

so it's not cached, and causing an exception on fetch

vocal wolf
molten bough
#

Y'all have access to forum channels?

vale ibex
#

yea

#

it breaks metricity atm

#

fixed in the same pr though

molten bough
#

Rare recent instance of partner testing before DMD testing I guess

clever wraith
#

The rust community server also has it

vale ibex
#

"fixed" by ignoring it

clever wraith
#

I don't think they are partnered, are they

molten bough
#

I'd be surprised if they aren't haha

clever wraith
#

They are

#

I thought they'd be under the threshold

#

I guess they are lower than k thought

molten bough
#

You can partner at like 500 members

#

It's just harder

#

But anyway we're going off topic haha

fervent sage
#

I've only been denied partnership 9 times 🥲

clever wraith
#

Rip

molten bough
#

Lmao stop, we can't even get verified

fervent sage
#

admittedly twice was a server solely focused on the letter h where h is the only thing you can say

clever wraith
#

I somehow never thought that Quilt could get verified

molten bough
#

h

clever wraith
#

I forgot verified was even a thing

#

I'll hippy hoppy to ot2

molten bough
#

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

clever wraith
#

Okay, ot1

molten bough
#

Neh I'm cooking, gonna peace out haha

clever wraith
#

Haha, fair

fervent sage
#

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?

vocal wolf
vale ibex
#

!int e print(bot.get_channel(942510511403175977))

stable mountainBOT
#
In [1]: print(bot.get_channel(942510511403175977))
None```
vale ibex
#

!int e print(await bot.fetch_channel(942510511403175977))

stable mountainBOT
#
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.```
vale ibex
#

🙃

clever wraith
#

Fork time?

vale ibex
#

testing it on disnake and nextcord

vocal wolf
#

@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

vale ibex
#

neither support it either

#

see alec's comment above as to why lmfao

clever wraith
#

Well I mean d.py is never gonna support it

wind ruin
#

huh, wasn't the bot using 3.10? or only snekbox?

fervent sage
thorny obsidian
clever wraith
#

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

fervent sage
#

chris what're the chances I can get you to send me a forum channel object so I can implement it in nextcord mmLol

molten bough
#

I'll take that for Kord as well

fervent sage
#

it only involves screwing with discord.py internals because 2.0 removed the socket response event a little bit of code :)))

clever wraith
#

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

vale ibex
#

ah wait no, that won't work

vocal wolf
#

it's just removing one newline lol

sleek steppe
#

tag speedrun so it only needs one approval :)

clever wraith
#

Oh I forgot

#

We aren't contrib anymore

#

Makes sense

static canyon
#

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

static canyon
#

Amazing, thank you!

fallen patrol
#

@vale ibex could you dm me those forum channel payloads, it would be really helpful

fallen patrol
vale ibex
#

!int e ```py
print(await bot.http.get_channel(942513478256713788))

stable mountainBOT
#
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}```
vale ibex
#

@fallen patrol @fervent sage

fallen patrol
#

hmmm, possible to get the http payload of a thread on it as well?

vale ibex
#

!int e ```py
print(await bot.http.get_channel(942538360231186513))

stable mountainBOT
#
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'}}```
fallen patrol
#

ty ty

#

also if you have questions about disnake or nextcord respectively, me and vco can answer them

clever wraith
#

Nice

#

I'll give that to the Kord devs

#

Thank you

fallen patrol
#

mostly disnake tho

static canyon
#

.bm get all issues I've commented on

clever wraith
#

Does it actually work

#

I would've thought it wouldn't be in the cache and things would break

fallen patrol
#

it did work

fallen patrol
#

api returns the resolved message in that reply

clever wraith
#

That's.. unusual

fallen patrol
#

it won't always provide it either

clever wraith
#

That'd be a first

#

That wouldn't be a first

fallen patrol
#

but it does mean that it isn't from cache like I initially assumed

#

presumably

trim cradle
#

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 tangerine_think

clever wraith
#

Ok so I opened this issue

#

but how do I add new python modules to a project?

placid ermine
#

poetry add thing

#

(works similar to pip install thing)

clever wraith
#

I see thanks

#

it wasn't in the contrib guide iirc

placid ermine
#

mm yeah

clever wraith
#

can I ignore this

#

ok

gritty wind
#

Is your VSC running the same environment as your terminal?