#dev-contrib

1 messages Β· Page 159 of 1

magic arch
#

Gotcha

fallen patrol
#

and I like to do stuff from the past to present

#

it glitched and hitting back would end up on the same empty page

#

so I started from the front ;-;

austere hornet
#

Yes I will, probably next weekend, I have a reminder

fallen patrol
#

hmmm, is there a way we can prevent this?

austere hornet
#

Lol too much red

magic arch
# fallen patrol

How did you produce it? Did you try clicking on a button from a while ago?

short snow
#

arl do you have every channel read? lol

fallen patrol
short snow
#

!src subscribe

stable mountainBOT
#
Command: subscribe

Display the member's current state for each role, and allow them to add/remove the roles.

Source Code
fallen patrol
vocal prairie
#

So uh, I keep hearing about this April 2022 deadline. What does that mean, and how does it affect this server? afaik, that's when the message intent becomes mandatory, but that doesn't apply to this server, does it (since none of the bots here are in over 100 servers)? Are there any other changes I'm not aware of?

magic arch
#

Discord is going to be adding a new intent for accessing message contents. We'll need to turn on the new intent for our bots, but there's no big deal there. It only requires approval from Discord for verified bots (more than 100 servers), so not us. We'd just need to update in the portal and probably where we initialize the bots in each repo

#

TL;DR: We'll need to enable it, but that's not a big deal for us. (Although discord.py not supporting it might be interesting)

short snow
#

And discord is also releasing some new features which discord.py doesn't support

vocal prairie
fallen patrol
#

be it switching to a fork, or just patching dpy to provide the msg intent, it must be updated

magic arch
#

I think we're good with d.py, it has a messages intent already, the only change is that it's becoming privileged which doesn't affect the code

#

!d discord.Intents.messages

stable mountainBOT
fallen patrol
#

not the same intent

magic arch
#

Oh is it really?

fallen patrol
#

correct

#

and it's not documented by discord yet, either

#

but it has been confirmed its a new intent

#

of message content

magic arch
#

Interesting, well I assume we can probably patch it somehow

fallen patrol
#

yeah, it's not hard

#

but in April if that doesn't occur the bots won't work

vocal prairie
fallen patrol
#

[redacted]

patent pivot
# fallen patrol [redacted]

I wouldn't spread that around, that's not confirmed in any way, we've not had any discussion on this internally

fallen patrol
#

...hence the two disclaimers at the bottom

patent pivot
#

right, but I'm not sure how the disclaimers help that statement, people aren't going to care about that. just hold off on starting rumours like that until we actually hold some form of discussion amongst core developers

fallen patrol
molten perch
#

Sure, feel free to do it, I was waiting for the issue cog merge PR to be merged, so if it’s merged, go for it!

fallen patrol
#

its still not merged lmao

#

!remind 1m

stable mountainBOT
#
Absolutely!

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

fallen patrol
#

uh

#

!remind 1m

stable mountainBOT
#
ROGER THAT

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

fallen patrol
#

wait what

#

deleted the extra...

#

...how can i run a docker container in a development mode?

fallen patrol
#

like, bot or lance

cold island
#

I'd look at the guides for the respective env vars

patent pivot
#

since we don't use it in production

#

so it has bind mounts that mean you don't need to rebuild the container to adopt new code

fallen patrol
fallen patrol
patent pivot
#

should be the case

fallen patrol
#

interesting, okay

cursive relic
#

sir-lancebot#918 in what state?

dusky shoreBOT
cursive relic
#

I'm just curious

#

ah I found the pr

short snow
#

in_whitelist doesn't work for on_message yet i.e. it excepts discord.ext.commands.Context as a parameter, so for the more unfurls pr can i edit the check?

#

secondly, currently more unfurls would only work in staff channels, so i am just using the is_staff check and keeping the in_whitelist part commented out as said in the issue

cold island
#

I don't follow

#

Do you need in_whitelist or do you not

short snow
#

Right now nope, in future yes

cold island
#

Well we can consider the change when it's needed

#

But if you just need to make sure that you're listening to messages in specific channels you can just make the check inside the listener

clever wraith
#

Can some people look at bot#1889?

dusky shoreBOT
white light
#

Did something with the python bot change recently? It's not finding list.insert.

brazen charm
#

It can't find list methods other than sort

white light
#

What if I do...

#

darn

vale ibex
#

Yea, the python docs don't supply symbols for those functions

white light
#

so it's a limitation, not a bug.

vale ibex
#

Yea

#

a limitation of the Python docs themselves

white light
#

it's a bug in the python docs.

green oriole
#

I've opened a ticket on bpo

#

It is somewhere in #dev-core

vale ibex
#

It's because those functions are inherited by list, rather than against list themselves iirc

green oriole
#

Nah

#

The problem is because those methods are defined in a non standard page that has a no docs tag

vale ibex
#

ahh

white light
#

!e ```py
help(list.insert)

brazen charm
#

They're defined on some tutorial page

stable mountainBOT
#

@white light :x: Your eval job has completed with return code 1.

001 | Traceback (most recent call last):
002 |   File "<string>", line 1, in <module>
003 | NameError: name 'help' is not defined
green oriole
#

Chris can you find the bpo number in the core dev chat pls

brazen charm
#

then some operations are also defined for sequences and mutable sequences but those are in a table that also can't be reference directly

brazen charm
vale ibex
vocal prairie
green oriole
#

Thanks

fallen patrol
#

could I contribute this upstream? πŸ₯Ί

brazen charm
#

Feels rather large for what it is

fallen patrol
#

using a button rather than a reaction. this also means ephemeral replies when already bookmarked by the user

fallen patrol
thorny obsidian
#

sir-lancebot#933

dusky shoreBOT
thorny obsidian
#

*932

#

sir-lancebot#932

thorny obsidian
#

It's already an issue and just needs core dev approval. I believe the person who made the issue wanted to implement it as well

fallen patrol
#

ah

clever wraith
#

I left another suggestion

#

hmm I should probably update the profile picture

fallen patrol
#

uh oh

#

!src

stable mountainBOT
fallen patrol
#

oh its bot#2011

dusky shoreBOT
clever wraith
#

da heck

fallen patrol
austere hornet
fallen patrol
fallen patrol
#

yeah

austere hornet
#

Oh ok, I'll change it for both then

fallen patrol
#

If a core-dev approves it here, I'll fix up those docstrings, heh

gritty wind
austere hornet
fallen patrol
austere hornet
#

@fallen patrol What do you think would be a good title? I honestly have no ideas lol

fallen patrol
#

same Β―_(ツ)_/Β―

austere hornet
#

Oh I thought of one, "Is this you or did you turn into Santa Claus all of a sudden?" What do you think about that?

#

Btw if you haven't guessed I copy/pasted the spookify command that's why I still had the old embed title there

fallen patrol
#

:x_square:

austere hornet
fallen patrol
#

whups

#

ignore that

austere hornet
#

Lol

#

Ok

fallen patrol
#

could a core dev look at and maybe approve sir-lancebot#976?

dusky shoreBOT
clever wraith
#

that's very sad, ak was planning on approving that haha

fallen patrol
#

πŸ˜”

austere hornet
#

sir-lancebot#901 needs reviews!! I think I just need one more review to get it merged!

dusky shoreBOT
fallen patrol
thorny obsidian
#

It's missing a core dev approval, Tizzy's requested changes doesn't block the PR.

fallen patrol
#

ah, I see

fallen patrol
#

(inb4 a core dev says that a DoS attack on lance isn't really bad)

#

But basically, if a user runs multiple of that command, then sends a message, they can get up to lance editing around 8 messages per message they send, which does lead to rapid api spam

#

I sent a fix in the suggestion, and tested it locally, so it should be good to just add.

#

And yes, the error handler doesn't actually handle errors of multiple concurrency, so

#

That can be resolved with either a local error handler to set handled on the error if it is of commands.MaxConcurrencyReached to True, or a pull request to update the error handler.

#

update: I've sent another comment which features the local error handler solution. πŸ˜„

short snow
#

could i get another review on bot#2001

dusky shoreBOT
fallen patrol
short snow
#

no nitpicks πŸ‘€

#

nice

inland fulcrum
#

hi

stable mountainBOT
#

:incoming_envelope: :ok_hand: applied mute to @inland fulcrum until <t:1639453407:f> (9 minutes and 59 seconds) (reason: duplicates rule: sent 4 duplicated messages in 10s).

fallen patrol
#

it was so minor i didn't leave it

#

but tldr since the docstring is 8 hours minimum, I would have made the constant use that instead of 24 - 8

rapid swallow
#

!ban 920153402007244810 Sending IP loggers

stable mountainBOT
#

:incoming_envelope: :ok_hand: applied ban to @inland fulcrum permanently.

fallen patrol
#

saw that typing indicator

rapid swallow
short snow
fallen patrol
#

if something affects both bot and lance (eg it was ported from one to the other) which repo would have the enhancement issue?

#

My assumption is bot

#

oh nvm it only impacts bot lol

fallen patrol
#

πŸ‘€

#

I uh

#

sorry about that...

static canyon
#

No worries lol

#

Now you know πŸ˜„

fallen patrol
static canyon
fallen patrol
#

yep ofc

#

sir-lancebot#884 πŸ₯Ί

dusky shoreBOT
fallen patrol
#

saw a maybe-mark up for grabs and am curious what exactly the problem still is, I'd like to mayhaps have a stab at it if you still intend to give it up

static canyon
#

Oh, that

#

It turns out there's loads of bugs in it that just haven't been discovered

#

I ended up having to do all sorts of hacky overriding dpy classes

#

I might start from scratch again

static canyon
stable mountainBOT
#
Alright.

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

austere hornet
static canyon
#

(Sorry kat, forgot to disable the ping)

austere hornet
short snow
fallen patrol
#

bot core is public finally nice

fallen patrol
#

!pypi markdownify

stable mountainBOT
fallen patrol
#

as of version 0.7.0 (bot is on 0.6 right now) this will make the docs command much less helpful

#

(ignore the rest of the implementation)
top is 0.6.1, bottom is 0.7.4

short snow
#

uhh i don't see anything that would make the embed so

fallen patrol
#

wait this isn't it

#

gotta test more

short snow
#

is it there in the docs

fallen patrol
#

wrong commit

#

i've updated the link

short snow
#

Tl;dr ```py
def convert_hr(self, el, text, convert_as_inline):
return '\n\n---\n\n'

fallen patrol
#

yeah i'm not sure how that causes a problem

#

unless this is like that ... regex problem black had

#

ah

#

this is how that line of code actually works

stable mountainBOT
#

markdownify/__init__.py line 96

convert_fn = getattr(self, 'convert_%s' % node.name, None)```
short snow
#

ok i think i know why

fallen patrol
#

yeah that makes sense how that changes the output

fallen patrol
short snow
#

one sec, lemme cross check with the bot source

fallen patrol
#

think i found it

short snow
#

ok nope, ignore

fallen patrol
#

yep

#

this the latest version

short snow
#

remove hr?

fallen patrol
#

...

#

@brazen charm πŸ‘€ how did i not notice that

fallen patrol
#

well while doing the above not-actually-a-bug-yet thing i did find a real bug

#

!d cleardoccache will error on success

fallen patrol
patent pivot
#

Β―_(ツ)_/Β―

fallen patrol
#

i mean

#

i can successfully recreate it

#

but i don't know exactly what github is doing differently

#

if i use the integrated support in my ide then 100% that event gets through

vocal wolf
#

holy crap there were a lot of unlabeled PRs in sir lance

short snow
#

Could I get another review on sir-lancebot#745

dusky shoreBOT
austere hornet
#

Also sir-lancebot#901 needs 1 more core dev review to get merged I think

dusky shoreBOT
clever wraith
#

Maybe something worth running on the cluster?

#

Well, in front of the cluster rather

gritty wind
#

I imagine whatever scanning nginx is providing, CF is providing better

#

Considering they've rolled out the mitigation across all sites, I think we might not gain much

clever wraith
#

do you have a pro CF subscription?

gritty wind
#

It's deployed globally

clever wraith
#

oh actually

#

yeah

#

I thiiink we got an email about it

gritty wind
#

yup

patent pivot
#

A NGINX blog post about mitigating Apache vulnerabilities is beautiful

fallen patrol
#

nothing

austere hornet
#

Lol

trail pilot
#

Is it just me or is Sir Lance really slow today

#

rather, it's not answering calls:
#aoc-bot-commands message

gritty wind
#

yeah we're having infra problems today

#

Currently being worked on

fallen patrol
trail pilot
fallen patrol
#

not sure if I'm doing something wrong but I did receive an error locally with the aoc command πŸ˜…

brisk brook
trail pilot
#

Ah

timid sentinel
fallen patrol
#

!paste

fallen patrol
#

lol

#

yes, yes it is that being down

timid sentinel
fallen patrol
#

lmfao

austere hornet
#

Hah

fallen patrol
#

infra resolved yet?

#

yeah seems like it

#

<@&409416496733880320> policy bot needs to be re-asserted on sir-lancebot#944, it should be merged since it has two approvals

dusky shoreBOT
gritty wind
#

It's passing

#

It refreshes when you go to the website

#

it's just that we just got our ingresses up

fallen patrol
#

oh

patent pivot
#

lol

#

did they come up

fallen patrol
#

aha wait i can press update branch

gritty wind
#

Yeah see dev-ops

fallen patrol
#

and that is why it hadn't merged

fallen patrol
#

merged

fallen patrol
patent pivot
#

probably won't

#

we'll see

fallen patrol
#

.colour hex 7289da

#

i-

#

when a pr doesn't actually do anything πŸ₯²

patent pivot
#

lol

fallen patrol
#

how did that even

#

.colour

dusky shoreBOT
#
Moon Raker

Colour information for Colour Moon Raker.

RGB

(214, 206, 246)

HSV

(252, 16, 96)

HSL

(252, 69, 89)

CMYK

(13, 16, 0, 4)

Hex

#D6CEF6

Name

Moon Raker

fallen patrol
#

....

#

because all of the subcommands are treated differently.

#

well that's an obvious mistake, I'll go try and fix that and submit a new pr

#

why does that even happen, why does whitelist_override not apply to subcommands?

gritty wind
#

Because d.py doesn't propagate it, and we don't /shrug

fallen patrol
#

sigh

gritty wind
#

in fact, it wouldn't be possible unless you patch groups

#

the override doesn't actually have any way to know it's wrapping a group, because the group deco sits on top of it

#

I guess we could take a group key like redis does namespaces

#

nah nvm

fallen patrol
#

I'm thinking I'll re-implement this override like this:

# top of the file
colour_whitelist_override = whitelist_override(
        channels=constants.WHITELISTED_CHANNELS,
        roles=constants.STAFF_ROLES,
        categories=[constants.Categories.development, constants.Categories.media]
    )

# on each subcommand command:
@colour_whitelist_override
gritty wind
#

Can you get a command's group from ctx?

fallen patrol
#

!docs discord.ext.commands.Command.parent

stable mountainBOT
gritty wind
#

bah

#

We could possibly check that in the whitelist check, and then use the base

#

Something like:

if hasattr(ctx.command.callback, "override") or (parent := ctx.command.parent) and hasattr(parent, "override"):
#

perhaps a little less hard to read 🀑

fallen patrol
#

!remind 30M be less ugly

stable mountainBOT
#
Okay.

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

fallen patrol
#

*i mean the code

gritty wind
#

uh huh

fallen patrol
#

oh good

#

not necessary to use recursion

#

!d discord.ext.commands.Command.parents

stable mountainBOT
#

property parents: List[discord.ext.commands.core.Group]```
Retrieves the parents of this command.

If the command has no parents then it returns an empty [`list`](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.9)").

For example in commands `?a b c test`, the parents are `[c, b, a]`.

New in version 1.1.
stable mountainBOT
fallen patrol
#

its a lot more complicated than just that if statement πŸ˜”

fallen patrol
#

for some reason, that function isn't running at all

#

^ tldr typo

#

it works now

#

sir-lancebot#981

dusky shoreBOT
austere hornet
#

So I'm still confused about how to remove the blue pixels from the pfp. Is that a Pillow function or is it some other way? I don't think that question was ever answered

fallen patrol
#

i think that answers it? not sure

austere hornet
fallen patrol
#

oh

austere hornet
# fallen patrol I have no idea, it looks like something with this https://pillow.readthedocs.io/...

That looks like the same function you said to use for flattening the image. That doesn't seem to be what I need for taking out the blue pixels. I was kinda dumb and forgot about Google so I found this, I think this is more what I need, let me know what you think: https://stackoverflow.com/questions/49280402/python-change-the-rgb-values-of-the-image-and-save-as-a-image/49280658

fallen patrol
#

ah πŸ˜…

fallen patrol
#

oops

#

could someone re-open sir-lancebot#970?

dusky shoreBOT
magic arch
fallen patrol
#

ty

magic arch
#

woo typo: bot-core/.github/depndabot.yml

gritty wind
#

lol

#

Thanks

#

I didn't even see your PR

#

I've added a webhook to stop it from happening again

magic arch
#

Loll no worries

fallen patrol
gritty wind
#

yes

fallen patrol
#

so that's why I thought it was closed source

austere hornet
static canyon
austere hornet
austere hornet
gritty wind
#

Fuck sake, just accidentally pinged tizzy instead of @brisk brook on the unfurl PR again πŸ€¦β€β™‚οΈ

#

I don't know why lol

#

Anyways, what I was getting at is that you need to run b!blacklist add redirects https://tinyurl.com

brisk brook
#

Ah, and no. I did not add tinyurl to the filter list.

#

Why isn't that listed here?

#

old screenshot from originally setting it up

gritty wind
#

Is your site updated?

#

Try running docker-compose down site && docker compose up -d site

#

Discord is painfully slow right now

brisk brook
#

I believe I executed docker-compose build so yes, I can check again before I go. Testing all other PRs I have been requested a review on

gritty wind
#

The list is dynamically pulled from site, and it's live in prod right now, so not sure what to say

vale ibex
#

docker-compose pull will update cached remote images

brisk brook
#

On another note, I am testing bot#1989 and I am getting this?...

dusky shoreBOT
brisk brook
vale ibex
#

No worries πŸ˜„

brisk brook
vale ibex
#

bot#2016 πŸ˜„

dusky shoreBOT
vale ibex
#

It did fix, Zig's PR just doesn't have that changeset

brisk brook
#

Yeah haha

cold island
#

Feel free to merge main

#

Or you can do it locally

brisk brook
#

Aaaah, I pulled web and now I get 404's on bot#2006

dusky shoreBOT
brisk brook
cold island
#

git merge main here as well?

brisk brook
gritty wind
#

What do you have in your config

#

the route is supposed to be /api/healthcheck

#

But it looks like you are still on the old subdomain system

brisk brook
#

Doing Ctrl + F in my bot config I don't have any reference of healthcheck?

#

Or are you talking about configuration for site?

austere hornet
gritty wind
#

Yes, you're looking for URL for site

#

If you're using the testing server, we've updated the config on notion

brisk brook
#

Oh perfect I'll copy that again then

brisk brook
gritty wind
#

Yes, there’s a note at the top about setting web

#

For docker users

brisk brook
#

Ah, of course sorry. I remember changing something to get Docker to work but totally forgot what I did

gritty wind
#

A lot of people miss that note, I wonder what can be done about it

cold island
#

The bot guide also has that explanation

cold island
gritty wind
#

We can’t exactly move it midway into the file, unless we make it uncopypastable, but then people won’t even see there is a second half to copy

brisk brook
#

It's red, but not like "Aaaaaaahhh" red.

gritty wind
brisk brook
cold island
#

LOOK AT THIS >>>>>>>>>>>> ⚠️ !!CAUTION!! ⚠️ <<<<<<<<<< LOOK AT THIS

brisk brook
#

I read it the first time I set up the config, when I actually read the page.

#

But now I forgot I changed anything and just skipped that text since I had read it previously

#

Maybe add it as comments?

gritty wind
#

Where

cold island
#

in the yaml

gritty wind
#

Who’s scrolling that far down in the first place

cold island
#

People who copy the config

gritty wind
#

I don’t follow

#

If we put it inside the config, and people aren’t reading it

#

No matter where you put it

#

It won’t be read

cold island
#

hmm well yeah you won't know to look there actually

gritty wind
#

Putting it beside URL is pointless if people dont know they need to modify the url

#

One solution would be to make two configs, one defined for docker, and one for local

#

And put each under a subpage

#

That’ll force you to read enough

#

But it’s also inconvenient to maintain

brisk brook
gritty wind
#

Because you knew you had a url problem πŸ˜›

brisk brook
#

Hmm, the error seems rather clear about it:

aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host pythondiscord.local:8000 ssl:default [None]

#

Maybe we could leave those blank and force someone to set them depending on setup?

#

As in, set some crazy value that will error out and draw attention with a comment explaining what needs to be done.

vale ibex
#

I'd rather we just set the default to Docker values

#

Since that's the one new contribs are using

#

And then have a message at the top how to change it to run locally

green oriole
#

how is the whole metricity slow as fuck DB thing going?

static canyon
green oriole
#

I think I told at least five persons in total to look at that header in the staff server page lol

static canyon
green oriole
#

nice, nice

static canyon
green oriole
#

!u

stable mountainBOT
#

You are not allowed to use that command here. Please use the #bot-commands channel instead.

green oriole
#

Look it is fast!

static canyon
#

Before the improvements it took >19 seconds; now just .4s

gritty wind
#

Chris majicked it

trail pilot
#

Idea:
an AOC day command on sir lance that just explains the gist of that day? or rather posts a small excerpt from the day

i forget what day had what when people talk about days and i've noticed other people have the same problem

gritty wind
#

Would we PR in a summary each day?

austere hornet
green oriole
#

that's cool

fallen patrol
static canyon
#

You can't modify someone else's avatar

gritty wind
#

I don't think redis is write for this

green oriole
gritty wind
#

People would spend a lot of time writing it, it shouldn't be stored somewhere we can lose it

green oriole
trail pilot
fallen patrol
#

we don't take a user arg for them, no

static canyon
#

And you can't do it for someone else

green oriole
static canyon
#

Which is what I said

green oriole
gritty wind
#

I'm not involved in AoC decisions rn

green oriole
#

a pin seems like a pretty mild decision :3

austere hornet
# static canyon Which is what I said

Ok, I already understood. My next question is: as I was working on Christmasify (sir-lancebot#956), @fallen patrol left a review saying I should change the brief so that it says "your own avatar", which I agreed with earlier. But then I noticed it said "a user's avatar" in the spookify command so I asked in this channel what the briefs should actually say and arl responded saying both should say "your own avatar". So I said ok, then we should open a new PR to fix that on Spookify instead of doing it all in the Christmasify PR. So what I'm asking is - do you approve of either me or arl doing that? I believe arl wanted to do that iirc but if not I can open the PR, no problem.

dusky shoreBOT
vocal prairie
#

I think "a user's avatar" is fine as the code isn't targeted at a specific user.

austere hornet
fallen patrol
#

now it just works on yourself

green oriole
#

I don't think commands should be able to be ran on other users because copyright issues

vocal prairie
vale ibex
#

Alright, site#636 and bot#2016 are two fairly small changes, which in themselves are reverts

patent pivot
#

so we can show activity blocks all the time now

magic arch
#

I can't be the only one annoyed that !communities doesn't work for the !guilds tag πŸ˜‚

fallen patrol
#

gonna take a look at bot#2015

dusky shoreBOT
fallen patrol
#

could someone assign me?

hoary haven
fallen patrol
#

i'm too tired, what do you mean?

hoary haven
#

if you're willing to stream can i watch?

#

also do we have it to ignore pings of our various bots?

fallen patrol
#

but it doesn't ignore self mentions, lol

#

so if you mention yourself in a message that counts ;-;

#

anyways I'm gonna go sleep

hoary haven
#

me2, gnight!

fallen patrol
stable mountainBOT
#
Can do!

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

fallen patrol
#

could someone maybe approve and assign me to sir-lancebot#976? πŸ₯Ί

dusky shoreBOT
static canyon
#

I've not got access to a computer but @fallen patrol if you wish to implement the reminders thing then go ahead

#

I would like to be kept "in the loop" so to speak though please

fallen patrol
#

πŸ‘

static canyon
#

I'll assign you when I get on my laptop

#

Altho I just realised it hasn't actually been approved yet so don't start yet

fallen patrol
#

ah, core devs have to approve, ignore that ^

#

I thought it was moderators and up

static canyon
#

I can ask πŸ‘

fallen patrol
#

cool

fallen patrol
stable mountainBOT
#
You got it!

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

surreal venture
#

paste.pydis halted?

patent pivot
#

yep, having a few issues with cluster, investigating

surreal venture
#

oh okay

green oriole
patent pivot
#

which bit

patent pivot
#

we've got queries that took 4 or 5 minutes now taking seconds

green oriole
#

I mean what changed with that tool?

patent pivot
#

we hadn't auto-vacuumed in a while because of problems with the containers shared memory

#

we've changed the base image of postgres to now include pg_cron and pg_repack

#

we were intially using cron to refill the message cache by refreshing a materialised view

green oriole
#

And the schema is still the same?

patent pivot
#

but now with repacked data we shouldn't need to do that

#

yeah, schema is the same, right now we shouldn't need to make any modifications to metricity

austere hornet
#

Something is up with the bots lately, does anyone know why? First @slow bone now @stable mountain ?

gritty wind
#

Yup, our infra is partially down at the moment

#

We're working on resolving it

short snow
#

lance down?

#

ah ok

gritty wind
#

Yup

short snow
#

what happened though?

austere hornet
#

So something happened to the infra

short snow
#

yeah i was asking why infra is down

austere hornet
gritty wind
#

The specific reason is one of our nodes has failed, and it's slowly coming back

vale ibex
#

should be back up now

magic arch
#

Help channels are moving around again and Lance is responding so lgtm

patent pivot
#

yeah, we're all fixed

green oriole
#

are all the recent issues due to Linode thonking

patent pivot
#

some are, some are just capacity things

green oriole
#

sadge

patent pivot
#

hopefully we're mostly stable now, we'll see if there is anything we can change to stop resource surges and stuff

stable mountainBOT
stable mountainBOT
fallen patrol
#

!remind 6H datetime, datetime, my old friend reminder pr approvement

stable mountainBOT
#
ROGER THAT

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

fallen patrol
#

@hoary haven bloop bot#2015

dusky shoreBOT
fallen patrol
#

voice channel or dm?

hoary haven
#

come to code help 0?

fallen patrol
#

bot#2015 and the fix, bot#2017

summer garden
#

I've been working on sir-lancebot#787 with mathstrains, but we've come across a couple hurdles and development has stalled. If I were to make a draft pr, could I get some pointers? The core functionality is there but the implementation seems messy

dusky shoreBOT
fallen patrol
#

@cold island message.mentions is returned by the api, of what users were mentioned. if the replied to user is in the message content, they would still only get one mention, and it's only counted once

cold island
fallen patrol
#

if they were mentioned in the message, they're automatically mentioned by the reply

#

like

#

reply to one of my messages with a mention to me, and turn off the reply mentioning

#

you'll see that it'll actually mention me, and show the little @ graphic in the UI

cold island
#

Ah I see

#

hmm

fallen patrol
#

so it's not possible to reply with the user mention in the body without mentioning the user as a reply

cold island
#

Wait but

#

how will you know it should be subtracted?

#

Since it should only be subtracted if it was a reply but not a mention

fallen patrol
#

wdym

#

(I'm not at my pc rn)

cold island
#

I realize it's an edge case, but between this and making async calls for every relevant message that is a reply I'm wondering if it's the right approach

fallen patrol
#

well, it only makes the async call IF it's not found in cache

cold island
#

oh

#

Might be a good idea to add that as a comment

fallen patrol
#

although there is a very very very edge case bug there where its possible the message is deleted, and not a DeletedReferencedMessage, so I need to try/except that fetch..

fallen patrol
fallen patrol
cold island
#

But I'm wondering if it'll be more straightforward to just find all mentions in each message

fallen patrol
#

!d discord.Message.mentions

stable mountainBOT
#

A list of Member that were mentioned. If the message is in a private message then the list will be of User instead. For messages that are not of type MessageType.default, this array can be used to aid in system messages. For more information, see system_content.

Warning

The order of the mentions list is not in any particular order so you should not rely on it. This is a Discord limitation, not one with the library.

fallen patrol
#

this is users who are mentioned, as determined by discord

cold island
fallen patrol
#

yeah I'll do that

#

it's such an edge case tho

#

referenced message would need to be out of cache, and deleted instantly after the user replied to it

cold island
#

Sure, but it won't cost us really and the Sentry issue won't be fun πŸ˜„

fallen patrol
#

yeah

#

and it's really only likely to happen during a raid which happened while the bot redeployed and lost cache

#

so even more stuff to happen during an already stressful time πŸ™ƒ

cold island
#

For posterity, you can also mention somewhere that this approach has the advantage of only counting mentions resolved by Discord, since I can see it being a point of discussion in like 2 years

fallen patrol
# cold island if this is something we can predict now I'd rather have the code handle it

so.... if we did regex for the mentions we wouldn't need to fetch the message as we'd be able to see if it mentioned... although we'd have to use several regexes which seems harder.

  • codeblock regex, so we don't match within a codeblock
  • making sure all users that we match are actually in the guild (so mentions of banned users or such for some reason doesn't trigger it)
#

oh lol, I'll just mention the above part

#

cc @hoary haven, we had another discussion about bot #2015 (since I believe you are interested in following along)

austere hornet
#

Congrats on helper @summer garden !

summer garden
#

thanks mate

austere hornet
fallen patrol
#

sir-lancebot#778 needs two reviews πŸ₯Ί

dusky shoreBOT
fallen patrol
#

is there a way I can run docker, but attach my terminal to stdin?

gritty wind
#

docker run -it

#

it's catchy

fallen patrol
#

I've been using docker-compose up, what's the difference between docker run -it

gritty wind
#

-t (tty), which on top of what docker run does with attaching input/output, will also pass along signals
-i (interactive) will keep stdin alive

#

but it's not directly related to docker-compose

#

for that you'll want docker compose run, which by default does allocate a tty

#

so you could do that, or you could docker compose up detached, then attach with docker attach

austere hornet
#

sir-lancebot#901 also needs a review (core dev)! Sorry I keep asking, but it's been up for a while now

dusky shoreBOT
fallen patrol
#

oh okay

#

i-

#

the filters delete every offending message individually?!

gritty wind
#

Most filters only have to delete one message at a time

fallen patrol
#

true, Ig i'm surprised that burst doesn't, it seems

#

burst and duplicates*

cold island
#

it's also often not all in the same channel

#

And also the deletion event can continue as the user(s) is (are) sending messages

#

I might look at optimizations as part of the rewrite, but it's not worth dealing with now imo

fallen patrol
#

during a raid it would be nice to be able to delete in bulk, as there's so many messages in all of the channels

#

poor @stable mountain hits* so many ratelimits during that

* due to ratelimit handling it doesn't actually get 429s, but dpy is sleeping in the background

#

oooo

cold island
#

Yeah it doesn't seem like we'll lose functionality by switching over (eventually)

fallen patrol
#

i see one loss

#

perma mutes

#

seems like the max length for timeouts is 28 days

cold island
#

huh

#

well we don't use perma mutes, and when we do they're not meant to stay

fallen patrol
#

ah

#

i thought i saw some 2 month mutes or stuff

#

although maybe i confused that for bans

#

or i confused that for modpings schedule

cold island
#

lol

fallen patrol
#

all of the features kinda meld into one feature in my head, don't judge me

gritty wind
#

I mean worst case scenario we just have python reapply the mute once it expires

#

We already keep track of a mute all throughout its lifetime

#

Which funnily enough does mean we have tasks that’ll outlive the bot going right now

patent pivot
#

lol

stable mountainBOT
fallen patrol
#

uhhh, sorry in advance for this issue dump!

  • could a core dev maybe approve sir-lancebot#976 (tic tac toe)
  • two reviews are needed on sir-lancebot#778 (merging github autolinking)
  • tizzy said bot#1924 (remind datetime) wasn't approved yet, but I'd like to get started on that :D (also want to discuss scope, perhaps could add expiration time or duration to infraction commands too)
patent pivot
#

don't worry about infraction commands

fallen patrol
#

cool

fallen patrol
patent pivot
#

yeah, just not a thing we're going to end up using

#

we time people out with a duration so they serve that duration, doesn't matter when it expires, be it early morning or late night

fallen patrol
#

right, right

#

...after commenting that, I can't think of a single problem that being able to set a specific time when someone's punishment would expire would solve

#

oh missed that, could you also assign me in addition to keeping tizzy, to bot#1924? #dev-contrib message

dusky shoreBOT
fallen patrol
#

@hoary haven are you able to provide a bit more context for bot#2019 for us plebs? πŸ₯Ί

dusky shoreBOT
hoary haven
#

so you saw the issue? bot#2018
we re-ordered the embed to 2, 1, 0 about 30 days ago. joe pulled the stats then and now, and while the changes aren't drastic, they are about what i expected and show the effect that i was looking for..

that being said the cost of building a new !ot command that would dynamically pick the least recently active off-topic channel probably isn't worth it, so we're going for just hardcoding #ot2 instead.

dusky shoreBOT
fallen patrol
#

ah

fallen patrol
magic arch
#

Just one is probably simpler imo

hoary haven
#

maybe. i'm curious to see what effect this has in another 30 days, so like the idea of leaving it to a single channel for now.

fallen patrol
#

agreed

fallen patrol
#

sir-lancebot#982 @short snow πŸ₯³

dusky shoreBOT
fallen patrol
#

!pypi python-dateutil

stable mountainBOT
fallen patrol
#

@static canyon I'm not really sure that bot#1924 needs a new converter

dusky shoreBOT
austere hornet
#

I really wanted to do that but I already have 2 PR's open currently

fallen patrol
austere hornet
#

But with school and stuff

#

Anyways

fallen patrol
#

I have 7 pulls open across pydis right now Β―_(ツ)_/Β―

austere hornet
#

Oh really

fallen patrol
#

also I would say your (currently open) prs are kinda big, too

fallen patrol
# fallen patrol <@!442244135840382978> I'm not really sure that bot#1924 needs a new converter

Okay so basically

  • I've implemented iso 8601 timestamps
  • I've also made the response slightly different if it ends up reminding at midnight on the day of. This can happen if supplied just a single day.

Not implemented:
mm-dd-yyyy
dd-mm-yyyy
The reason I didn't implement these is because the US and rest of the world don't agree on these, but if we can agree on it I can write a converter for it πŸ˜›

short snow
#

I heard arl had a show and was busy pithink

short snow
fallen patrol
#

I thought about it

#

big refactoring

#

wait no

#

not that big

short snow
#

not reall big just after finishing the game add a logic to change the buttons?

fallen patrol
#

(the current implementation for winning is using any() and every different combination)

short snow
#

yeah i saw that

fallen patrol
#

i'll probably try the colour thing lol

fallen patrol
stable mountainBOT
#
No problem.

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

fallen patrol
#

!remind 3M also reminder pr, other typehints lol

stable mountainBOT
#
Yep.

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

short snow
#

a 3 minute reminder πŸ‘€

fallen patrol
#

yes

stable mountainBOT
stable mountainBOT
fallen patrol
austere hornet
fallen patrol
#

thanks πŸ˜›

austere hornet
#

lol, oof indeed

austere hornet
# fallen patrol

(after I said that looks nice I think I wanna take that back) Kidding, this is still pretty nice

fallen patrol
#

lmfao

#

sir-lancebot#982 if you want to try it yourself

dusky shoreBOT
fallen patrol
#

I additionally made some enhancements to the AI (doesn't play any different, but it feels different)

thorny obsidian
#

@hoary haven So, looking at the tag, !off-topic will now call the off-topic-names tag. I know some users will manually call !off-topic for the now !ot embed.

There's not a good way to solve this, because if we rename !ot back to !off-topic, the fuzzy match between that and off-topic-names is too close, and !ot won't produce the embed we want.

I'm wondering if we before we merge this, we make an edit to the tag metadata functionality. Where we can add an alt-names key that we can maybe use if the fuzzy match is close? I'm began to look into this but it's going to take some dedicated time for me to fully wrap my head around the logic and flow for the tag groups.

(cc: @brazen charm @vale ibex)

fallen patrol
#

We can add an alt-names key, yeah

#

I think we got tag metadata merged?

thorny obsidian
fallen patrol
#

I mean, if we have the metadata, I can add the key and logic and stuff

#

shouldn't be too\ℒ️ hard

thorny obsidian
hoary haven
#

mm yeah i had chris try some things locally on his side, whatever works best to get what we want (!ot always getting the single-channel embed)

fallen patrol
hoary haven
#

and the PR isn't urgent so if we want more functionality from metadata that's fine

thorny obsidian
#

I would probably avoid making statements like how hard/easy something is if you haven't looked at it before. I don't think it'll be hard, but I want Chris's and more specifically Numerlor's input on it first.

fallen patrol
#

they hit every channel smh

hoary haven
fallen patrol
#

mina, could you check #dev-branding, they did it in every single channel (and slow enough python didn't get them for spam)
edit: thank you whoever

thorny obsidian
hoary haven
#

yeah, i understand the weirdness of that, but i'd also be curious to see whether the full name !off-topic has been invoked much at all

thorny obsidian
fallen patrol
thorny obsidian
#

Although the viewing stats in grafana is very finnicky and I think the way it calcs it for tags is a bit fucked

hoary haven
#

o! i make new discoveries of grafana every day. will check

thorny obsidian
#

mmmm... !topic will pull the longer command, and people will mistakenly do !topic instead of .topic

fallen patrol
#

I mean, if we add aliases, I wonder if we can add tag blacklists...

#

i mean, we can

fallen patrol
#

actually blacklisting phrases is super simple to implement, looking at the source

thorny obsidian
fallen patrol
#

just a sec, finishing something with bot#2020 and then can focus 100% on tags

dusky shoreBOT
thorny obsidian
#

Soooo, definitely safe to say that it isn't used much at all. So I'm actually fine with not blocking this over the tag rework and adding a new issue to support alt-names for tags

fallen patrol
#

Error response from daemon: driver failed programming external connectivity on endpoint bot_redis_1 (6ce31309b81ddde1640181a2f08041d80cd11190621a2e182c8a31095618d053): Bind for 127.0.0.1:6379 failed: port is already allocated
....

fallen patrol
#

ah its because both @dusky shore and @stable mountain have the same configured bind for redis so i can't run both of them at once

#

or wait

#

i only need one redis running, don't I?

#

Bot and lance can use the same redis, yeah?

hoary haven
fallen patrol
#

meh, don't care enough rn tbh

#

ready to look at tags now

thorny obsidian
#

Sometimes, when the wind is just right and the moon is exactly full it'll provide useful data

#

But anyhow I approved~

fallen patrol
#

we could blacklist tag names

#

so someone who tries !topic doesn't get met with the off topic embed

#

cc @hoary haven

hoary haven
#

blacklist based on what, the channel it's invoked in? i don't think that would be a good idea. but regarding your earlier question about the "slow" spammers i'm asking mod team

fallen patrol
#

oh

#

Mehr there's a delete button at the bottom of the tag so there's already a solution

thorny obsidian
# fallen patrol I still think this is a concern

If people mistakenly invoke !topic instead of .topic it'll produce an embed of the same length as we currently have. I don't think we need to engineer a solution to try to prevent people from calling an incorrect command because they misremembered the bot prefix.

fallen patrol
#

I just had a conversation with mina, and if you read the message right above yours, you'll see I came to the same conclusion-- there's already a solution for the problem

thorny obsidian
#

I did read the above messages. I still want to clarify that that isn't really a problem that we need to solve. I'd barely classify it as a problem.

short snow
#

is there a transparent emoji on teh emoji server

#

or could we add one

cold island
fallen patrol
#

lol yeah, I added that converter to reminders in 2020

cold island
#

Oh wow, its been a year already? /s

fallen patrol
#

er, bot#2020 *

dusky shoreBOT
fallen patrol
#

oof

short snow
#

open 2022 on jan 1 utc

#

12 days though

fallen patrol
#

lol yeah it'll happen before then

#

hey, admins, I need an emoji added for one of my pull requests. (tic tac toe to buttons)

Its an odd request, given its a fully transparent emoji, but the reason is simple: discord itself sizes buttons differently on different operating systems, so tic tac toe with differently sized buttons wouldn't look too great. The buttons would keep changing size

#

this is the file

cold island
#

How does it solve it?

fallen patrol
#

Since I'm using πŸ‡½ and πŸ‡΄, all of the emojis are the same size

#

but if I were to switch to zero width spaces and spaces, and other stuff, it wouldn't look too great, as on mobile, buttons get sized differently with a smaller minimum size

#

additionally, on the coding end, passing a character to button.emoji is different from button.label, which has to be determined before sending. I'd have to refactor to not use an emoji for a single kind of button

short snow
#

how it looks this

cold island
#

hmmm ok. I never bothered getting permissions for the emoji servers so will need another admin to wake up

short snow
#

weird, clicking on it, increasing its resolution (the image)

fallen patrol
cold island
#

There's no rush, work on it when you're available

fallen patrol
#

yeah

#

there's only a few more bugs, I keep patching them and then I find a few more

#

I'm worried I may have to refactor the entire cog entirely ;-;

#

@cold island is this supposed to be like this?

#

I would think that we'd want to remove/disable/handle interactions on timeout

cold island
#

it times out

#

uuh

#

If you can figure out a way to do that

#

be my guest lol

#

Because I didn't

fallen patrol
#

!src help

stable mountainBOT
#
Help Command

An interactive instance for the bot help command.

Source Code
cold island
#

The timeout event is not aware of the message

#

So you'd have to somehow record each message the view is used in

fallen patrol
#

the magic is here, somewhere

#
    async def send_command_help(self, command: Command) -> None:
        """Send help for a single command."""
        embed, view = await self.command_formatting(command)
        message = await self.context.send(embed=embed, view=view)
        await wait_for_deletion(message, (self.context.author.id,))

cold island
#

That's the sending

#

But you'd have to edit each message on timeout

fallen patrol
#

!d discord.ui.View.wait

stable mountainBOT
#

await wait()```
Waits until the view has finished interacting.

A view is considered finished when [`stop()`](https://discordpy.readthedocs.io/en/master/api.html#discord.ui.View.stop "discord.ui.View.stop") is called or it times out.
fallen patrol
#

πŸ˜›

#

so when the view times out, this will end

#

now, I think I can merge wait_for_deletion into the view...

#

by making a delete button instead of reaction

#

Because Buttons Are Always Better\ℒ️

cold island
#

buttons are chonkier πŸ˜”

#

But yeah your suggestion about the wait seems to do the trick

fallen patrol
#

although given this, I think this particular case it would be better as a button

#

super tiny in comparsion ;-;

short snow
#

the delete as a button?

cold island
cold island
short snow
#

Ah, so could we even disable the buttons after wait()?

cold island
#

yeah

#

I also don't like a discrepancy between having a delete button in some places and an emojis in other, so I'm not thinking about the particular case

fallen patrol
short snow
#

also zig could you assign me to bot#1964

dusky shoreBOT
cold island
#

done

fallen patrol
#

well i was on the right track but gave up for the night

#

gn

short snow
#

cool thanks

stable mountainBOT
severe tangle
#

!e
So the help function from Python doesn't work in the eval command... The following code won't work with the eval. A bug?

from typing import Union
print(help(Union)) β€Š
stable mountainBOT
#

@severe tangle :x: Your eval job has completed with return code 1.

001 | Traceback (most recent call last):
002 |   File "<string>", line 2, in <module>
003 | NameError: name 'help' is not defined
short snow
#

!e

help(print)
stable mountainBOT
#

@short snow :x: Your eval job has completed with return code 1.

001 | Traceback (most recent call last):
002 |   File "<string>", line 1, in <module>
003 | NameError: name 'help' is not defined
short snow
#

hmm

static canyon
#

I think just yyyy/mm/dd support is good

#

bot#2020

dusky shoreBOT
static canyon
#

The edit_reminder_duration func needs to use the new converter (the Expiration union)

#

And I'm not sure if the way you don't it allows for specifying time & date or whether it's just date nvm, I see now that you're using the isotime parsing

clever wraith
#

I don't exactly remember why, but I believe there is a good reason for it

#

!d site

stable mountainBOT
#

Source code: Lib/site.py

This module is automatically imported during initialization. The automatic import can be suppressed using the interpreter’s -S option.

Importing this module will append site-specific paths to the module search path and add a few builtins, unless -S was used. In that case, this module can be safely imported with no automatic modifications to the module search path or additions to the builtins. To explicitly trigger the usual site-specific additions, call the site.main() function.

Changed in version 3.3: Importing the module used to trigger paths manipulation even when using -S.

clever wraith
#

!e

import site
site.main()

help(print)```
stable mountainBOT
#

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

001 | Help on built-in function print in module builtins:
002 | 
003 | print(...)
004 |     print(value, ..., sep=' ', end='\n', file=sys.stdout, flush=False)
005 |     
006 |     Prints the values to a stream, or to sys.stdout by default.
007 |     Optional keyword arguments:
008 |     file:  a file-like object (stream); defaults to the current sys.stdout.
009 |     sep:   string inserted between values, default a space.
010 |     end:   string appended after the last value, default a newline.
011 |     flush: whether to forcibly flush the stream.
clever wraith
#

Oh and I don't know if you heard about it yet but timeouts are getting rolled out on Monday if you want to start working on an integration to replace the muted role

#

Also reviewed the unfurl PR

patent pivot
clever wraith
#

Oh well, @summer garden, I didn't see that your epoch command PR was still a draft and reviewed, do you want to hear about my comments right now or wait until your PR is all done and dusted (my comments do not mention the failed lint if that's the reason why it is a draft)

summer garden
clever wraith
#

a'ight!

summer garden
#

Yes the lint is part of it but there are a couple other issues which I haven't yet addressed

stable mountainBOT
#

bot/exts/utils/reminders.py line 439

async def edit_reminder_duration(self, ctx: Context, id_: int, expiration: t.Union[DayDuration, Expiry]) -> None:```
fallen patrol
stable mountainBOT
#
Affirmative!

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

fallen patrol
static canyon
#

Oh yeah, that's fine

gritty wind
#

you could always go for blindly replacing - with / if they mean the same thing to you

static canyon
#

Eh as long as tz doesn't have -

#

Replacing any - before a T with / would work

fallen patrol
#

ooh yeah

#

any / before an non numeric character can be replaced

#

eh just T is fine

static canyon
#

Yeah, I'd go for just T

fallen patrol
vale ibex
#

Passing it through arrow.get should just work

#

It accepts a large variety of formats

fallen patrol
#

!d arrow.api.get

stable mountainBOT
#
arrow.api.get(*, ...) β†’ arrow.arrow.Arrow``````py
arrow.api.get(*args: int, ...) β†’ arrow.arrow.Arrow``````py
arrow.api.get( ...) β†’ arrow.arrow.Arrow```
Returns an [`Arrow`](https://arrow.readthedocs.io/en/latest/index.html#arrow.arrow.Arrow "arrow.arrow.Arrow") object based on flexible inputs.
fallen patrol
static canyon
#

For what it's worth isoparse itself doesn't seem to support my idea of being able to pass just a time and then it gives the next occurence of that time

#

So e.g. if I did !remind 16:00 hello then it'd remind me in 50mins (since it's currently 15:10)

static canyon
fallen patrol
static canyon
#

I'd want it to assume UTC unless otherwise specified

#

Since that's how times are generally parsed

#

!remind 16:00+01:00 hello would remind at 16:00 utc+1 (15:00 UTC)

#

That way users can just add their tz offset

fallen patrol
#

ahhh so I will need a custom converter πŸ˜…

static canyon
#

Yeah, probably lemon_sweat

#

Sorry for the extra work lemon_sweat

fallen patrol
#

can't say that wasn't in the initial design spec so Β―_(ツ)_/Β―

fallen patrol
stable mountainBOT
#
Yeah okay.

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

cold island
fallen patrol
#

noooice

fallen patrol
stable mountainBOT
#
You're the boss!

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

brazen charm
fallen patrol
final geode
#

Ot tag broke. Doesn't work with additional text after and in itself, gives only ot2

#

Words breaking the tag altogether

#

Full tag name working and ot showing only ot2

vale ibex
#

The first one I'm guessing is caused by the tag being on cooldown

#

So it knows there's a tag that similar, but then doesn't show it

#

The latter is intentional

brazen charm
#

I think it's because the command doesn't see it as an exact match, so it does fuzzying which is ambiguous

hoary haven
#

ohh i do often like invoking !ot with additional words in my message though. this is something i didn't consider

brazen charm
#

I think trying an exact match with only the tag name if it has a group shouldn't cause any other issues, I'll open a pr

hoary haven
#

@brazen charm @final geode thanks to you both!

fallen patrol
dusky shoreBOT
final geode
fallen patrol
#

yee, bot#2023 is the pending fix by Numerlor

austere hornet
trail pilot
#

Hmm, so I mentioned the idea of an aoc 'day' command earlier that tells you what the day was about, but I think I have an idea on what it could be displaying, which would just be the name of the day and a short excerpt from the day, and you could either search up a day with it or search up a description for a day

#

though it's quite late to add a new AOC command so πŸ€·β€β™‚οΈ

trail pilot
trail pilot
fallen patrol
fallen patrol
#

and I'd recommend making one as it can be tracked and linked to if ever brought up again :P

austere hornet
#

Yeah you can always open issues without asking

trail pilot
short snow
#

bot#2022

dusky shoreBOT
short snow
#

uh no

#

πŸ˜”

fallen patrol
#

technically, by that logic you can also make pulls without being approved as all pulls are issues

  • plz don't do this
fallen patrol
short snow
#

i was checking if 2022 is already made lol

fallen patrol
#

ah

#

I fixed a bug in 2020 and it still hasn't been merged! /j

thorny obsidian
trail pilot
#

but for previous years, since it wouldn't exist yet in the cache it would make an API request then cache it for future use

#

well not an API request,

thorny obsidian
trail pilot
#

it would just use beautifulsoup for reading the webpage

fallen patrol
#

could possibly scrape them, and cache them in redis with a tight rate limit to not request each day more than once ever, or, given that we use redis, a mod or helper or someone could add it. there may also be aoc helpers who could add it and they don't have anything else, just a whifelist to edit it in

trail pilot
trail pilot
#

but it would have to be trusted people

thorny obsidian
trail pilot
fallen patrol
thorny obsidian
trail pilot
#

ahh I see, well if it's a day from previous years people might not remember it from the name only

#

because some people may not have participated in previous years

thorny obsidian
#

Looking briefly at the text for the first ~13 days. It looks like the memorable thing from each day tends to be in the first 2 paragraphs

fallen patrol
#

could scrape for an initial load in, and then aoc helpers could edit, giving a title, alias, etc if needed

trail pilot
#

also just to throw out an idea, maybe we only get the keywords from the first two paragraphs, so just collection.Counter the two paragraphs split into words and ignore common words

thorny obsidian
#

The first day is more complicated since it includes more story intro

thorny obsidian
trail pilot
#

Sounds good

#

Could I try and spin up a PR for this or put out an issue and wait for more approval?

fallen patrol
#

someone had figured out where the sample input was as well

fallen patrol
thorny obsidian
trail pilot
#

Sounds good

thorny obsidian
#

If we can reliably scrape the webpage for the info we want then we can have a task run 30 minutes after the puzzle release to pull the contents of the webpage into redis

trail pilot
#

What would we use to schedule it by the way? because if we use asyncio.sleep and the bot goes down within those 30 minutes, a problem might arise

#

unless we just scrape the webpage if the day the user requested is not in the cache but is a valid day

thorny obsidian
#

Just check if it's been 30 minutes since the puzzle released and if it's not in redis then we're good to grab it

trail pilot
#

ahh alright, so just a tasks.loop I believe

austere hornet
#

Update about sir-lancebot#956. I'm feeling like I won't be able to work on this simply because I can't seem to understand Pillow. How should I proceed?

dusky shoreBOT
stable mountainBOT
fallen patrol
stable mountainBOT
fallen patrol
#

also arrow dehumanize !!! @fallen patrol

fallen patrol
#

I'm taking another stab at bot#1942, will update when commited and pushed

dusky shoreBOT
fallen patrol
#

er bot#1924

dusky shoreBOT
fallen patrol
#

πŸ‘€

#

well arrow made this a lot easier

#

arrow.get()

static canyon
#

That might also support just the time (no date info)?

fallen patrol
#

i'm gonna sleep soon\ℒ️ and in the morning i want to bikeshed all supported formats as input so I don't overcomplicate this

static canyon
#

It's probably documented what the full list is

gritty wind
#

(\d{1,2}[:/-]){2,8}

#

or more simply .+ 🀑

fallen patrol
#

since we have options

gritty wind
#

can you pass it the entire message, or do you need to extract the relevant bit

#

My joke regex might actually come in handy