#dev-contrib

1 messages Β· Page 109 of 1

gritty wind
#

How did you set PG up?

short snow
short snow
#

i specified no password for it, but then it shows fatal, password authentication failed

short snow
#

@cold island , do i show whether the message is truncated or not?

#

umm like this

cold island
# short snow umm like this

You could do something like

shortened_text = textwrap.shorten(text, 300)
if not shortened_text:
    shortened_text = text[:50].rstrip()

shortened_text = "\n".join(line for line in shortened_text.split("\n")[:4])

if len(shortened_text) < len(text):
    shortened_text += " ..."
#

but with those magic numbers in appropriate constants

cold island
#

Btw nothing in the function you showed is async

fallen patrol
sleek steppe
#

Why would you have an async function if you aren't gonna await anything

fallen patrol
#

Why not

fervent sage
#

because its confusing to have it async when it doesnt need to be, and confusing code is bad code

brazen charm
#

You'd make the caller think that a context switch can occur while the above function will only run synchronously

fallen patrol
#

Ah

#

Isn't that what await asyncio.sleep(0) does? It lets other things in the queue run.

sleek steppe
#

Any time it yields, which is what asyncio.sleep(0) does

fallen patrol
#

Ah

fallen patrol
#

if @stable mountain is down and a member needs to be unmuted or muted so it happens manually, what occurs?

#

how does the bot resync the database with the actual state of the server when it comes back online?

tawdry vapor
#

It doesn't

#

That also has to be done manually

fallen patrol
#

rats

sleek steppe
#

I thought it does?

tawdry vapor
#

Well, it's one-way.

#

If the role is added manually, then there is no sync to the DB.

#

If the DB is edited manually, then the role will get added automatically.

sleek steppe
#

Oh I think I read it wrong. Were they asking if it was applied manually would it remove it automatically?

fallen patrol
#

i'm right here

fallen patrol
#

answer is no

tawdry vapor
#

Also, if an infraction expires while the bot is offline, then it will never remove the role from the user.

sleek steppe
#

I thought it just comes late, like reminders, or is that a different case

tawdry vapor
#

Maybe. There's an active field separate from the expiration date. I don't know if that gets set automatically or manually.

#

If it's manual then yes, it would actually avoid the issue I mentioned.

#

By manual i mean that there has to be an API request to set it to false rather than the DB automatically making it false when expire date is reached.

cold island
#

We've encountered expired yet active infractions before

sleek steppe
patent pivot
#

lol toxic, how did you accidentally sign one commit

tawdry vapor
#

Joe, regarding your comment, that is cause the return type is inaccurate otherwise

#

send() returns a message but commands are typed as returning None typically.

#

So either the return type has to change or the return has to be on a separate line

patent pivot
#

Hmmm, yeah, that's what Xith told me

#

It makes sense now thinking about it, but stylistically it kills me a bit

tawdry vapor
#

I've grown to live with it

sleek steppe
patent pivot
#

ahhhha that makes sense hahaha

vocal wolf
#

@ashen isle Greetings. I know it's only been like 4 days since I last poked you, but I forgot to suggest that if you're not able to finish the tag PRs, we can have someone take over.

thorny obsidian
#

I wonder if I could set-up a basic test bot that allows for the embed command just to help build out tags so you don't need to spin up the entirety of a bot

#

and we can just have it in a test server to use the embed cmd

vocal wolf
#

bot#1441 needs review.

vocal wolf
#

small.

sleek steppe
#

Oh yeah, I was gonna ask if that was even going to get merged because of bot#1542

dusky shoreBOT
vocal wolf
#

oh right that's a thing

vocal wolf
ashen isle
vocal wolf
#

Alright. thanks for update/quick reply.

#

I'll take over, then. I haven't contributed in a while.

tawdry vapor
thorny obsidian
#

which website?

vocal prairie
#

That one can do it. Although it isn't the best.

tawdry vapor
thorny obsidian
#

huh, super neat. Thanks!

fallen patrol
fallen patrol
#

thanks

#

i've made like

#

uh

#

15-30 commits to a repo this week

patent pivot
#

dope

fallen patrol
#

πŸ‘€

#

linux

patent pivot
#

gpg-agent works on linux

fallen patrol
#

ah

#

[bleep]

patent pivot
fallen patrol
#

what name do we enter πŸ€”

#

github name, or alias name

sleek steppe
#

Real name /s

patent pivot
#

you can use a github name

fallen patrol
#

username?

patent pivot
#

yes

#

anything

#

it doesn't really matter, though some orgs may require you to sign with a key that has an actual identity on it

fallen patrol
fallen patrol
patent pivot
#

huh?

fallen patrol
#

its an out of date manual πŸ€”

patent pivot
#

I don't use gpg-agent anymore Β―_(ツ)_/Β―

#

I just use the macOS keychain

fallen patrol
#

ah

#

i use linux

fallen patrol
#

its confusing and i am so confused now

patent pivot
#

lol

vocal prairie
#

Why not just, not sign the commits?

fallen patrol
#

the only thing i've managed to do is

patent pivot
#

yeah no that's correct

#

you just haven't added the key to your github account

fallen patrol
fallen patrol
#

i turned on a setting when trying to add a key and now github is like that

patent pivot
#

ah, right

vocal prairie
#

Oh wait, I didn't recognize you because of your pfp.

fallen patrol
patent pivot
#

lol

#

gotcha

fallen patrol
#

bing image otd

#

anyways

#

joe is there an alternative to gpg-agent

patent pivot
#

not really

#

i mean probably

#

but gpg-agent is by far the most frequently used one

#

we're veering off topic from pydis discussions here now though

vocal prairie
#

So for site#366, I don't really know how you would go about implementing this, especially with allowing fuzzy hits and searching both markdown and html pages. Does anyone have any thoughts?

dusky shoreBOT
patent pivot
#

hmmmmm

#

I'm not sure really

vocal prairie
#

Algolia is great from my limited knowledge, especially with their new autocomplete.

fallen patrol
vocal prairie
#

But someone mentioned about how we prefer to do things internally here last time I brought this up.

patent pivot
#

No, let's move GPG discussion out of here.

patent pivot
#

hmmmm

fallen patrol
#

glorified api wrapper iirc

thorny obsidian
#

I was fine for trying to home roll our own if we wanted, but I'm also fine with using something else.

vocal prairie
#

How in the world do all the mods appear right when they're mentioned πŸ‘€

fallen patrol
patent pivot
#

It's two separate things really, Lancebot is an educational resource and I know that when I've commented on it then we've been primarily talking about Lancebot

thorny obsidian
patent pivot
#

I think that if there is a tool that can achieve what we want to in site better than we can we can look into that, but yeah, it is as a bit of a last ditch attempt if we can't implement our own

#

Searching is indeed hard, especially since we've got a bit of a split of content between markdown/dynamic and so on

vocal prairie
#

There's also the problem about being able to do things as people type

patent pivot
#

yeah

vocal prairie
#

This kind of fuzzy search would be great. But it's a very hard thing to implement.

stable mountainBOT
patent pivot
#

Yes, it is

fallen patrol
#

i personally use that

#

which uses difflib within itself

#

or python-Levenshtein

vocal prairie
# fallen patrol is it?

You're forgetting that we have to do it while people are typing, and while referencing markdown and html files

patent pivot
#

How do you propose we search the content for pages that we haven't yet rendered? For example, the resources page

#

the fuzzy algorithms are fine once you've got the content and a way to provide results

#

we don't have that in some situations

vocal prairie
patent pivot
#

yeah

#

I know Cloudflare use Algolia for their docs

vocal prairie
#

I just found a wonderful example of good search… only to realize they used algolia

patent pivot
#

pahahahaha

vocal prairie
#

The only thing I can think of is to do something that indexes website content before it renders. Or at least, before search renders.

#

But I have no idea what that could be

cold moon
#

I think using Algolia is good idea for searching.

short snow
#

isn't algolia paid? like $2 per month

cold moon
#

This have free plan

#

But max is 1k searches per month

short snow
#

ah, won't that be a problem then?

short snow
#

and yeah i will change it to a non async function

cold island
#

And an empty placeholder makes the function behave differently

short snow
#

we can pass the placeholder as an empty string

#

default is [...]

#

ah, what do you mean by behanve differently?

cold island
#

It will slice the first word instead of discarding it fully

#

But only the first word. The rest of the sentence is treated the same

#

Β―\_(ツ)_/Β―

short snow
#

hmm, then the current solution should be good

cold island
#

Well, it would be better to first slice the message

#

And then count newlines

short snow
#

reduce it to 300 characters and then count?

cold island
#

Yeah, as then you have less things to count

#

Well, to either 300 or 50

#

Also just making the placeholder three dots is enough IMO, the embed should be as short as possible

short snow
#

right, got that

#

would it be better to use fields for the content?

#

since it is multilined

cold island
#

Hmm why fields? It's the same piece of text

short snow
#

this will happen without fields:

**Content:** This is
not a single
line :)

with fields:

#Content
This is
not a single
line :)
cold island
#

Mmm maybe. I feel like it will make it too vertical

short snow
#

uhh, it just addition of ~1 line

#

i will try both and show the diff here, once free

#

bump lemon_grimace

cold island
short snow
#

yep

#

rest aren't needed to be a field

#

they can be a inline field tho

cold island
#

I don't think inline fields will render well on mobile

green oriole
#

I believe they are fixed now

#

Can you int e one?

brazen charm
#

Any input on bot#1545 ?

dusky shoreBOT
whole forge
green oriole
#

I don't have any strong opinion one way or the other

#

I don't like the use of the x- prefix though

short snow
green oriole
#

What's the exact error?

short snow
#

here

green oriole
#

Interesting

#

When do you get that?

#

As soon as you start psql?

short snow
#

yeah

#

after doing sudo service postgresql start

#
Loading .env environment variables...
Starting in debug mode.
Starting server.
Starting in debug mode.
Waiting for PostgreSQL database.
Database is ready.
Applying migrations.
``` before the error
#

i did it again now, but still the error remains

vocal prairie
#

According to their pricing page

#

But still, that's like a request every four minutes

#

Which isn't great

whole forge
green oriole
#

I know, why not pydis-logging or so?

whole forge
green oriole
#

Oh okay

#

Fair enough then

whole forge
#

so should i un-draft-ify that PR?

#

bot#1430

dusky shoreBOT
whole forge
#

oh neat it does have a draft icon

green oriole
#

Not sure, there is probably a root password set somehow

green oriole
short snow
green oriole
#

You probably shouldn't

#

But I don't know, it depends on how we installed it

whole forge
green oriole
#

Well, we need to coordinate contributions first, or we can end up in spending a lot of time working on a PR (both for the contributors and the reviewers) and end up scraping them.

whole forge
#

in this case, i had the modified docker compose anyways since thats what im using personally, so i made a draft PR to be able to coordinate whether this is something we want

green oriole
#

Well we may want a totally different configuration or solution, that's why issues are important. Besides we more often check issues rather than PRs for early discussions.

vocal prairie
#

Can sir-lancebot#634 be looked at to remove the Easter .topics since Easter is over?

green oriole
#

Will ask others ok_handbutflipped

short snow
sleek steppe
short snow
#

whats the correct way to install psql?

#

ubuntu

cold moon
#

sudo apt install postgresql-client

vocal prairie
short snow
#

weeeee it worked now

#

hmm, the site now works on 0.0.0.0:8000, but all the links direct to pythondiscord.local:8000

#

to get

green oriole
sleek steppe
#

haha lol (spring cleanup PR if someone wants to review)

short snow
green oriole
#

no no, in /etc/hosts

short snow
#

yeah πŸ€¦β€β™‚οΈ, worked thanks

fallen patrol
#

πŸ‘€

#

Superstarify & catify.

#

What would happen

gritty wind
#

Wdym?

#

Nothing

#

It'll just catify the starified name

#

not really a problem

short snow
#

if a user is under a active superstarify, and someone/anyone changes their name, it would be changed back to the superstarified named

#

not sure, lemme have a look at the source, one sec

#

!src superstarify

stable mountainBOT
#
Command: superstarify

Temporarily force a random superstar name (like Taylor Swift) to be the user's nickname.

Source Code
vocal prairie
#

Is quackstack stable enough for site#465?

dusky shoreBOT
dry folio
#

@clever wraith @wide elm @vocal prairie CAT DEVS UNITE

#

WE HAVE A NEW PROJECT

#

PROJECT: ADD MATH AND SCIENCE CATEGORY TO SIR LANCEBOT'S .quiz command

wide elm
#

hullo

vocal prairie
#

Chill with the caps Object

dry folio
vocal prairie
#

And y'all can go ahead, I'm busy

dry folio
wide elm
#

aw, alright

dry folio
wide elm
#

k

vocal prairie
clever wraith
#

also, can y'all stop TYPING ALL CAPS IT HURTS MY FKING EYES

You were saying @Object#9891 ?

fervent sage
#

Am a cat too pensivewobble

clever wraith
#

Why the fuck are mentions not working

dry folio
vocal prairie
fervent sage
#

Yep

vocal prairie
#

Noice

sleek steppe
#

Anyone wants to review sir-lancebot#718 so I don't have to resolve a bunch of merge conflicts since it's a big diff

dusky shoreBOT
mellow hare
clever wraith
#

@sleek steppe nice

fervent sage
#

Lol

wide elm
#

lmao

lyric raven
#

xD

mellow hare
#

It's troublesome and unnecessary

wide elm
#

we discussed beforehand

fervent sage
#

I'm surprised it isn't more tbh

mellow hare
#

.... seriously?

wide elm
#

yeah

mellow hare
#

Uh.... huh

wide elm
#

lmao

dry folio
wide elm
#

eyy

fervent sage
#

I feel you hemlock lol

clever wraith
#

Did we just pull one over on hemlock

dry folio
fervent sage
#

Omg

wide elm
#

haha

clever wraith
dry folio
#

wait it's offline

fervent sage
dry folio
clever wraith
#

Lol

vocal prairie
#

In alphabetical order, does a space go before or after letters?

wide elm
#

hm

clever wraith
#

I have no ide

#

Idea

wide elm
thorny obsidian
#

Hi cat devs! Since this will be your second PR, please do try to follow our contributing guidelines and especially do the following:

  1. Y'all better lint everything before you even commit
  2. Have good commit messages please
  3. Make sure you're on the same page and test things before you PR
wide elm
#

Ok

placid ermine
dry folio
fervent sage
#

Uh in ASCII, before

clever wraith
#

Linting *cough* object *cough*

wide elm
#

haha

thorny obsidian
#

Thanks~ Don't rely on black entirely. Our linting doesn't necessarily follow black.

dry folio
vocal prairie
sleek steppe
#

Don't use black for the most part

placid ermine
#

just do pipenv run lint

wide elm
#

Aigt

thorny obsidian
#

what stinky said. If you run the lint, it'll let you know what the errors are. There is benefit to manually fixing the errors.

fervent sage
#

Flake8 makes my code look worse pensivewobble

wide elm
#

haha

clever wraith
#

Anyways I gotta run

placid ermine
#

pro

#

orz

dry folio
clever wraith
#

I'll do the math shit later

fervent sage
#

No you just run the command

placid ermine
gritty wind
#

Lint is a pipenv command, not a package

dry folio
clever wraith
#

Lmao

gritty wind
#

How are you working on these projects

vocal prairie
#

Also, do you pay attention to the word "the" when doing alphabetical order?

thorny obsidian
#

yup! pipenv is great. I recommend going through our setup guide and using pipenv

sleek steppe
placid ermine
clever wraith
#

Ish

placid ermine
#

nah its just anarchy

gritty wind
#

Let me reword that question

clever wraith
#

Lol

gritty wind
#

How are you working on this project without pipenv

clever wraith
#

We aren't

dry folio
wide elm
clever wraith
#

Or at least I'm not

wide elm
#

we haven't started yet

dry folio
clever wraith
#

*cough * object again *cough*

wide elm
#

lol

clever wraith
#

God my throat is sore today I should take a cough drop

vocal prairie
dry folio
#

i'm learning :(

clever wraith
#

Lol it's not that just read the contributing guide

gritty wind
#

Like Kat said, the getting started guide would be a good place to start

clever wraith
vocal prairie
#

Okay

fervent sage
#

Yeah T sounds good for that

dry folio
clever wraith
#

Otherwise it would be "Weeknd, The" becuase alphabet is weird

wide elm
#

lmao

dry folio
#

shall we start working on the questions? we need 60 in total

#

30 for math, 30 for science

wide elm
#

I can't atm, but I can start in a bit

dry folio
#

k

#

i'll ping y'all in the server

fallen patrol
clever wraith
green oriole
#

I’m not sure if this is really needed tbh

vocal prairie
#

It's sending errors like: {"detail":"Invalid option provided: lightsaber.png not found."}

clever wraith
#

Yeah @fervent sage quackstack manducks are having a tough time

green oriole
#

nice

fervent sage
#

I'll take a peek now

clever wraith
#

Also bills on normal ducks are broken

fervent sage
#

known issue, will be fixed soonTM

clever wraith
#

Kop

#

Oop

#

Wrong photo

stable mountainBOT
#

Hey @clever wraith!

It looks like you tried to attach file type(s) that we do not allow (). We currently allow the following file types: .gif, .jpg, .jpeg, .mov, .mp4, .mpg, .png, .mp3, .wav, .ogg, .webm, .webp, .flac, .m4a.

Feel free to ask in #community-meta if you think this is a mistake.

placid ermine
clever wraith
#

Wh

#

Okay it doesn't like that image

sleek steppe
fallen patrol
sleek steppe
fallen patrol
#

Just wait for the other prs to happen and then change it

sleek steppe
#

That means even more conflicts

fallen patrol
#

I mean

#

New pr*

brazen charm
slim widget
#

If it's like, some kind of index on a website.

#

So that the user doesn't have to go hunting for it.

vocal prairie
#

I was listing things alphabetically for the superstarify command

#

We were adding new people

#

So the order doesn't really matter

#

I was just curious

slim widget
#

Ohh, right.

short snow
short snow
fervent sage
#

it returns a 400 on every request for random ones

clever wraith
#

Sad

short snow
#

Hmmm

clever wraith
#

It can't find the assets

short snow
#

I will have a look at it if I get time today

#

!remind 12hrs do it if not done yet

stable mountainBOT
#
Bad argument

12hrs is not a valid duration string.

short snow
#

!remind 12h do it if not done yet

stable mountainBOT
#
Sure thing!

Your reminder will arrive in 12 hours!

vale ibex
#

Currently testing a bot PR but getting this error django.db.utils.OperationalError: FATAL: database "metricity" does not exist

#

I'm using the docker setup, are there migrations that need to be ran, or have I missed something?

gritty wind
#

docker setup for the bot or metricity?

vale ibex
#

bot

#

haven't setup anything special for metricity

#

Do I need to?

gritty wind
#

Alright, just create the DB manually

#

What are you working on?

vale ibex
#

Akarys's PR

gritty wind
#

I see

#

Easiest if you set up metricity, but you can also fake it

vale ibex
#

should I just run this?

#

the site is running, just with no metricity db

gritty wind
#

I think that should work?

vale ibex
#

yea that's done it

#

I wonder why it didn't get run on startup

sleek steppe
#
[spring-cleanup a6cc40f] chore: Prefer double quotes over single quotes
 60 files changed, 430 insertions(+), 430 deletions(-)
vale ibex
#

lol

sleek steppe
#

big diff

fallen patrol
#

Did you check that it didn't replace any of these didn't

#

@sleek steppe ^

sleek steppe
#

I went through them one by one

fallen patrol
#

Oh damn lol

sleek steppe
#

I probably messed up somewhere though

fallen patrol
#

Yeah probably

dry folio
#

https://docs.google.com/document/d/1qIbapQUMLD40s5yzrqXZ7n0-6p1z3azpz1O_rPOWTv4 the cat devs made the list of math questions, would a reviewer mind looking if this is good or if we need to remove some? thanks a lot!!

fervent sage
#

ill take a look

dry folio
dry folio
patent pivot
#

if anyone notices events dropped from #dev-log please give me a ping

#

we've had a couple of timeouts with the middleman worker so want to ensure it was just blips

vocal prairie
#

Could we add scroll-behavior: smooth; to the site's css? That's the thing where when you scroll using a section id, it's doesn't jump there, it instead scrolls.

#

It's a little easier on the eyes if you have smooth scrolling

gritty wind
#

Feel free to PR it

#

just remember to poly-fill

vocal prairie
#

poly-fill?

gritty wind
#

Scroll-behavior is not standard yet, and missing from some large browsers

#

namely safari and I think firefox

#

Polyfilling is just adding missing features

vocal prairie
#

How do you do that?

gritty wind
#

You're working on the main site?

vocal prairie
#

The site repo? Yeah

#

A branch made off the main branch

gritty wind
#

Not really sure how to do it in django

vocal prairie
#

base.css is the right file to put it in, right?

gritty wind
#

Poly filling isn't done in CSS. The property is added to the CSS, but the polyfilling is JS

vocal prairie
#

Since that goes into base.html which is extended into most other files.

vocal prairie
gritty wind
#

You need to poly fill to add this feature

vocal prairie
#

Oh

#

So you don't put it in css?

vocal prairie
#

Got it

gritty wind
#

There are JS packages that do it for you because it's a lot of annoying code

#

But basically you can implement yourself by moving the page down one bit at a time

#

Of course that's a lot of implementation for very little gain

vocal prairie
gritty wind
#

We can't

vocal prairie
#

Thought so

#

I have no idea how to polyfill. So I probably just won't pr it.

gritty wind
#

It can still be added, it'll just... not work on some browsers

#

I checked, and it wasn't firefox, but IE that didn't support it

#

So that's Safari and IE mainly

#

But I don't really care about IE, or any of the smaller browsers

vocal prairie
#

IE is old now

gritty wind
#

You'd be surprised how prevalent IE still is

vocal prairie
#

Really?

gritty wind
#

A lot of legacy systems just never upgrade

#

Hospitals, banks, anything government, etc

vocal prairie
#

So should I try to figure out the polyfilling, pr without the polyfill, or just not pr?

vocal prairie
gritty wind
#

It's a pretty minor feature, so I don't care either way. Poly filling would be ideal, but I don't know how to do it in django

olive cloak
#

not sure if its the right place to ask but on the python github and noticed something put this under their issue, does this mean no one else can work on it?

#

are can anyone work on it still?

gritty wind
#

One of those boxes should have a checkmark beside it

olive cloak
gritty wind
#

Well, they messed that up

olive cloak
#

so only they can work on it with the cat dev team

gritty wind
#

But they want to add it

olive cloak
#

ah right

gritty wind
#

You can talk to them if you wish

vocal prairie
olive cloak
gritty wind
#

Yeah? You can leave comments

olive cloak
#

ohh right yeah

gritty wind
#

Here too

vocal prairie
olive cloak
#

what is the cat dev team also?

gritty wind
#

A group of people that have cats in their name

#

you better not post that invite here, or you'll make the mods very happy

olive cloak
patent pivot
#

lol

gritty wind
#

That's them

patent pivot
#

@dry folio @wide elm hi

wide elm
#

hullo

olive cloak
#

hi πŸ‘‹

#

i commented another idea on that thread as well

wide elm
#

Cool

dry folio
patent pivot
#

messing up wasn't working together, it was just a markdown mess up πŸ™‚

dry folio
patent pivot
#

[ x] doesn't render as a checkmark, but [x] does iirc

dry folio
patent pivot
#

lol

olive cloak
gritty wind
dry folio
dry folio
wide elm
#

lol

sleek steppe
stable mountainBOT
#

bot/exts/info/reddit.py line 117

if response.status == 204 and response.content_type == "application/json":```
vale ibex
#

OAuth token revoking should return a 204

tawdry vapor
#

If I understand correctly, it's saying it'd return a 200 for an invalid token too? WTF why

vale ibex
#

wut

#

Note: Per RFC 7009, this request will return a success (204) response even if the passed in token was never valid.

#

is this just wrong?

tawdry vapor
#

Well we would be getting that warning in prod then, wouldn't we?

vale ibex
#

looking

#

nothing in the last 7days

#

or last 30

#

I wonder if we generated a permanent?

#

it's temp in code though..

tawdry vapor
stable mountainBOT
#

lib/src/auth.dart lines 116 to 121

  if (response.statusCode != 204) {
    // We should always get a 204 response for this call.
    final parsed = json.decode(response.body);
    _throwAuthenticationError(parsed);
  }
}```
gritty wind
#

Not returning useful information for token revokation is pretty standard

#

I guess to prevent people from using revocation endpoints to guess tokens or something?

tawdry vapor
#

That's not the problem

#

The problem is that the spec says it should be 200 but reddit says 204, and then someone is getting a 200 anyway

gritty wind
#

Uhh...

#

generate a token and test?

#

I can give it a shot

#

Once I figure out how to de-uglify reddit's docs

tawdry vapor
stable mountainBOT
#

prawcore/auth.py lines 83 to 96

def revoke_token(self, token, token_type=None):
    """Ask Reddit to revoke the provided token.

    :param token: The access or refresh token to revoke.
    :param token_type: (Optional) When provided, hint to Reddit what the token type
        is for a possible efficiency gain. The value can be either `​`​access_token`​`​
        or `​`​refresh_token`​`​.

    """
    data = {"token": token}
    if token_type is not None:
        data["token_type_hint"] = token_type
    url = self._requestor.reddit_url + const.REVOKE_TOKEN_PATH
    self._post(url, success_status=codes["no_content"], **data)```
vale ibex
#

.ext unload latex

dusky shoreBOT
#

:ok_hand: Extension successfully unloaded: bot.exts.evergreen.latex.

gritty wind
#

@tawdry vapor @vale ibex finally had a chance to test it

#

Can confirm it's a 200

#

The guide is in fact, incorrect

#

They reference the standard, so I'm guessing it's a miscommunication or a typo

#

Though

#

If we're worried about it changing

#

It's easy enough to test it on startup

sleek steppe
#

Would response.status in (200, 204) be fine?

tawdry vapor
#

Popular libraries only check for 204 and I didn't see any users reporting an issue about a wrong status code

#

It might have to do with the recent changes I linked to.

#

Might be worth making a reddit post there to ask, since the devs seem to watch that sub.

thorny obsidian
clever wraith
short snow
#

anyone free, need to test this feature?

vocal prairie
sleek steppe
#

I'm not sure about this change, tempban and ban would do the exact same thing except duration is optional for ban

vocal prairie
#

It's the same situation as mute automatically becoming tempmute

sleek steppe
#

Mute is an alias for the tempmute command

vocal prairie
#

I didn't know that.

#

Oh

#

So why not do the same thing for ban, and make it an alias for tempban?

#

Or is there a reason it's not?

thorny obsidian
#

The mods really want this change. It'll be a very nice QoL thing for us.

sleek steppe
vocal prairie
#

But it's the same situation

#

Actually, no it's not

#

Ignore me

short snow
#

a ban with no expiration is a permanent ban

#

so that could be done

vocal prairie
#

What's the default length for !tempban?

sleek steppe
#

no default

vocal prairie
#

So then, why not make ban an alias? And when no time is provided, it defaults to permanent.

short snow
#

yeah

short snow
#

two runs

vocal prairie
#

If some embeds aren't showing, joe said to ping him

#

Just make sure it's an actual error

sleek steppe
#

It's not an error, there were two runs

short snow
#

not a problem with that, dunno but i see 3 checks on this pr, while there were only 2 commits

vocal prairie
short snow
#

would be good, since basically ban, with this pr does that

vocal prairie
#

@thorny obsidian Is that something that would do what you wanted?

short snow
#

maybe ask zig, he is the moderation lead πŸ€·β€β™‚οΈ

thorny obsidian
#

I think that's fine. Zig's a codeowner for the mod cogs iirc so he'll be requested to have a review.

short snow
dusky shoreBOT
clever wraith
#

Oh yhanks!

#

thanks

#

and you guys already know bills are kinda broken atm right

vocal prairie
#

Yeah, they know

#

They layering was off

clever wraith
#

ah

short snow
#

there was a fix already done for that, lemme ahve a look

#

yep its fixed now

fallen patrol
fallen patrol
fallen patrol
fallen patrol
sleek steppe
#

Which is why mute is just an alias to tempmute

fallen patrol
#

Ah

placid ermine
stable mountainBOT
#

@short snow

It has arrived!

Here's your reminder: do it if not done yet.
[Jump back to when you created the reminder](#dev-contrib message)

short snow
#

umm, i got three pings from here, where is the third one?

fallen patrol
fallen patrol
short snow
#

lol

cold island
stable mountainBOT
#

Identity vs. Equality

Should I be using is or ==?

To check if two things are equal, use the equality operator (==).

x = 5
if x == 5:
    print("x equals 5")
if x == 3:
    print("x equals 3")
# Prints 'x equals 5'

To check if two things are actually the same thing in memory, use the identity comparison operator (is).

x = [1, 2, 3]
y = [1, 2, 3]
if x is [1, 2, 3]:
    print("x is y")
z = x
if x is z:
    print("x is z")
# Prints 'x is z'
vocal wolf
#

@fervent sage noice noice

patent pivot
#

that is such a horrid branch name LOL

vocal wolf
#

ikr

patent pivot
fervent sage
#

and i made 4 typos

patent pivot
#

lmfao

fervent sage
#

identity-vs-equality would have been nicer kek

#

holup

#

!e

x = [1, 2, 3]
y = [1, 2, 3]
if x is [1, 2, 3]:
    print("x is y")
z = x
if x is z:
    print("x is z")
# Prints 'x is z'
stable mountainBOT
#

@fervent sage :white_check_mark: Your eval job has completed with return code 0.

x is z
vocal wolf
#

HMMM

fervent sage
#

ok im just going insane, noted

vocal wolf
#

yeah looks good lol

fervent sage
#
if x is [1, 2, 3]:
    print("x is y")
```i think this bit actually confuses me more
#

cause thats checking is x is the [] not y, which are ofc identical anyway but it seems odd

vocal wolf
#

Also using the integer 420 would be less noisy than [1, 2, 3] and keep the same behavior.
@green oriole where 420? /s

fervent sage
#

^ im more than happy to put in 420 but idk where kek

green oriole
#

Instead of the list

#

Like if variable is 420

#

Oh lol, that was sacarstic

vocal wolf
#

if variable is 1, yes of course this joke is terrible, I'm sorry

fervent sage
#

sadge

#

ok so uh, what out of

This snippet could get more explicit variable names too, it is a bit hard to follow right now. Also using the integer 420 would be less noisy than [1, 2, 3] and keep the same behavior.
isnt sarcastic?

green oriole
#

all of it lol

#

What about just [420] then @cold island

fervent sage
#

this is why i shouldnt program right after waking up kek

anyways, what var names do you think would fit better?

#

that being said before i saw xith messaged me i was about to dive into css so that would have been far worse lmao

green oriole
#

x => first_list
y => second_list
z => reference_to_first_list
maybe? the last one is a bit long but it is at least explicit

fervent sage
#

how about list_1 list_2 reference_to_list_1

#

a little more concise

green oriole
#

Sounds good

fervent sage
#

"list_1 is reference_to_list_1" sounds a bit weird, should it maybe be "list_1 is identical to refer..."

#

actually that doesnt sound better

vocal wolf
#

the holy grail of reviews

green oriole
#

Haha

stable mountainBOT
#

Identity vs. Equality

Should I be using is or ==?

To check if two objects are equal, use the equality operator (==).

x = 5
if x == 5:
    print("x equals 5")
if x == 3:
    print("x equals 3")
# Prints 'x equals 5'

To check if two objects are actually the same thing in memory, use the identity comparison operator (is).

list_1 = [1, 2, 3]
list_2 = [1, 2, 3]
if list_1 is [1, 2, 3]:
    print("list_1 is list_2")
reference_to_list_1 = list_1
if list_1 is reference_to_list_1:
    print("list_1 is reference_to_list_1")
# Prints 'list_1 is reference_to_list_1'
green oriole
#

... I am disqualified from the review count because I made a merge commit

vocal wolf
#

noice noice

vocal wolf
short snow
green oriole
#

Thanko

short snow
#

What does that PR do?

green oriole
#

It will still count staff approval even if you click the update branch button on github

short snow
#

Ah ok πŸ‘

vocal wolf
#

@balmy sparrow @vale ibex did y'all test bot#1441?

vale ibex
#

I tested pre the last commit, and the last commit didn't affect function imo

vocal wolf
#

merged

#

mmmmmm down to 16 PRs

#

I like this

#

can we get 15

fervent sage
#

whats the smallest one that wont take me an hour to review kek

balmy sparrow
vale ibex
#

t'was vco lul

fervent sage
#

did you mean to

vocal wolf
#

oh, whoops

fervent sage
#

ye

vocal wolf
#

pinged wrong person lol

vale ibex
#

smh xith bot

vocal wolf
#

D:

vale ibex
#

someone open a pr

fervent sage
#

lol

vocal wolf
balmy sparrow
#

oh, i have some time too now

#

i'd began going through that spring cleaning pr

fervent sage
balmy sparrow
#

but i gave up at 18/80 files

vocal wolf
#

I'd really like Reddit migration to just be done and over with

#

I'm not sure if it should take too long

#

I'll acquire the links

balmy sparrow
#

alright, i'll try to get to it now

vocal wolf
#

So we're moving the Reddit cog from bot#1542 to sir-lancebot#569

dusky shoreBOT
vocal wolf
#

@fervent sage there's something that you can review lol

fervent sage
#

will do soonℒ️

vocal wolf
#

thank

short snow
#

My incidents enhancement is also up for review

#

Just need to mention a embed look change

vocal wolf
#

It's currently 4am, if I suddenly become inactive, that means I've fallen asleep

short snow
vocal wolf
fervent sage
vocal wolf
#

As triage lead I command you all to go work on Reddit migration /s

short snow
#

Yeah, just telling

vocal wolf
#

Or else, death by poking.

cold island
#

it looks really noisy tbh

vocal wolf
#

I agree, to some extent

#

wait it got merged?

#

oh, it did

#

we can always make another PR to clean it up

short snow
#

πŸ€¦β€β™‚οΈ made a commit called mend

#

force pushes ducky_devil

vale ibex
#

git reset --soft HEAD~1

#

unless you already pushed

vocal wolf
#

@cold island as you are moderation lead, I need a review from you on bot#1564.

dusky shoreBOT
short snow
#

following xithrus, helps alot πŸ™ƒ

#

he has got stars on some really good repos

vocal wolf
#

I do?

#

huh

#

thanks lol

green oriole
#

Hah thanks for the link Chris, was about to ask for that

short snow
#

this one

vocal wolf
# short snow this one

oh yeah that's some good stuff, gonna set up an alias soon so I can get beautiful diffs

short snow
#

already did

green oriole
#

iirc it is just textwrap pretty much sucking

vocal wolf
#

not with a git config, but instead with a one liner

#

(unless that's not an option)

green oriole
#

I feel like this will end up with a custom partition function

sleek steppe
vocal wolf
#

which PR was that?

#

I've forgotten lol

sleek steppe
#

The one that redirect's eval output

vocal wolf
#

oh right

#

that one lol

#

lol I self-requested a review and proceeded to completely forget about it

short snow
#

looks ok @cold island ?

vocal wolf
#

@sleek steppe do you think you could include a screenshot of what it currently does?

#

since it doesn't happen often, I think it'd be worth it

short snow
sleek steppe
vocal wolf
#

oh

#

right, that makes sense lol

#

that should've been obvious to me

#

anyway

#

@sleek steppe I've never actually had to test the eval command before, did you clone the repo and start it up along with the bot, or just do docker-compose up on the bot repo?

sleek steppe
#

I mean I cloned it and did docker-compose up

vocal wolf
#

for snekbox?

cold island
vocal prairie
#

Yeah

#

Jason tested it on me

cold island
#

hmm.. I'm wondering what to do about pban now...

short snow
#

but you would need to edit the config.yml

#

one sec

vocal wolf
#

right, that makes sense

#

I'd think I just have an incorrect var in there

#

prob the api url

cold island
vocal wolf
#

Something something slash commands

short snow
short snow
#

i had it pinned in my test server, the docker config

vocal wolf
#

that font lol

sleek steppe
cold island
#

@vocal wolf @vocal prairie @short snow I approved it, though it creates inconsistency with pban and vban

vocal wolf
#

yeah

cold island
short snow
#

one sec

vocal wolf
vocal prairie
#

Night Xithrius

short snow
sleek steppe
#

πŸ˜”

vocal wolf
#

I'm testing Toxic's PR first tho

sleek steppe
#

My goal is to get 1k additions/deletions on the spring cleanup PR

cold island
#

Sorry, I know I'm nitpicking at this point, but I don't like that it creates another line to say that it was truncated

vocal wolf
#

@sleek steppe Does redirection usually ping twice?

#

for other things

thorny obsidian
cold island
cold island
thorny obsidian
#

(maybe I'll stop getting that command wrong too if it behaves like that >_>)

sleek steppe
thorny obsidian
#

dammit discord web app, no. I did not mean to reply to that message, I mean to just mention

vocal wolf
#

ah

sleek steppe
#

Maybe a ping_user kwarg for redirect output?

vocal wolf
#

uhhhhhhhhhh

short snow
cold island
vocal wolf
#

@sleek steppe I'll check on it when I wake, have a night.

cold island
#

Which is why we don't have a ptempban so far

sleek steppe
#

gn

vocal wolf
#

but so far it looks good

thorny obsidian
cold island
#

nope

vocal wolf
cold island
#

!help pban

stable mountainBOT
#
Command Help

!purgeban <user> [purge_days=1] [reason]
Can also use: pban

*Same as ban but removes all their messages for the given number of days, default being 1.

purge_days can only be values between 0 and 7.
Anything outside these bounds are automatically adjusted to their respective limits.*

sleek steppe
thorny obsidian
#

Would we ever tempban and purge?

vocal wolf
#

my mind is tired, responses aren't very good

cold island
#

@vocal wolf go sleep

thorny obsidian
#

My thoughts:
ban and vban should allow for optional duration arguments. If provided, it becomes temp.
pban should stay the same because we should only use that command in urgent situations where we need to clean and permaban quickly because the messages are that bad. pban should be the outlier because of the severity that requires its usage.

sleek steppe
#

maybe await ctx.send(..., allowed_mentions=AllowedMentions(users=ping_user))

fervent sage
#

not a mod but i also agree

deft patrol
#

Same.

cold island
#

although you don't have to for it to be merged

short snow
#

ok cool will do

sleek steppe
#

I used allowed_mentions so you could still see it's talking to you

gritty wind
#

Is this for the #bot-commands redirection issue?

#

If so, can you just remove the first message?

#

Seems redundant

sleek steppe
#

Makes sense

dry folio
#

hello! does anyone know how do i clone the sir-lancebot for testing? i did
git clone https://github.com/cat-dev-group/sir-lancebot but i'm not sure what to do next

clever wraith
#

Contributing guide

vocal prairie
clever wraith
sleek steppe
#

Wait is that an org lol

fallen patrol
vale ibex
#

Could someone add a cooldown on .catify to avoid situations like this? #bot-commands message

#

User bucket is fine, with 5seconds

sleek steppe
#

Sure I could do that

fervent sage
#

thanks github... ???

patent pivot
#

lfmao

short snow
#

Weird, happens on IOS

stable mountainBOT
#

@green oriole

It has arrived!

Here's your reminder: Suggest to use the Redis container on the Python docs.
[Jump back to when you created the reminder](#dev-contrib message)

fervent sage
balmy sparrow
#

discord in general is ??!?!

short snow
#

Unpredictable

#

God, when would discord fix this

sleek steppe
short snow
#

Alec there is a pr on quackstack

#

Really really short one

#

5 seconds most

fervent sage
#

quackstack#38

dusky shoreBOT
fervent sage
#

ik it isnt that one

#

thats just the fastest way for me to get to the repo kek

short snow
#

Just to get the link ik

#

Indeed, that was the fastest approve

fervent sage
#

ngl im proud of the sentence i just wrote

balmy sparrow
#

unfucky the ducky should be an otn

patent pivot
short snow
#

That’s nice 😊

patent pivot
#

just a shame it's golang mmLul

short snow
stable mountainBOT
#

pkg/handlers/discord/discord.go line 23

var DISCORD_HOOK = regexp.MustCompile(`​https?://(?:(?:canary|ptb)\.)?discord(?:app)?.com/api/webhooks/(?P<id>\d+)/(?P<token>.*)`​)```
green oriole
stable mountainBOT
#
Absolutely!

Your reminder will arrive in 1 minute!

sleek steppe
#

It's gonna be done in a minute?

stable mountainBOT
#

@green oriole

It has arrived!

Here's your reminder: maybe dewiki is done by then?.
[Jump back to when you created the reminder](#dev-contrib message)

green oriole
#

Lmao

#

Okay

fallen patrol
green oriole
#

Well

fallen patrol
#

minutes-is-not-months

green oriole
#

!remind 1m Try again Akarys

stable mountainBOT
#
ROGER THAT

Your reminder will arrive in 1 month!

fallen patrol
#

i was actually rewriting the time parser for a different bot, aka stealing the parser from this bot

vocal wolf
#

@sleek steppe tested thing. Works well.

fallen patrol
#

which is just the dateutil library but still lol

green oriole
patent pivot
#

πŸ₯Έ

fallen patrol
patent pivot
#

I added it πŸ’

green oriole
#

That's an important fact

fallen patrol
#

i suggested it :read_no_evil:

green oriole
#

That remind me of the pyfact thing for some reason

#

Is it even live

#

I remember we had a Github discussion for it, dunno if we ever received a message on it

#

.pyfact

dusky shoreBOT
#
Python Facts

Python was named after Monty Python, a British Comedy Troupe, which Guido van Rossum likes.

Suggestions

Suggest more facts here!

sleek steppe
green oriole
#

What a fact

vocal prairie
patent pivot
#

ya, we did receive stuff, we should prob add some πŸ™‚

vocal wolf
#

I may or may not be running on 2 hours of sleep

patent pivot
#

we don't need to discuss the etymology of off topic names here

vocal wolf
#

it's ok though, I'm going back to sleep after this zoom class

green oriole
#

!e

print(f"Xith's uptime: {2 / 24 * 100}%")
stable mountainBOT
#

@green oriole :white_check_mark: Your eval job has completed with return code 0.

Xith's uptime: 8.333333333333332%
fallen patrol
green oriole
#

Wait, it is the other way around

#

I thought we paid the hosting for more than 91% of uptime

sleek steppe
#

I feel bad for anand, he's going through the 84 files of my PR πŸ˜”

vocal wolf
#

I'm going to have to review it as well lol

sleek steppe
#

Is this the biggest PR on lancebot

#

in terms of additions/deletions

vocal wolf
#

D:

patent pivot
#

lol

vocal wolf
#

15 PRs on bot, but can it go to 10?

vale ibex
#

I just approved the workflow, should I just merge?

#

ahh Akarys has auto merge on

#

but after merging in main, we had to approve the lint action

#

it should merge after linting now

green oriole
#

Why did it not merge

#

Huh interesting

sleek steppe
#

Oh yeah my PR is the biggest on lancebot lol

green oriole
#

The spring cleanup one?

gritty wind
#

I wonder if the check is stuck

vale ibex
#

nah, it's not

gritty wind
#

Oh it was out of date

vale ibex
#

the lint action needs to be approved to be ran for first time contribs

gritty wind
#

I thought the merge was 30 minutes ago

#

It was

#

ah

green oriole
#

Flashback to my open 1.4k lines PR on the site, my god, why did I step into

vale ibex
#

even if its a core dev that does an action (such as merge in main)

#

we still need to approve lol

vocal prairie
vale ibex
#

Yea, that wasn't the issue πŸ˜„ It's all of the above

#

it's merged now anyway

#

Congrats πŸ˜„

vocal wolf
#

but can we get 13 hyperlemon

fervent sage
#

is today the pydis pr sprint lol

sleek steppe
dusky shoreBOT
vocal wolf
#

poor @balmy sparrow

balmy sparrow
#

πŸ˜”

#

im half way through

vocal wolf
#

you won't be forgotten

balmy sparrow
fervent sage
#

me and toxic: πŸ‘οΈ

sleek steppe
#

Reviewing is easier than doing it πŸ˜”

vocal wolf
balmy sparrow
fervent sage
#

lol

vocal prairie