#dev-contrib

1 messages ยท Page 158 of 1

vale ibex
#

alright, it's still getting errors

austere hornet
#

And it's down again

fallen patrol
#

...

vale ibex
#

arthur deployments redeploy modmail-bot

radiant merlinBOT
#

:white_check_mark: Restarted deployment modmail-bot in namespace default.

fallen patrol
#
OSError: no library called "cairo-2" was found
no library called "cairo" was found
no library called "libcairo-2" was found
cannot load library 'libcairo.so.2': libcairo.so.2: cannot open shared object file: No such file or directory
cannot load library 'libcairo.2.dylib': libcairo.2.dylib: cannot open shared object file: No such file or directory
cannot load library 'libcairo-2.dll': libcairo-2.dll: cannot open shared object file: No such file or directory
green oriole
#

now it does

fallen patrol
#

chris how did you solve this

vale ibex
#

Alright ERROR: Unable to import cairosvg, report on our support server with your OS details: https://discord.gg/etJNHCQ it was still getting this in the logs

green oriole
#

how weird

fallen patrol
#

I modified mine and added a raise statement on bot.py:L1708

green oriole
#

the manifest isn't right

fallen patrol
#

which returned the above error

vale ibex
#

I have master checked out myself and can build it fine

vale ibex
#

Went to 6cceb93

green oriole
#

don't think you did

fallen patrol
vale ibex
#

why?

green oriole
#

kubectl describe deployment modmail-bot still gives me be55

vale ibex
#

well yea

#

because I reverted it as soon as I saw the error

green oriole
#

right

#

hmm

#

doesn't make any sense

fallen patrol
#

on Linux, youโ€™ll have to install the cairo, python3-dev and libffi-dev packages (names may vary for your distribution).

green oriole
#

they are in the non slim image

vale ibex
#

Yea, the way I got it working in slim was to install a bunch of extra packages

vale ibex
#

since debian-bullseye needs a few more

fallen patrol
#

...is my package manager broken?

green oriole
#

ghcr.io/python-discord/modmail:6cceb93 does start

fallen patrol
#

or does cairo not exist

vale ibex
#

(names may vary for your distribution)

green oriole
#

can you try to push it to prod again Chris?

fallen patrol
#

ubuntu

vale ibex
#

google cariosvg+your distro

green oriole
#

There is no reason 6cce doesn't work

vale ibex
#

it starts for me too

#

but not in prod shrugR

#

i wonder if its because platform isn't pinned

#

I'll push it again

fallen patrol
vale ibex
#

arthur deployments redeploy modmail-bot

radiant merlinBOT
#

:white_check_mark: Restarted deployment modmail-bot in namespace default.

green oriole
#

wtf

#

doesn't work once again

#

I wonder if there is something borked with the node cache

vale ibex
#

arthur deployments redeploy modmail-bot

radiant merlinBOT
#

:white_check_mark: Restarted deployment modmail-bot in namespace default.

fallen patrol
#

aha!

#

libcairo2-dev

vale ibex
#

Yea, that's what it was called on debian too

fallen patrol
#

that made my bot work, too

#

wait no nvm

vale ibex
#

arthur deployments redeploy modmail-bot

radiant merlinBOT
#

:white_check_mark: Restarted deployment modmail-bot in namespace default.

vale ibex
#

anyways I'm over trying to put out this dumpster fire, this is why I was reluctant to deploy a dev version

#

I'm going to bed

fallen patrol
#

cya

green oriole
#

it is so weird

#

oof, that isn't a lot of sleep time

#

bai

trim cradle
#

(serious comment) I think we need to harmonize our terminology surrounding @stable mountain vs @dusky shore. The term "the community bot" is used inconsistently to refer to either, but the means there's only one.

#

I think Lance should be the community bot and Python should be "the custodian", or something.

austere hornet
trim cradle
austere hornet
#

But in the repo description, it does say "the community bot", but in my opinion it's fine because it's "the community bot for the Python Discord community". You know what I'm saying? There is only one Python Discord, after all ๐Ÿ˜„

austere hornet
fallen patrol
#

update: successfully ran @little robin after installing that package

austere hornet
#

Hahaha wrong bot person

fallen patrol
#

i legit wish someone would kick that account ยฏ_(ใƒ„)_/ยฏ

austere hornet
#

lol

crude gyro
austere hornet
#

I can see that.

austere hornet
crude gyro
#

you're probably right that we should add a description of them

#

frankly I don't know how to describe King Arthur, having had minimal involvement

austere hornet
#

It says it in the About Me

fallen patrol
#

something like that

crude gyro
#

maybe our <@&797752289771126784> wants to suggest a good description

#

happy to add it.

fallen patrol
#

hey, can I make a pr to fix this whitespace in the title?

#

doesn't feel worthy of an issue

austere hornet
#

I'd definitely say yes, but can't speak for mods/admins/core devs

crude gyro
#

seems like a no-brainer

#

just include a before and after pic in your PR description

fallen patrol
#

bot#1994

dusky shoreBOT
austere hornet
#

Bump once again (sorry)

fallen patrol
#

!remind 1H look at christmasify

stable mountainBOT
#
Absolutely!

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

austere hornet
#

Thanks

fallen patrol
#

probably not gonna help persay, but will try to help

#

...that makes no sense, I mean, I'll help but not work with you likely, since I'm really busy these next few weeks

fallen patrol
#

could you explain what it is that you need help with about christmasify? ๐Ÿ™‚

austere hornet
#

And what I have right now is mostly copy/pasted from the existing .spookify command but I want to make christmasify unique from spookify. Does that make sense?

fallen patrol
#

yeah, I think so

#

!remind delete 3637

stable mountainBOT
#
Sure thing!

That reminder has been deleted successfully!

fallen patrol
#

btw where did you get the assets?

fallen patrol
#

@austere hornet

austere hornet
fallen patrol
#

ah gotcha

austere hornet
fallen patrol
#

yeah i hit the wrong button

#

you might need to find different images, if you didn't check the licensing of those images btw

austere hornet
fallen patrol
#

yeah

austere hornet
#

Ok, I can't really look rn, maybe tmmrw

fallen patrol
#

and for what you can do with PIL: this documentation here includes all methods on an image object

austere hornet
fallen patrol
#

@austere hornet
so if you want some ideas to be able to convert differently than the spooky command:
something to change the image to red and green shades-- a simple implementation may just be to remove all of the blue pixels. Additionally, perhaps making the colours

different assets, maybe a snow look, like a bunch of white specks, or something, tiny snowflakes, littered across the image

maybe a santa hat, or something, too

fallen patrol
#

lmao did we really do that entire color command

#

with all of the parsing and everything

#

pillow will parse multiple string formats and return a result

#

we already use pillow on lance

#

๐Ÿคฆโ€โ™€๏ธ

austere hornet
fallen patrol
#

do you know how rgb images work?

austere hornet
fallen patrol
#

rgb is red, green, blue

austere hornet
#

Yeah ik

fallen patrol
#

so each color you see is three different values, one of each red, green, and blue

#

since chrismas colours are red and green, that makes this somewhat easy

austere hornet
#

Ahhh ok I see

fallen patrol
#

just remove or take most of the blue channels out of a pfp

austere hornet
#

...what does pfp mean lol? Sorry if that's a stupid question

fallen patrol
#

pfp == avatar

austere hornet
#

Ah ok

fallen patrol
#

then, you could flatten the image

#

this means, take out most of the different colors, or the precision of each pixel's color

#

that would mean that the image would end up in more specific red and green colors, rather than a possible ugly pfp with blue removed

( removing colors from an image can make it ugly fast, if it has stuff going on, so I recommend flattening the image to remove the precision as that would mean instead of some rainbow gradiant in a color, it would be a red/green area. flattening means that a limited subset of color shades are used in the image)

austere hornet
thorny obsidian
fallen patrol
thorny obsidian
stable mountainBOT
#

bot/exts/utilities/colour.py line 11

from PIL import Image, ImageColor```
fallen patrol
# austere hornet How would I flatten the image? Is that a Pillow function?

I think you would use this function, https://pillow.readthedocs.io/en/stable/reference/Image.html#PIL.Image.Image.convert to be able to flatten the image-- you should just be able to use it and pass colors as a number much lower than 256

fallen patrol
austere hornet
#

Thanks for your help @fallen patrol ! I'll try to look at what you sent tomorrow if I get a chance

fallen patrol
#

how exactly does the docs command work?

#

specifically, where does it parse the information of the bits about each entry?

#

or does it fetch that every time?

#

oh, I found it

idle delta
#

That sounds like something that can be implemented ๐Ÿค”
The output should be dmed? (cuz it's personal stats, you know.) or display as a dismiss message kind of thing where the user posted the command?

gritty wind
#

It's public info

gritty wind
#

Hey @last patio for the bot-core docs PR, are you going to review it again, or are we good to push forward?

last patio
gritty wind
#

Nah there's no rush

#

Just wanted to find out where we're at

last patio
#

๐Ÿ‘๐Ÿป

short snow
#

#aoc-bot-commands message should be top 9

#

!remind 13h

stable mountainBOT
#
Sure thing!

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

cold island
austere hornet
#

Was that on purpose?

austere hornet
cursive relic
#

When there is coming the timeout button, if the bot will use it. Will the bot move to new package?

cold island
#

It will be nice to use the native feature if it suits our needs, but it's not very urgent to us

cursive relic
stable mountainBOT
#

bot/exts/moderation/defcon.py line 189

permissions.update(```
vale ibex
#

!d discord.Permissions.update

stable mountainBOT
#

update(**kwargs)```
Bulk updates this permission object.

Allows you to set multiple attributes by using keyword arguments. The names must be equivalent to the properties listed. Extraneous key/value pairs will be silently ignored.
cursive relic
#

Hmm then the problem is in server settings I assume

#

Thank you!

#

Also I would like to verify, can I ask questions like these if they don't get solved (eg. Docs were not found) in #discord-bots . To be sure the code parts are from docs and not the bots own code

vale ibex
#

I'm not sure what you mean by "can I ask questions like these if they don't get solved"

#

This channel is if you have any questions about PyDis projects, so feel free to any questions related to that

cursive relic
#

Ah then I got it, thx again ๐Ÿ˜„

stable mountainBOT
fallen patrol
#

hmmm

patent pivot
#

looks like we need an NGINX upgrade

fallen patrol
#

oh chat was scrolled lol

patent pivot
#

wait it came back, how did it come back

fallen patrol
#

given that !branding schedule exists, is there a way to make @dusky shore share the same schedule? As it is right now, it uses the month locks, when those aren't always accurate to the current season, as stated by the branding info

patent pivot
#

oh cute it automatically triggered a site issue!!

thorny obsidian
#

our events don't necessarily follow the branding schedule though, unless I'm misunderstanding

fallen patrol
#

Im focusing mainly on halloween and other events like that, I suppose

#

then again it feels fine how it is now.

patent pivot
#

nginx service restored

thorny obsidian
#

but I don't want Sir Lancebot to be locked to the branding schedule. It would lock commands only during the duration of the event when I want some active before and after

fallen patrol
clever wraith
#

@vale ibex lol I saw the ping on my phone, nice timing

vale ibex
patent pivot
#

uhhh nothing written up yet, same as we said last week though, won't be continuing to pursue a rewrite to fastapi

#

maybe

#

there isn't a whole deal of reasoning, and the discussions we had internally were quite in depth with a lot of reasons over a long period of time

#

the crux of it was that it's just not something we see a huge benefit investing a significant portion of time into when we're not sure whether the end product is going to meet goals more than the current solution does

#

like I mentioned last time, we need to bring it to an admin meeting to tie some ends together and make sure we're all in agreement

fallen patrol
patent pivot
#

api in terms of fastapi is not going to proceed

#

but that discussion has been mostly held asynchronously, the project will not continue, but we need to decide whether there are things we want to look into

#

we had other reasons to migrate to fastapi other than "oh cool fastapi"

#

so we need to see if we want to prioritise any of those with django

#

it'll all make sense once we write something up to announce, but again for now just hold on contribution, we'll write something up eventually

fallen patrol
#

(that question ^ is irrelevant to the shutdown)

patent pivot
#

observability into django was poor at the time, we've since resolved bits of that, a few internal reasons with core team that have also now been fixed

#

we originally wanted site to be more static, that's also more solved (scale's static previews work, etc.)

#

it's why API never got reaaaaally pushed as a public project, we didn't really have capacity for it nor a huge desire for it after we resolved some issues with the current stack

fallen patrol
#

I feel like I recall a reason being making site easier to contribute to

patent pivot
#

also why we've not pushed out an announcement yet, it's not a project at the forefront of the org

#

site is easier to contribute to

#

we killed subdomains

#

now, it really is just pull site, install the deps + postgres, run

#

no need to edit /etc/hosts, shouldn't need to modify settings a whole bunch

#

if you aren't directly working on API, you shouldn't need to touch API

thorny obsidian
#

dewiki of the site helps a lot too, writing markdown for certain areas is way easier than wrangling jinja tbh

patent pivot
#

API + site proper are distinct

#

yep yep

#

I think site now is probably the easiest it's ever been to contribute to

fallen patrol
#

ah, neat

patent pivot
#
  • we have more django experienced folks on our core team who are able to assist with things
#

like volC

fallen patrol
#

volC?

#

that vco?

patent pivot
#

abbreviation of volcyy

fallen patrol
#

ah

#

lol I forgot why I actually clicked into this channel

patent pivot
#

we've still got work to do to make current site nicer, we're currently battling a load of optimisation problems with the database in relation to the metricity messages table, so that's going to be a fun one to solve

fallen patrol
#

sounds annoying...

patent pivot
#

but from regular user contribution pov, if you don't work on API, you won't need to do anything API related, if you do it should just be standard DRF, we're working to make content easier to write, and have adjusted review policies so it's easy to get it into prod as well

#

just one of the issues with large systems

#

messages table is uhhhh

#

takes a while to even run the query

#

users is 516,155 rows

fallen patrol
#

dang it, why am I here again

patent pivot
#

messages is still running yikes

fallen patrol
#

oh yea I had an idea for a command, now should post it on Lance or bot.... hm

#

hm

#

why are !pep and !pypi on @stable mountain? /gen

patent pivot
#

okay messages is 15,022,839 rows, 2.4GB

patent pivot
thorny obsidian
#

PEP and PyPI are directly related to Python (the language). So it makes sense to include them on the main bot.

patent pivot
#

yea

fallen patrol
#

so that would be where I should make this issue then, thanks

patent pivot
#

it mayyyy also predate Lancebot

#

lol

#

yeah, it does

fallen patrol
#

oh.

patent pivot
#

i remember when i wrote that migration script

#

good shit

fallen patrol
#

what about the github autolinking features? half of those are on lance, half on bot

patent pivot
#

you mean code snippets vs. issues?

fallen patrol
#

ye

patent pivot
#

uhhhh, again not sure of the reason for the split, though I don't find it problematic, they're pretty distinct features

fallen patrol
#

true

#

I kind of want to move them to one bot with my github command enhancements issue

#

sir-lancebot#968

dusky shoreBOT
thorny obsidian
#

That's kind of unrelated to the code snippets though, right? The only relation being it deals with github

fallen patrol
#

one sec

#

well the github code snippets is actually also gitlab, github gists, and bit
bucket, so it makes no sense to merge cogs ๐Ÿ™‚

fallen patrol
patent pivot
#

i mean depends on the proposal

fallen patrol
#

I'm thinking about a version command, to see current version and features of python and the reference implementation, cpython, and release dates.

(btw, I'm not looking to bikeshed this yet until I write up an issue, just trying to get it on the right repo)

#

I think this would go on @stable mountain

patent pivot
#

uhhhhhhhh

#

I can see it going both ways, but probably best to keep it with pep/pypi

fallen patrol
#

yeah, that makes sense

short snow
#

@brisk brook Regarding your comment, Though I agree with you there lemon_sweat it hasn't shown progress since Zig wants to take a look at the PR before it gets merged but he hasn't been getting time and there are few other dev work with higher priority on his list (#dev-contrib message)

cold island
#

Ah no, don't let me block it. If it gets to a mergeable state (gets the approvals) I might have a quick look

#

If there's something in particular that needs to be decided just ping me

short snow
#

@last patio I could possibly make a second continuation PR to this which would include the change to storing the modpings in the PostgreSQL db on the site, also thanks for the review and lovely pfp

#

you probably need to cancel the other reviews ig

#

aren't you a coredev pithink it shows 0/1 coredev approvals

last patio
#

last time I checked I was yes!!!

#

wait good idea on cancelling

#

do I re-request it or how can I dismiss it

short snow
#

i am not sure

last patio
#

GH won't let me re-request

cold island
#

You want to dismiss requested changes?

last patio
#

They're outdated

short snow
#

only numerior has requested changes so not suree

last patio
#

Or well, addressed

short snow
#

if thats the issue

vale ibex
#

You're being ignored by policy bot volC since you committed to the PR ๐Ÿ˜›

short snow
#

oh lol

#

๐Ÿคฆ

cold island
#

You can't dismiss Numerlor I think because he's not blocking the PR

short snow
#

he is not part of the org so i don't think dismiss it anyway

#

chris, zig do the honours

vale ibex
#

I've been spending my oss time on critical issues, haven't had time to review it just yet.

short snow
#

proxy approval for volcyy ๐Ÿ™ƒ

#

thanks :D

short snow
#

Any updates on bot#1964 IIRC there was some discussion that discord introduced support for message links on android

dusky shoreBOT
short snow
#

Man I wish ephemeral replies were possibly for non-interaction messages, this would have been a perfect candidate for it

#

Though we could add a small bot message with a button to send it, would help those who don't want the embed

vocal prairie
#

Still is for me on 106.1 (and android 12 if that matters)

short snow
#

ah ok, I rarely use discord on android so wasn't aware.

vale ibex
#

Yea, consider that issue still approved

#

I've seen no improvement on android, even on beta branch

#

So I don't want to hold out with bad UX for Discord to maybe one day release a fix

vale ibex
#

I'd rather the inverse.

#

Give it the trash emoji

#

Same UX as other places that way

short snow
#

but trash emoji cuold be used by any1 then

#

this is something for every1 to see

vale ibex
#

Have it be the same as other trash emojis, limited to original author (of the link) and mods

#

I'm pretty sure we have a util for that in bot.

short snow
#

Isn't the link for others to see and not the original author?

vale ibex
#

Yes, but the cases where it's not wanted, can be determined by the author

#

To reiterate, I'm fine with an embed that includes the content of the linked message everywhere

#

having the ability to hide it in some circumstances is just extra

short snow
#

Yes I understand that, but not everyone would be fine with it

vale ibex
#

In what examples?

short snow
#

For example, I am on PC and in a busy channel, and some1 shares a link and suddenly poppoing of a bot message which is medium sizes may not be "nice" for me

vale ibex
#

The issue states to only do this for staff channels for now

#

with the ability to add a channel to a whitelist

#

So we wouldn't put channels like pygen or discord bots in that list for that reason

short snow
#

ah, I thought it was for all channels, will start working on it ๐Ÿ‘

vale ibex
#

Oh, that's annoying

#

Was just testing bot#1539

dusky shoreBOT
vale ibex
gritty wind
#

What if thatโ€™s changed to localhost?

#

Yeah, I can confirm that web raises the error

#

I suppose it is technically not a valid url, you can't go to many sites without tlds

#

Wait can you

last patio
#

with /etc/hosts or similar i'm pretty sure you can

#

Also docker-compose DNS

gritty wind
#

I donโ€™t think discord is trying to accommodate those cases haha

patent pivot
#

lol

gritty wind
#

How does a company match donations to itself ๐Ÿค”

vale ibex
#

or atleast when I tried them they couldn't connect to the site

gritty wind
#

It doesnโ€™t actually validate that itโ€™s online, does it?

#

Just that itโ€™s a valid URL

#

Localhost:port can be set as an embed url from my testing

vale ibex
#

that part doesn't, but since that url is used to actually connect ot the site api, using that value means the bot doesn't even start

gritty wind
#

If itโ€™s in an embed, isnโ€™t this just user facing?

#

I donโ€™t have much context here lol

vale ibex
#

the embed was using urls.site_schema and urls.site to dynamically make the url to the site

#

urls.site == web:8000

gritty wind
#

If weโ€™re in debug, we can match for web and replace it was the idea

last patio
gritty wind
#

Or just donโ€™t even check debug and replace

vale ibex
#

numerlor's fix was to just hardcode to pydis for that embed url

gritty wind
#

Then itโ€™ll also work as intended since the user can click on it and actually go somewhere

vale ibex
#

since it's just linking to the rules page

gritty wind
#

Good enough then

vale ibex
#

!rules 2 3 4

stable mountainBOT
thorny obsidian
#

So with the new tag system, fuzzy-match was changed to not kick in for 2 letter tags. Is it worth adjusting the fuzzy match system or adjust the metadata for those tags? (!or, !if, !ot, !xy)

vale ibex
#

hey @brazen charm after merging we've noticed a few common shortcuts to tags no longer work, such as !if !xy !ot. I've found this is due to us only fuzzy matching on groups >=3 chars long. Do you expect further issues if we changed this to 2?

#

The alternative is to add an alt-name key to the meta data, which then gets used in addition to the file name

#

the only issue with that is dealing with conflicts, which could eb done on cog load

brazen charm
#

I don't think there should be any issues, no; maybe an occasional additional false positive when some actual groups come in

vale ibex
#

Yea, false positives aren't really a big deal either

#

since the trash emoji is there

thorny obsidian
#

So, the PR introduces tag groups but doesn't set any up yet, right?

brazen charm
#

Yes, they can now be created by moving tags to a subdir but the pr didn't do that

thorny obsidian
#

ah, okay cool, just wanted to make sure I wasn't going crazy

#

That sounds like a fun tedious thing to do while I wait for things to run...

thorny obsidian
#

I HAD A THOUGHT. What if we provide the AoC join code via ephemeral message somehow instead of DM?

austere hornet
vale ibex
vale ibex
#

So we could change aoc join to send a button and then have an ephemeral message response

#

(since we don't have slash commands)

thorny obsidian
#

Do you think we'll have slash commands in a year?

vale ibex
#

yea, I'd like to think an obvious choice replacement to d.py would eb evident by then

thorny obsidian
#

Because if there's a set of commands that make the most sense for slash commands it's probably AoC

vale ibex
#

very true

cold island
#

That is pretty cool

clever wraith
#

Goddamn

cursive relic
#

How is this done? that is really useful!

vale ibex
#

Slash commands support auto complete

fervent sage
green oriole
#

hah that's cool and bad at the same time

stable mountainBOT
#
It has arrived!

Here's your reminder: I just asked internally why they don't
[Jump back to when you created the reminder](#dev-contrib message)

hard hedge
#

Stupid question, but what is this channel about?

#

Can I seek out fellow beginners here?

dim pelican
#

The channel is focused on contributing to the open source projects we have

#

@stable mountain and @dusky shore are the big two, as well as the site

hard hedge
#

Okay, thanks.

fallen patrol
#

lol, I used disnake in order to make it-- I'm working on moving most of my commands to slash commands because autocomplete features are so much fun

austere hornet
junior stirrup
austere hornet
austere hornet
#

Oh haha

#

Well as Brad said this is the channel for discussing the open source projects here and not for seeking fellow beginners

stable mountainBOT
#

pyproject.toml line 12

aioredis = "~1.3"```
`pyproject.toml` line 19
```toml
async-rediscache = {extras = ["fakeredis"], version = "~=0.1.4"}```
tawdry vapor
fallen patrol
short snow
vale ibex
short snow
#

ee yes, ๐Ÿคฆ

vale ibex
#

while that in itself shouldn't really cause an issue, aioredis's version 2.0 completely changed it's api

#

which I imagine you are now running

#

iirc they merged in aioredis-py into aioredis to have a single aioredis package & team, so the api is different now

#

and asyncrediscache doesn't work with it

short snow
#

aioredis version would be 1.3.1 right? the one described in poetry.lock

vale ibex
#

Ah yea, we pin aioredis in lance, I can't remember what project I was working on where a poetry lock bumped that up too

short snow
#

ah ok, interesting numpy gets installed pretty fast on 3.9.5 but was slow on 3.10

vale ibex
#

Does numpy have wheels for 3.10 yet?

#

if not, that's probably why

cold island
#

They do

short snow
#

it does, yeah

cold island
#

Maybe the file was already cached for you?

short snow
#

probably, that's what i had guessed (see deleted messages) but then when I tried replicating the situation again it worked, poetry is unpredicatable

short snow
cold island
#

@short snow hey,I'm a bit confused about the schedule command

#

!modpings s 8 22

stable mountainBOT
#

:x: @cold island You can't have the modpings role for more than 16 hours!

cold island
#

Why does it say that?

short snow
#

!src modpings

stable mountainBOT
#
Command: modpings

Allow the removal and re-addition of the pingable moderators role.

Source Code
stable mountainBOT
#

bot/exts/moderation/modpings.py line 206

if end < start:```
cold island
#

!modpings schedule 6am 6pm

stable mountainBOT
#

Sorry, an unexpected error occurred. Please let us know!

TypeError: can't subtract offset-naive and offset-aware datetimes

cold island
#

Another bug we found

short snow
#

it is comparing them after adding one day, but even that would be okay, 8am next day and 22pm is still under 16 hours

cold island
#

Probably caused by the migration to dpy 2

#

Do you think it's something you can fix?

#

Also the work limit makes no sense in the first place, it's a max off limit, not a max on limit

cold island
#

Does the command make you set your activity times or inactivity times?

short snow
#

activity times, from when to when you want the mod role

cold island
#

Ok. Along with the two issues above it would be nice to have a more verbose help description with a usage example

green oriole
#

Also a word on how this interacts with manual on and off would be nice

short snow
#

๐Ÿ‘

#

ok the dateutil parser is acting weirdly, its taking 8 and 22 into days, I am not sure why that happens, it was working perfectly fine when i tested it after bluenix's review

slim widget
#

Does anyone more actively involved with the bot than me think this a reasonable idea?

short snow
#

yeah that's what i am currently doing, there are two options use 6h13M as the time format (24 h) or write a parser which supports both 24h and 12h

slim widget
#

I'd try to be flexible with the input it accepts. How's your regex? ๐Ÿ˜„

short snow
#

nothing yet, looking into dateutil

slim widget
#

Btw, I'm mod but not actually a core developer, so don't take my advice as the last word.

green oriole
#

It isn't an unreasonable idea haha

#

You should add a converter

cold island
#
match = re.fullmatch(r"(?P<hour>\d{1,2})(:(?P<minute>\d{1,2}))?(?P<part_of_day>am?|pm?)?", arg)
if not match:
    raise BadArgument("...")
hour = int(match.group("hour"))
minute = 0
if match.group("minute"):
    minute = int(match.group("minute"))
part_of_day = match.group("part_of_day")
if (part_of_day and not 0 < hour <= 12) or not 0 <= hour < 24:
    raise BadArgument("...")
if not 0 <= minute < 60:
    raise BadArgument("...")
if part_of_day:
    hour %= 12
if part_of_day in ("p", "pm"):
    hour += 12
return datetime.now(timezone.utc).replace(hour=hour, minute=minute, second=0, microsecond=0)

Should be something of this sort (untested)

cold island
#

Ok now it's tested

slim widget
#

@cold island I hope you don't mind me suggesting a change? lemon_sweat

How about returning a datetime.time object instead? I'm not sure if this is a good idea or not. I just had an interesting discussion in a help channel with Salt and Etrotta about the difference between naive and aware time objects. Here's the code: https://paste.pythondiscord.com/odigodipiv.py

cold island
#

We also work with aware datetimes across the bot

slim widget
#

Ah right yeah. Both good reasons. Although the date portion of the datetime object being arbitrary does bother me slightly.

cold island
#

yeah it's not the most elegant, but it's then used to schedule the role addition/removal, so it's actually relevant

slim widget
#

I see ๐Ÿ‘

light holly
#

this re is tough

#

!e

import re

TWELVE = r"^(1[0-2]|0?[1-9])(:?[0-5][0-9])? ?([AaPp][Mm])$"
TWENTY_FOUR = r"^([0-9]|0[0-9]|1[0-9]|2[0-4])(:?[0-5][0-9])?$"

TIME_RE = re.compile(TWELVE + "|" + TWENTY_FOUR)

for message in (
    "10:14am",
    "24",
    "942pm",
    "3pm",
):
    match TIME_RE.fullmatch(message).groups():
        case hour, minute, meridiem, None, None:
            print(hour, minute, meridiem)
        case hour, None, meridiem, None, None:
            print(hour, meridiem)
        case None, None, None, hour, None:
            print(hour)
        case None, None, None, hour, minute:
            print(hour, minute)
stable mountainBOT
#

@light holly :white_check_mark: Your eval job has completed with return code 0.

001 | 10 :14 am
002 | 24
003 | 9 42 pm
004 | 3 None pm
light holly
#

but you don't need to check minutes or hours this way

#

built into the re

last patio
#

wait what is datetime.time

#

wow

#

i've been looking for something like this

short snow
#

@cold island I have a hotfix ready for the current use, so should i just put the patch here/pr it so it gets merged fast and then i look into the convertor/am-pm thing

cold island
#

I think it can wait however long it will take to do it properly

#

It can wait another few days and I'd rather end it with one round of reviews instead of two

clever wraith
#

Did d.py add slash command support?

#

Before archival

vale ibex
#

No

#

Just buttons and drop downs

fallen patrol
short snow
#

@austere hornet I am not sure but I think you should complete your currently assigned PRs before taking on others since none of them is in a really good state/will be merged very soon, but that's my opinion - depends on you and the core devs

austere hornet
short snow
#

oh i didn't see the second message

austere hornet
#

Oh no worries

short snow
#

@brisk brook Regarding your comment on global leaderboard PR, I don't understand why we need to add a lock while reading also, it wouldn't matter if they don't run synchronously pithink

brisk brook
#

Because you (could and will) have two tasks, that look like this:

A: Reads the score (100)
B: Reads the score (100)

A: Sets the score (100+50)
B: Sets the score (100+50)

Result is that the score is now 150 when it should've been 200
#

The lock should prevent another task from setting the score while one has already read it and is about to write to it

short snow
#

But aren't they on two separate caches, so how would that cause a problem

brisk brook
#

The games yes?

cold island
#

Hello ๐Ÿ‘‹
I'm working on some breaking changes for the filters, in this case meaning that my changes keep breaking apart ๐Ÿ˜…
To help me, I'd appreciate some eyes on bot#1889 and bot#1961 to get them merged so that I can account for those features in what I'm writing.

dusky shoreBOT
cold island
#

@clever wraith are you able to follow up with the requested changes in the PR?

clever wraith
#

Hold on I haven't gotten any notifications from GitHub about them hold on

cold island
#

It's pretty old, I mean the comment about it dropping support for subdomains

clever wraith
#

I added support for subdomains

cold island
#

Which commit? can't see it

clever wraith
#

As of c7c33d7

#

Most recent commit with it working is e55a2aa

cold island
#

Ah, I see, thanks ๐Ÿ‘
fwiw it's worth mentioning why you make a certain change and not just that it's made.

clever wraith
#

Probably yeah lmao

cold island
#

Alright, then it just needs reviews, thanks!

clever wraith
#

Yep, no problem

#

I added a comment explaining the PR in depth

trail pilot
#
bot_1        |   File "/bot/bot/api.py", line 75, in request
bot_1        |     async with self.session.request(method.upper(), self._url_for(endpoint), **kwargs) as resp:
bot_1        |   File "/usr/local/lib/python3.9/site-packages/aiohttp/client.py", line 1117, in __aenter__
bot_1        |     self._resp = await self._coro
bot_1        |   File "/usr/local/lib/python3.9/site-packages/aiohttp/client.py", line 520, in _request
bot_1        |     conn = await self._connector.connect(
bot_1        |   File "/usr/local/lib/python3.9/site-packages/aiohttp/connector.py", line 535, in connect
bot_1        |     proto = await self._create_connection(req, traces, timeout)
bot_1        |   File "/usr/local/lib/python3.9/site-packages/aiohttp/connector.py", line 892, in _create_connection
bot_1        |     _, proto = await self._create_direct_connection(req, traces, timeout)
bot_1        |   File "/usr/local/lib/python3.9/site-packages/aiohttp/connector.py", line 1011, in _create_direct_connection
bot_1        |     raise ClientConnectorError(req.connection_key, exc) from exc
bot_1        | aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host pythondiscord.local:8000 ssl:default [None]
bot_1        | 2021-12-09 22:29:50 | bot | CRITICAL | Could not connect to site API. Is it running?

So I'm getting this error with starting the bot repo

#

do I need to set up the site repo too?

#

to be able to have bot run

full fractal
#

how did you start up the service? you used docker-compose right?

full fractal
trail pilot
#

Turns out I skim too many lines when reading

#

it was right there in front of me in the contribution guide

green oriole
#

we have a note about that at the top of the staff server page

trail pilot
#

Huh, I'm getting the same error.

#

Even though I did docker compose up web

#

and then did docker compose up

green oriole
#

does the error still mention pythondiscord.local:8000?

trail pilot
#

Yep

green oriole
#

๐Ÿ˜„

trail pilot
#

Sorry

#

I need to get better at not skimming lines lol

green oriole
#

PR #2000!!!!

green oriole
trail pilot
austere hornet
clever wraith
#

bot#2000

dusky shoreBOT
austere hornet
# dusky shore

pin? Kidding, it's probably not necessary, maybe I got too excited about this lol

short snow
brisk brook
static canyon
#

@short snow you may have already been informed but fyi we've also gotten a 'User' object has no attribute 'add_roles' error from the modpings scheduler (can't look into it atm but the cause is probs relatively obvious)

(I believe you're the person to ping; apologies if you're not)

short snow
static canyon
short snow
#

ah, it should have been Member, lemme see why that happens

gritty wind
#

You can see the logs on grafana tizzy

short snow
static canyon
static canyon
static canyon
# short snow hmm, I will look into that, is it possible to provide the traceback as i never g...
2021-12-10 06:00:00    
AttributeError: 'User' object has no attribute 'add_roles'
2021-12-10 06:00:00    
    await mod.add_roles(self.moderators_role, reason="Moderator scheduled time started!")
2021-12-10 06:00:00    
  File "/bot/bot/exts/moderation/modpings.py", line 119, in add_role_schedule
2021-12-10 06:00:00    
    await asyncio.shield(coroutine)
2021-12-10 06:00:00    
  File "/bot/bot/utils/scheduling.py", line 117, in _await_later
2021-12-10 06:00:00    
Traceback (most recent call last):
2021-12-10 06:00:00    
2021-12-10 06:00:00 | bot.utils.scheduling.ModPingsSchedule | ERROR | Error in task #512354988157173763 140600535200432!
2021-12-10 06:00:00    
AttributeError: 'User' object has no attribute 'add_roles'
2021-12-10 06:00:00    
    await mod.add_roles(self.moderators_role, reason="Moderator scheduled time started!")
2021-12-10 06:00:00    
  File "/bot/bot/exts/moderation/modpings.py", line 119, in add_role_schedule
2021-12-10 06:00:00    
    await asyncio.shield(coroutine)
2021-12-10 06:00:00    
  File "/bot/bot/utils/scheduling.py", line 117, in _await_later
2021-12-10 06:00:00    
Traceback (most recent call last):
2021-12-10 06:00:00    
2021-12-10 06:00:00 | bot.utils.scheduling.ModPingsSchedule | ERROR | Error in task #476543547210858506 140600019803664!
#

That's the traceback

#

On phone so I'm not gonna be removing the timestamps lol

short snow
#

ok yeah thats the issue, fixed in my pr

static canyon
#

Nice ๐Ÿ‘

#

@short snow out of interest, do you think the new time converter could be used in bot#1924? I guess we'd need to add support for entering day/month/year but could your converter be used as a base (or would that not work)?

dusky shoreBOT
short snow
#

yeah it could work (After adding month/day/year support)

static canyon
#

Cool ok_handbutflipped

short snow
brisk brook
#

Yeah just have one lock that you acquire at the start of that method

green oriole
#

Did I promise anyone a review that I never gave?

short snow
#

me ig - modpings but it is already reviewed so the modpings enhancement pr (bot#2001)

gritty wind
#

1961 is still open

short snow
#

bot#1961

dusky shoreBOT
gritty wind
#

I did rewrite a large portion of it, I should probably dismiss chris' review

short snow
#

that's a lot of tests

#

I will try reviewing it, but you would need to wait sometime as I am not at all familiar with it.

green oriole
#

Well that's a too big PR for me to review ๐Ÿ˜”

#

Guess I can still review afterwards

short snow
#

Btw akarys is this good enough (modpings help message)

green oriole
#

Not like my opinion will soon matter

short snow
#

lol okay ๐Ÿ˜”

austere hornet
#

Wait @green oriole you stepped down from mod? :(

#

And core dev

green oriole
#

yes

short snow
#

wait why?

#

uni?

green oriole
#

personal reasons, I don't really want to talk about it right now

short snow
#

ah, well good luck :)

green oriole
#

thanks

short snow
green oriole
#

I've opened a new PRs to remove myself from the codeownership: bot#2005 site#631 sir-lancebot#977 snekbox#123

magic arch
#

Sorry to hear you're stepping down, Ak, it's truly been super fun working with you. And for those PRs, maybe we should find another owner to assign to the poetry and pyproject files, along with **/migrations/** on the site.

clever wraith
#

because we lost write perms, we also won't be able to continue on those PRs, CC triage lead @vocal wolf

#

if you want to assign up for grabs or close them down or whatever

gritty wind
clever wraith
#

not me personally, maybe ak will want to continue working on the worker PRs

green oriole
#

hmm

#

maybe the worker PRs if someone ever review them, yeah

#

rest I don't mind

clever wraith
green oriole
#

thank you

gritty wind
#

Damn it Chris, you commented while I was writing my response smhhhh

vale ibex
#

lol

fallen patrol
#

sir-lancebot#778

dusky shoreBOT
fallen patrol
#

needs one review

#

and is blocking sir-lancebot#968, additionally may solve sir-lancebot#928
if 778 doesn't solve 928, 968 will

dusky shoreBOT
molten perch
#

Oh, actually. It's been quite a while. I'm gonna dismiss my review.

fallen patrol
#

(I didn't even notice 928 existed, but I can fix it in 968)

vocal wolf
#

Thanks for letting me know.

clever wraith
#

bot#1889 has been dormant for a while but I picked it back up, needs reviews

dusky shoreBOT
vocal wolf
#

Just to let y'all know, I've been dealing with finals and will be resuming triage activity very soon.

short snow
#

whhaat

#

how can i remove review requests lol

#

ah nvm, akarys removed himself from codeowners

#

so when i pushed new commit it got removed

clever wraith
#

Yeah

#

Are you still interested in merging the worker PRs we opened?

patent pivot
#

hastebin filter I can merge yea

clever wraith
#

What's the other again

#

Right, robots

patent pivot
#

neat feature

#

robots PR needs adjusting for www prefix

clever wraith
#

Well it is just a file rename from @ to www iirc

#

I don't exactly know, I didn't really exist when this PR was made

patent pivot
#

i believe it is that yeah

clever wraith
#

Yeah pythondiscord.com -> www.pythondiscord.com

#

That and the typo

#

You'll have to do it yourself, we don't have write access anymore

patent pivot
#

yea can do

clever wraith
#

.. You didn't move the file did you

#

I guess it is fine, it doesn't deploy

patent pivot
#

no, I'm just going to do it in a main push shortly

#

hmmm

#

I wonder if this will work

clever wraith
#

Fair

patent pivot
#

yeah this won't work

clever wraith
#

You may want to add more policies while you're at it, like for the paste, merch store and all

patent pivot
#

hmmmmm

clever wraith
#

The worker should be on *pythondiscord.com/robots.txt

patent pivot
#

ah yeah

clever wraith
#

There is no reason it doesn't accept it

#

I don't remember how the priority is computed though

patent pivot
#

yea just trying to build it locally

short snow
#

For bot#196, we only want to put the modlog link if it was invoked in a staff channel right?

dusky shoreBOT
short snow
#

bot#1964

dusky shoreBOT
short snow
#

oops

patent pivot
#

not sure I follow

clever wraith
#

Not like it matters, the link won't be accessible anyway. It is probably good to always have it.

patent pivot
#

it should check if the linking author has permission in a channel before it relays it

#

hmmm

#

I wonder if we should do a perm check for all users in the channel

clever wraith
#

Probably

#

Although be careful of not trying to do a perm check of 280k people

patent pivot
#

abort if users in channel is >150 or something, need to see how expensive

#

yeah

#

it's only enabled in staff categories

clever wraith
#

Fair

patent pivot
#

lol

#

the worker is segfaulting.

#

well, not the worker, the build tool

clever wraith
#

F

patent pivot
clever wraith
#

It worked last time we tried it

patent pivot
#

not even a rust panic

#

backtrace does not work

clever wraith
#

M1 problem perhaps?

patent pivot
#

not on mac

#

arch linux

#

someone said downgrading fixed, will give it a shot

short snow
patent pivot
#

oh... right? was that functionality actually specified somewhere?

clever wraith
#

It worked in codespaces if you want a fallback

patent pivot
#

i'm trying the downgrade now, it's got further

short snow
#

yeah, ignore the red lines, ported the function to utils/messages but haven't imported stuff yet

clever wraith
#

Would it be reasonable for us to get the contrib role since ak has it and we share the same github? Also our account isn't in the bot policy file

patent pivot
#

I'll have a word about the roles, yeah. I'll add the GitHub policy now

#

done

clever wraith
#

Cheers

patent pivot
#

oh that's annoying

#

if you want to update the hosts, you've got to retrigger a compilation

#

how can I force rust to do that

clever wraith
#

Make sense though

patent pivot
#

it makes sense, but not when we're using include dir macros

clever wraith
#

The folder is built into the binary

patent pivot
#

yeah, but I need to rebuild the binary to get the updates to the folder to show

#

and rust won't rebuild unless it detects code changes

#

I can do cargo clean and try again but I have to recompile everything

clever wraith
#

Huh

patent pivot
#

this is what it shows even after host updates, because it doesn't factor in that hosts has changed

#

w-what...?

clever wraith
patent pivot
#

no idea

clever wraith
#

Did we leave debug code in

patent pivot
#

nope

#

it was working because initially i deployed the one with the unchanged file

stable mountainBOT
#

serve-robots/src/lib.rs line 33

Response::error(host, 404)```
clever wraith
#

That should be a pass-through I think

#

Not a straight up 404

patent pivot
#

uhhh

#

that makes even less sense then

clever wraith
#

I think the route isn't working correctly

short snow
#

whats a discord.GroupChannel, trying to update is_staff_channel to take in a MessageableChannel

clever wraith
#

Because that 404 is Django, I'm like 95% sure

patent pivot
#

it is django, yes

clever wraith
#

I guess you could try two routes

patent pivot
#

for where?

stable mountainBOT
#
It has arrived!

Here's your reminder: these released yet?
[Jump back to when you created the reminder](#dev-contrib message)

clever wraith
short snow
#

ah ok, thanks ๐Ÿ‘

#

where should I add the on_message handler, I don't think it's worth a separate cog as it is just <10 lines or should I make a cog?

patent pivot
#

gonna undeploy robots for now so we don't fuck with SEO

#

I would rather have a separate cog

patent pivot
#

oh, because it's just matching any three words separated by a .

#

yeah it needs a smarter regex

fallen patrol
#

^ discord token regex

#

(got it by searching in ddevs for tokens regex and then looking at the results)

#

apparently this is what the client uses to scan for tokens

fallen patrol
dusky shoreBOT
fallen patrol
#

๐Ÿ‘ if someone says I can I'll do that one too, workers is less mainstream so I went ahead with a pr

short snow
#

alright ๐Ÿ‘

#

also whats ddevs

fallen patrol
short snow
#

ah

fallen patrol
stable mountainBOT
#
Aye aye, cap'n!

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

clever wraith
#

Hmm I actually wonder where we found that token

#

I should ask ak but this silly goose hasn't woke up yet

#

Yeah, seems like what arl PRed should work

patent pivot
#

!remind 1h30M deploy

stable mountainBOT
#
Aye aye, cap'n!

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

clever wraith
patent pivot
clever wraith
#

I thought it wasn't working yesterday

patent pivot
#

because there is already a worker it seems

#

any other domain works

clever wraith
#

Hmf

#

When more than one route pattern could match a request URL, the most specific route pattern wins. For example, the pattern www.example.com/* would take precedence over *.example.com/* when matching a request for https://www.example.com/. The pattern example.com/hello/* would take precedence over example.com/* when matching a request for example.com/hello/world.

#

Okay, so you should be able to just add a www.pythondiscord.com/robots.txt route to force it

#

What does the other worker do?

patent pivot
green oriole
#

Hmm how does it work?

patent pivot
#

might have a picture somewhere

#

injects some HTML

green oriole
#

In case the website is down?

green oriole
#

Hmm

green oriole
#

It is sad it doesn't have precedence

#

Cool

#

Now for the 404, do you want it to be pass-through or straight up 404 Not found

patent pivot
#

pass through I think, was just gonna change that but also fine if you want to handle that, I'll be around for a PR merge

green oriole
#

Still in my bed rn, feel free to change it

#

Did Xavier ask about the contrib role

#

I think he did

patent pivot
#

Yes - it'll get discussed probably at next admin meeting

#

wow, workers-rs is missing a lot

#

no way to get request status?

#

oh wait hm

#

yea

#

hmmm

#

hmmm there is

#

okay yep got it, works in prod, about to push

#

also ARL's PR is now deployed and filter is now re-enabled

clever wraith
#

Good stuff

#

Just need to add more policies

#

What's in charge of the redirect?

stable mountainBOT
patent pivot
#

nginx controls the redirect

clever wraith
#

But if it passes through to the cluster shouldn't nginx redirect?

patent pivot
#

wait

#

i am getting redirected?

#

yeah

clever wraith
patent pivot
#

it's definitely directing

#

something is going wrong at your end - it's also possible your device omits www prefixes, which a few browsers do nowadays

clever wraith
#

How weird

patent pivot
#

curl doesn't lie

#

thank you bagder for your beautiful tool โœŠ ๐Ÿ˜”

clever wraith
#

If I manually move to www I get the robots file

#

Otherwise 404

#

Ak has some things to say about curl ipv6 support I believe haha

patent pivot
#

what things? curl works fine with v6

#

curl -6

clever wraith
#

He had to manually specify the interface or something

patent pivot
#

peculiar, haven't ever found curl problematic with v6 before unless the underlying host has misconfigured v6

clever wraith
#

Weird

naive bloom
#

!contribute

stable mountainBOT
#

Contribute to Python Discord's Open Source Projects
Looking to contribute to Open Source Projects for the first time? Want to add a feature or fix a bug on the bots on this server? We have on-going projects that people can contribute to, even if you've never contributed to open source before!

Projects to Contribute to
โ€ข Sir Lancebot - our fun, beginner-friendly bot
โ€ข Python - our utility & moderation bot
โ€ข Site - resources, guides, and more

Where to start

  1. Read our contributing guidelines
  2. Chat with us in #dev-contrib if you're ready to jump in or have any questions
  3. Open an issue or ask to be assigned to an issue to work on
stable mountainBOT
patent pivot
green oriole
#

so that's where that regex is from

#

buuuuut the code has additional logic to check whenever it is an actual token

#

gotcha

clever wraith
#

What program was used to create the profile pictures for @dusky shore and @fading gale ?

patent pivot
#

think those were the handiwork of @crude gyro, I would guess Photoshop? unsure though

crude gyro
#

yep

#

possibly illustrator

#

but probably photoshop

naive bloom
#

Sir lancelot project uses 3.9 I guews

#

Do I have to update to that version?

patent pivot
#

repo archived

green oriole
naive bloom
#

Thank you @green oriole ๐Ÿ™

#

What is the methodology used for the project

#

do I just pick up the issues and start working on them?

patent pivot
#

You can submit a PR for any unassigned issue, if you'd like us to assign it leave a comment on the issue ๐Ÿ‘

naive bloom
#

๐Ÿ™

green oriole
#

hmm I wonder what's the license is on that. Is there a special one for the site content? I guess I wrote it anyway

patent pivot
#

under MIT in theory

green oriole
#

that isn't ideal, hmm

#

funnily enough I may have got the legal copyright onto those documents because they were copied by someone else to the repo. Guess it doesn't matter since they are MIT?

#

GPL contrib guidelines when

patent pivot
#

uhhh, yeah in theory you've still got copyrights on it

#

it does matter

fervent sage
#

especially because i dislike django lol

#

i was looking forward to contributing but now i cant

patent pivot
#

FastAPI maintenance is not looking good tbqh

green oriole
#

LOL

patent pivot
green oriole
#

just wait until there is a security breach and he takes 6 months to merge a fix

patent pivot
#

It's understandable.

#

The project is almost solely maintained by one guy, Django has a whole foundation

#

but it is problematic when we rely on it

green oriole
#

I mean, Tiangolo shouldn't be going alone anymore

#

or he is gonna do another Danny

#

and everyone will be fucked

fervent sage
#

There's a non zero chance if more stuff I always use like discord.py, fastapi die I'll just quit programming - the stupid drama that happens because of it and my skills becoming useless just leads to me self harming

patent pivot
#

so for now we'll be sticking with Django, it's what most people know, it's what we've got tooling for, it's what production Python apps use

naive bloom
#

like FastAPI or smthing?

patent pivot
#

We considered a rewrite to FastAPI, but it wouldn't really solve the problems that we had with the current stack.

naive bloom
#

I love django, great community

#

UTs are nice too

patent pivot
#

We've solved a lot of the problems by making the Django site considerably easier to contribute to, removing the need for /etc/hosts modifications, so on

#

so it's the simplest it's been in a long while

naive bloom
#

DRF

fallen patrol
#

@patent pivot so is the hastebin filter which checks for tokens live now?

patent pivot
#

yea

fallen patrol
#

neat

austere hornet
#

!otn a gonna do another Danny

naive bloom
#

this project is big

#

how can I start ๐Ÿ˜„

naive bloom
#

I have the bot setup on my discord server. How can I interact with the server? For example, I found a command like this coinflip, how can I test this?

naive bloom
#

You guys throw some workshops or sessions for newcomers to learn projects?

#

๐Ÿ˜„

austere hornet
#

Also, I think this conversation should move to #community-meta since this has nothing to do with the PyDis projects which is what this channel is for

summer garden
fading crest
#

p

hoary haven
#

(if my understanding is correct in that you're asking specifically about python discord projects ie @stable mountain @dusky shore?)

naive bloom
hoary haven
gritty wind
austere hornet
gritty wind
#

Uhh... no

austere hornet
#

:(

#

Ok

stable mountainBOT
#
It has arrived!

Here's your reminder: too much going on
[Jump back to when you created the reminder](#dev-contrib message)

austere hornet
stable mountainBOT
#
Affirmative!

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

austere hornet
#

sir-lancebot#901 needs reviews!

dusky shoreBOT
fallen patrol
#

what's that docker command that shows the running containers?

#

or rather, that command that lets you find out if you have multiple running containers for bot or site or stuff

tiny sinew
#

Docker ps

fallen patrol
#

thanks

austere hornet
fallen patrol
#

huh

#

@patent pivot I noticed a few other things, aside from a code change in the token remover, what about the webhook remover? Should they merged?

#

eh they are okay to be seperate

#

the webhook file doesn't actually check the token regex at all.....

#

hmm

#

it should, since there was a false positive a few days ago

#

ah, webhook tokens have a different style

fallen patrol
#

kk

#

hmmm

#

The regex I found has mfa token support, but the style of that doesn't match the current token regex

#

Adding support for that is possible, but I've never seen anyone post a user token here which had mfa

#

found bot#1421

dusky shoreBOT
fallen patrol
#

bot#2006

dusky shoreBOT
austere hornet
#

Eyy 2006 my birthyear lol (yes ik it's off topic)

#

@fallen patrol how did you request review from Joe and Zig? I thought only staff could do that

stable mountainBOT
#

.github/CODEOWNERS line 12

bot/exts/filters/**                     @mbaruh @jb3```
austere hornet
fallen patrol
#

codeowners

austere hornet
#

Ahh

fallen patrol
#

huh @short snow I may have found a bug/security hole in modpings

#

yeah okay this should be solved

#

Well, someone can't exactly abuse it so I'll share here

fallen patrol
#

The tldr if a user was a mod when they ran the !modpings off command, they will be re-granted the role regardless if they have the ModTeam role or not

#

which is... not ideal

short snow
#

modpins schedule (s off) or just the off?

#

also, i am not sure what you mean by

re-granted the role regardless if they have the ModTeam role or not

fallen patrol
#

I'll show you in my server

#

or

fallen patrol
#

Moderation Team and Moderators

magic arch
#

Personally I'd consider that an incredibly far edge case, maybe worth a fix but definitely not a big priority

fallen patrol
#

additionally, mods can remove their role for up to 28 days

#

which makes it a little more possible

#

and because joe was talking about trying to reduce attack vectors, this is probably a good case to resolve, IMO

magic arch
#

Fair enough, I'd say make an issue for it just so it can be patched then

fallen patrol
#

'sides, the fix is easy

#

yeah

patent pivot
fallen patrol
#

neat

#

could you take a look at my other suggested changes on bot#2006?

dusky shoreBOT
fallen patrol
#

need (or don't) approval on those too

patent pivot
fallen patrol
#

cool, will do some refactoring for mfa

short snow
fallen patrol
#

er, I didn't see your pr ๐Ÿ˜…

#

bot#2007

short snow
#

ok yo ualready did

#

yeah

#

cool

fallen patrol
#

You may have better luck implementing it into your file, since I made a few other changes, didn't realise that there was another pr

short snow
#

alright ๐Ÿ‘

short snow
#

@fallen patrol why are adding a separate listener? and not adding it to the same on_message as the token?

fallen patrol
#

because mfa tokens don't have user ids or datetimes, and if they do, its not obvious how

#

so I wanted to seperate the code

#

although

#

yeah I'll look at that

stable mountainBOT
#
No problem.

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

fallen patrol
#

!remind edit duration 3688 6H

stable mountainBOT
#
Can do!

That reminder has been edited successfully!

short snow
#

you can possibly two separate functions to handle token and mfas but only have one listener

fallen patrol
#

~~yeah i'm just gonna delete that reminder

short snow
#

cool ๐Ÿ‘

sweet flower
#

how do you snip

#

?/

magic arch
sweet flower
#

like where you like screenshots bits of ur screen and paste it

sweet flower
magic arch
#

Depends on your device, either way not really a topic for this channel. Check the internet for instructions for your platform

fallen patrol
#

!remind 8H fix bot#2006 commit history...
that was supposed to be amend, not a new commit

stable mountainBOT
#
Sure thing!

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

dusky shoreBOT
austere hornet
green oriole
#

I wish discord were less aggressive about subscribing you to threads and more about unsubscribing you haha

stable mountainBOT
fallen patrol
#

oh

#

@molten perch seems like sir-lancebot#743 and sir-lancebot#968 are about the same, I'd like to work on aspects of 968, but some of it can be removed and return back to 743 if you are wanting to do them

If you aren't, I can.

austere hornet
magic arch
#

Not a core dev, but if there's no license they're copyrighted and we can't use them. Maybe grab different images from https://pixabay.com/ instead, they have decent clipart with a very permissible license.

fallen patrol
#

i have 700+ notifications in github and I only found the tab exists today... so i was trying to mark them all as done

short snow
magic arch
fallen patrol
#

ik but I actually looked through most of them to ensure I wasn't missing anything