#dev-contrib
1 messages Β· Page 109 of 1
CREATE USER pysite WITH SUPERUSER PASSWORD 'pysite';
CREATE DATABASE pysite WITH OWNER pysite;
CREATE DATABASE metricity WITH OWNER pysite;
i specified no password for it, but then it shows fatal, password authentication failed
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
Btw nothing in the function you showed is async
Why's that problematic?
Why would you have an async function if you aren't gonna await anything
Why not
because its confusing to have it async when it doesnt need to be, and confusing code is bad code
You'd make the caller think that a context switch can occur while the above function will only run synchronously
Ah
Isn't that what await asyncio.sleep(0) does? It lets other things in the queue run.
Any time it yields, which is what asyncio.sleep(0) does
Ah
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?
rats
I thought it does?
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.
Oh I think I read it wrong. Were they asking if it was applied manually would it remove it automatically?
i'm right here
if it was applied manually would the database realize that it was applied manually and create an infraction event
answer is no
Also, if an infraction expires while the bot is offline, then it will never remove the role from the user.
I thought it just comes late, like reminders, or is that a different case
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.
We've encountered expired yet active infractions before
Yeah, I muted an alt for 30 seconds, stopped the bot for 5 minutes, started it again and it got umnuted
lol toxic, how did you accidentally sign one commit
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
Hmmm, yeah, that's what Xith told me
It makes sense now thinking about it, but stylistically it kills me a bit
I've grown to live with it
Wasn't an accident, I wanted to try signing, but I put the wrong email so I just stopped signing it
ahhhha that makes sense hahaha
@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.
@whole forge Greetings. What's the status of this? https://github.com/python-discord/bot/pull/1430
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
bot#1441 needs review.
small.
Oh yeah, I was gonna ask if that was even going to get merged because of bot#1542
oh right that's a thing
@eternal owl this needs completion.
that would probably be a good idea. there's probably like half a change left and I don't think I can any time soon
Alright. thanks for update/quick reply.
I'll take over, then. I haven't contributed in a while.
There's a website that can visualise embeds
which website?
huh, super neat. Thanks!
How do sign commits?
You can sign commits locally using GPG or S/MIME.
dope
gpg-agent works on linux

Real name /s
you can use a github name
username?
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
π
β¦.
gpg-agent is a daemon to manage secret (private) keys independently from any protocol. It is used as a backend for gpg and gpgsm as well as for a couple of other utilities.
huh?
good
its confusing and i am so confused now
lol
Why not just, not sign the commits?
the only thing i've managed to do is
because signing is good and I've made a bunch of commits to a OOS project today
yeah no that was retroactive
i turned on a setting when trying to add a key and now github is like that
ah, right
Oh wait, I didn't recognize you because of your pfp.
those commits weren't signed
lol i took a screenshot of my background today and changed it to that lmfao
bing image otd
anyways
joe is there an alternative to gpg-agent
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
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?
hmmmmm
wonder if something like https://www.algolia.com/ is worth looking into here
I'm not sure really
Algolia is great from my limited knowledge, especially with their new autocomplete.
i opened that thinking it was gpg related π€¦ π₯΄
But someone mentioned about how we prefer to do things internally here last time I brought this up.
No, let's move GPG discussion out of here.
I think that is used a bit when talking about lancebot (I remember spearheading that a bit here), but yeah, I get the point
hmmmm
kutiekat
glorified api wrapper iirc
I was fine for trying to home roll our own if we wanted, but I'm also fine with using something else.
How in the world do all the mods appear right when they're mentioned π
damn i apparently have a great memory to get the one phrase correct
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
This was my comment: #dev-contrib message
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
There's also the problem about being able to do things as people type
yeah
This kind of fuzzy search would be great. But it's a very hard thing to implement.
is it?
!pypi fuzzywuzzy
Yes, it is
You're forgetting that we have to do it while people are typing, and while referencing markdown and html files
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
This is from some page that algolia tweeted about today
I just found a wonderful example of good search⦠only to realize they used algolia
pahahahaha
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
I think using Algolia is good idea for searching.
isn't algolia paid? like $2 per month
ah, won't that be a problem then?
right, this is shorter and smarter, are we limiting to 3 or 4 lines?
and yeah i will change it to a non async function
This won't work, sorry. You need to check for the placeholder and not an empty string
And an empty placeholder makes the function behave differently
we can pass the placeholder as an empty string
default is [...]
ah, what do you mean by behanve differently?
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
Β―\_(γ)_/Β―
hmm, then the current solution should be good
reduce it to 300 characters and then count?
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
right, got that
would it be better to use fields for the content?
since it is multilined
Hmm why fields? It's the same piece of text
this will happen without fields:
**Content:** This is
not a single
line :)
with fields:
#Content
This is
not a single
line :)
Mmm maybe. I feel like it will make it too vertical
uhh, it just addition of ~1 line
i will try both and show the diff here, once free
bump 
So content will be a field, but the rest won't be in fields?
I don't think inline fields will render well on mobile
Any input on bot#1545 ?
it should work, but IIRC there was no consensus on whether this was something people actually want
I don't have any strong opinion one way or the other
I don't like the use of the x- prefix though
ok i tried twice but am always getting this error, is there a way around this?
What's the exact error?
here
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
10,000
According to their pricing page
But still, that's like a request every four minutes
Which isn't great
the x prefix is needed tho to make sure compose doesn't try to read those blocks as actual compose blocks like services or networks
I know, why not pydis-logging or so?
it would have to be x-pydis-logging
https://docs.docker.com/compose/compose-file/compose-file-v3/#extension-fields
Those special fields can be of any format as long as they are located at the root of your Compose file and their name start with thex-character sequence.
oh neat it does have a draft icon
hmm, do you know akarys?
Not sure, there is probably a root password set somehow
Yeah, sure. Although for the future it would be best if you open an issue first.
how do i remove the root password?
in the past i have been told that if i want to do something myself anyways, theres no need for a issue
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.
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
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.
Can sir-lancebot#634 be looked at to remove the Easter .topics since Easter is over?
Will ask others 
should i reinstall it
sir-lancebot#665 π
sudo apt install postgresql-client
https://www.postgresql.org/download/linux/ubuntu/ Here's the guide if you want
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
:blink:
Have you setup your host files?
haha lol (spring cleanup PR if someone wants to review)
lemme add that, just a hosts in the root directory right?
no no, in /etc/hosts
yeah π€¦ββοΈ, worked thanks
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
Temporarily force a random superstar name (like Taylor Swift) to be the user's nickname.
Is quackstack stable enough for site#465?
yes!
@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
hullo
Chill with the caps Object
lol
And y'all can go ahead, I'm busy
aw, fine
aw, alright
Aight
first we'll need to open an issue, ima go do that
k
Okie. I asked a week or two ago, and it was a no, so I was wondering
also, can y'all stop TYPING ALL CAPS IT HURTS MY FKING EYES
You were saying @Object#9891 ?
Am a cat too 
:)
Why the fuck are mentions not working
join us in our project then
It is, right vco?
Yep
Noice
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
Please don't spam ping people just because they have cats in their nickname
@sleek steppe nice
Lol
lmao
xD
It's troublesome and unnecessary
no, we're a group
we discussed beforehand
I'm surprised it isn't more tbh
we decided to work on this
.... seriously?
yeah
check #ot0-psvmβs-eternal-disapproval for details
Uh.... huh
What
lmao
eyy
I feel you hemlock lol
Did we just pull one over on hemlock
yes, this is our official website
https://catdevs.tk
The site for the Cat Dev Group
Omg
haha
https://catdevs.tk object get it right jesus
The site for the Cat Dev Group
wait it's offline

lmao sorry
Lol
In alphabetical order, does a space go before or after letters?
hm
I have an IDE
check ascii
Hi cat devs! Since this will be your second PR, please do try to follow our contributing guidelines and especially do the following:
- Y'all better lint everything before you even commit
- Have good commit messages please
- Make sure you're on the same page and test things before you PR
Ok
bruh
yes, we understand now and everyone has black
Uh in ASCII, before
Linting *cough* object *cough*
haha
Thanks~ Don't rely on black entirely. Our linting doesn't necessarily follow black.
lol, i installed black
I think spaces go before
Hm, k
Don't use black for the most part
oh, so is there a better one?
just do pipenv run lint
Aigt
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.
Flake8 makes my code look worse 
haha
Anyways I gotta run
ohhh ok, so do i have to install lint?
I'll do the math shit later
No you just run the command
no
Lint is a pipenv command, not a package
so i install pipenv. yes?
Lmao
How are you working on these projects
Also, do you pay attention to the word "the" when doing alphabetical order?
yup! pipenv is great. I recommend going through our setup guide and using pipenv
@fervent sage https://github.com/python-discord/sir-lancebot/pull/718/files#r625864163 π€
anarchy
nah its just anarchy
Let me reword that question
Lol
How are you working on this project without pipenv
We aren't
no, that's anaguild game one which died
haha
Or at least I'm not
we haven't started yet
Lol tf
i think i have it i just don't know it exists lol
*cough * object again *cough*
lol
God my throat is sore today I should take a cough drop
So would "The Weeknd" go in T or W?
ok SORRY i don't have enough open-source dev experience
i'm learning :(
Lol it's not that just read the contributing guide
Like Kat said, the getting started guide would be a good place to start
Is say T
alright!
Okay
Yeah T sounds good for that
but we need the issue to be approved first lol
Otherwise it would be "Weeknd, The" becuase alphabet is weird
lmao
shall we start working on the questions? we need 60 in total
30 for math, 30 for science
I can't atm, but I can start in a bit
Doing it manually based on what Flake8 says :hehe
Same
Iβm not sure if this is really needed tbh
This link isn't working https://quackstack.pythondiscord.com/manduck
It's sending errors like: {"detail":"Invalid option provided: lightsaber.png not found."}
Yeah @fervent sage quackstack manducks are having a tough time
nice
I'll take a peek now
known issue, will be fixed 
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.
sure
@brazen charm what do you think?
69 commits is not an issue tho
I feel like this is gonna make a billion merge conflicts for my PR or other PRs I I'll leave it
Just wait for the other prs to happen and then change it
That means even more conflicts
The changes are simple so those should be mostly resolved automatically, and most of the PRs are for new features. I don't see a reason not to do it as it'll be the last normal opportunity if everything gets reviewed properly in the future
Not sure what the context is, but I would tend to just do both.
If it's like, some kind of index on a website.
So that the user doesn't have to go hunting for it.
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
Ohh, right.
ah ok
Ah alright, just need to make the listing to show man ducks and it would be done, @fervent sage had a few more ideas tho.
But yeah it is perfect and stable, a good ducky!
stableβ’οΈ but not quiteβ’οΈ
Whatβs the issue?
it returns a 400 on every request for random ones
Hmmm
It can't find the assets
12hrs is not a valid duration string.
!remind 12h do it if not done yet
Your reminder will arrive in 12 hours!
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?
docker setup for the bot or metricity?
Akarys's PR
should I just run this?
pythondiscord.com - A Django and Bulma web application. - python-discord/site
the site is running, just with no metricity db
I think that should work?
[spring-cleanup a6cc40f] chore: Prefer double quotes over single quotes
60 files changed, 430 insertions(+), 430 deletions(-)
lol
big diff
I went through them one by one
Oh damn lol
I probably messed up somewhere though
Yeah probably
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!!
- generate linear systems of equations, two unknowns (dynamic) 2. what is the highest power of a biquadratic polynomial - 4 3. what is the formula for surface area of a sphere - 4pi2^2, 4Οr^2 4. which theorem states that hypotenuse2 = base2 + height2 - Pythagorean 5. basic modular arithmetic add...
ill take a look
thank you!
https://github.com/python-discord/sir-lancebot/issues/719 this is the issue btw
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
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
poly-fill?
Scroll-behavior is not standard yet, and missing from some large browsers
namely safari and I think firefox
Polyfilling is just adding missing features
How do you do that?
You're working on the main site?
Not really sure how to do it in django
base.css is the right file to put it in, right?
Poly filling isn't done in CSS. The property is added to the CSS, but the polyfilling is JS
Since that goes into base.html which is extended into most other files.
I'm referring to the scroll behavior, not polyfill
You need to poly fill to add this feature
^
Got it
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
But we can't use those, right?
We can't
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
IE is old now
You'd be surprised how prevalent IE still is
Really?
A lot of legacy systems just never upgrade
Hospitals, banks, anything government, etc
So should I try to figure out the polyfilling, pr without the polyfill, or just not pr?
Interesting. I would have thought they would upgrade
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
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?
One of those boxes should have a checkmark beside it
Well, they messed that up
so only they can work on it with the cat dev team
But they want to add it
ah right
You can talk to them if you wish
They would definitely let you help.
you can talk on github???
Yeah? You can leave comments
ohh right yeah
Here too
I can link you to the server they were discussing in if you wish. It's open
what is the cat dev team also?
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
they were talking about it in #ot0-psvmβs-eternal-disapproval right?, user "wait... its all objects?" and "Aboo"
lol
That's them
DMs, always
@dry folio @wide elm hi
mhm
hullo
Cool
lmao
i messed that up. sorry, not too familiar with what should i do if we're a group and not just an individual
messing up wasn't working together, it was just a markdown mess up π
hello joe!
[ x] doesn't render as a checkmark, but [x] does iirc
oh ok lol
yes, would you like to be in our cat dev team?
lol
yeah sure, not too familiar with Github tho
I didn't even know what issue this was lol
i sent you it in dms
lol
This code confuses me, https://github.com/python-discord/bot/blob/main/bot/exts/info/reddit.py#L117, (even though I'm testing it on sir-lancebot). If I get a 200 (because I do), is it supposed to fail?
bot/exts/info/reddit.py line 117
if response.status == 204 and response.content_type == "application/json":```
https://tools.ietf.org/html/rfc7009 I'm guessing
OAuth token revoking should return a 204
Weird. Cause here it does actually say 200 https://tools.ietf.org/html/rfc7009#section-2.2
If I understand correctly, it's saying it'd return a 200 for an invalid token too? WTF why
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?
Well we would be getting that warning in prod then, wouldn't we?
looking
nothing in the last 7days
or last 30

I wonder if we generated a permanent?
it's temp in code though..
Other libraries seem to expect a 204 currently https://github.com/draw-dev/DRAW/blob/master/lib/src/auth.dart#L116-L121
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);
}
}```
Not returning useful information for token revokation is pretty standard
I guess to prevent people from using revocation endpoints to guess tokens or something?
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
Uhh...
generate a token and test?
I can give it a shot
Once I figure out how to de-uglify reddit's docs
PRAW also expects 204 https://github.com/praw-dev/prawcore/blob/master/prawcore/auth.py#L83-L96
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)```
.ext unload latex
:ok_hand: Extension successfully unloaded: bot.exts.evergreen.latex.
@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
Would response.status in (200, 204) be fine?
https://discordapp.com/channels/267624335836053506/635950537262759947/839208977447649281 token removals are documented to return a 204 response on success yet it is returning a 200
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.
Hi, selfish request if anyone is up for (what I hope is) not too hard work: https://github.com/python-discord/bot/issues/1563
Lmao we should just pin this at this point
i will do it
anyone free, need to test this feature?
I'm always up for being banned
I'm not sure about this change, tempban and ban would do the exact same thing except duration is optional for ban
It's the same situation as mute automatically becoming tempmute
Mute is an alias for the tempmute command
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?
The mods really want this change. It'll be a very nice QoL thing for us.
ban can be permanent, mute can't
Oh yeah
But it's the same situation
Actually, no it's not
Ignore me
What's the default length for !tempban?
no default
So then, why not make ban an alias? And when no time is provided, it defaults to permanent.
Wdym status?
If some embeds aren't showing, joe said to ping him
Just make sure it's an actual error
It's not an error, there were two runs
not a problem with that, dunno but i see 3 checks on this pr, while there were only 2 commits
Does this make sense, or would this be bad in some way?
would be good, since basically ban, with this pr does that
@thorny obsidian Is that something that would do what you wanted?
maybe ask zig, he is the moderation lead π€·ββοΈ
I think that's fine. Zig's a codeowner for the mod cogs iirc so he'll be requested to have a review.
quackstack#40 will fix this
cc: @clever wraith
ah
Off topic name π³
Mutes could be permanent, no?
Oh wrong reply, meant this fro the above msg.
What the duck.
Defaulted to one hour, so no
Which is why mute is just an alias to tempmute
Ah
!otn a latext unload π³
@short snow
Here's your reminder: do it if not done yet.
[Jump back to when you created the reminder](#dev-contrib message)
umm, i got three pings from here, where is the third one?
a serious typo that the edited tag would make look real
Autocorrect legit changed the d to an f in this message
lol
Tempban should error if no duration is provided (e.g forgot). Tempban dealing a non-temp ban doesn't sound like great ux.
The issue was that sometimes we might accidentally type ban instead of tempban, so not accidentally permanently banning someone when a duration is specified is a nice qol feature.
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'
@fervent sage noice noice
that is such a horrid branch name LOL
ikr

i was checking it out
and i made 4 typos
lmfao
identity-vs-equality would have been nicer 
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'
@fervent sage :white_check_mark: Your eval job has completed with return code 0.
x is z
HMMM
ok im just going insane, noted
yeah looks good lol
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
Also using the integer
420would be less noisy than [1, 2, 3] and keep the same behavior.
@green oriole where 420? /s
^ im more than happy to put in 420 but idk where 
if variable is 1, yes of course this joke is terrible, I'm sorry
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?
this is why i shouldnt program right after waking up 
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 
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
Sounds good
"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
Haha
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'
... I am disqualified from the review count because I made a merge commit
noice noice
@cold island thoughts?
Right, I will just update the doc-strings then.
https://github.com/python-discord/.github/pull/3 please π₯Ί
Thanko
What does that PR do?
It will still count staff approval even if you click the update branch button on github
Ah ok π
@balmy sparrow @vale ibex did y'all test bot#1441?
I tested pre the last commit, and the last commit didn't affect function imo
whats the smallest one that wont take me an hour to review 
i didn't review this though
t'was vco lul
did you mean to
oh, whoops
ye
pinged wrong person lol
smh xith bot
D:
someone open a pr
lol
what about one that would take 59 minutes?
pls continue :D :P
but i gave up at 18/80 files
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
alright, i'll try to get to it now
So we're moving the Reddit cog from bot#1542 to sir-lancebot#569
@fervent sage there's something that you can review lol
will do soonβ’οΈ
thank
My incidents enhancement is also up for review
Just need to mention a embed look change
It's currently 4am, if I suddenly become inactive, that means I've fallen asleep

Eventually.

As triage lead I command you all to go work on Reddit migration /s
Yeah, just telling
Or else, death by poking.
oh wow, I'll stop reviewing on mobile, I missed that change
it looks really noisy tbh
I agree, to some extent
wait it got merged?
oh, it did
we can always make another PR to clean it up
@cold island as you are moderation lead, I need a review from you on bot#1564.
Hah thanks for the link Chris, was about to ask for that
this one
oh yeah that's some good stuff, gonna set up an alias soon so I can get beautiful diffs
already did
iirc it is just textwrap pretty much sucking
I feel like this will end up with a custom partition function
Have you gotten to testing my PR yet?
The one that redirect's eval output
oh right
that one lol
lol I self-requested a review and proceeded to completely forget about it
looks ok @cold island ?
@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
max
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?
I mean I cloned it and did docker-compose up
for snekbox?
I can't really test it right now, but did someone check it perma bans without a duration?
hmm.. I'm wondering what to do about pban now...
yes that would work. no need to clone snekbox
but you would need to edit the config.yml
one sec
right, that makes sense
I'd think I just have an incorrect var in there
prob the api url
mmm how does it look with max length?
I think we were going to hold off on that given that if we wanted to purge for an amount of days and tempban would lead to confusion between command args.
At the same time I don't see us doing anything besides 1d purges, except in very rare cases.
Something something slash commands
we already max legth it at 300
i had it pinned in my test server, the docker config
that font lol
Didn't that get deleted
@vocal wolf @vocal prairie @short snow I approved it, though it creates inconsistency with pban and vban
yeah
yeah I'm just asking how it looks like at 300+
one sec
I'll get back to you on that when I wake up.
Night Xithrius
not deleted, just a removal of all, add emojis and configuring the ids took time
π
My goal is to get 1k additions/deletions on the spring cleanup PR
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
should we have vban operate similarly? Where if you specify a time it doesn't perma vban?
Maybe just append " [...]" in all truncation cases
You probably didn't mean to reply to this message, but yes this is what I'm saying
(maybe I'll stop getting that command wrong too if it behaves like that >_>)
No because eval pings and help doesn't
dammit discord web app, no. I did not mean to reply to that message, I mean to just mention
ah
Maybe a ping_user kwarg for redirect output?
uhhhhhhhhhh
that would be good, i will do that
ye
The only issue I have is that with pban you already have a duration argument, but for the deletion
@sleek steppe I'll check on it when I wake, have a night.
Which is why we don't have a ptempban so far
gn
but so far it looks good
oh wait, really? I thought pban was just all messages
nope
default is 1d, max 7
!help pban
!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.*
Would would it say if ping_user is false?
Would we ever tempban and purge?
see how it looks, I guess
my mind is tired, responses aren't very good
@vocal wolf go sleep
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.
maybe await ctx.send(..., allowed_mentions=AllowedMentions(users=ping_user))
not a moderator, but I agree
not a mod but i also agree
Same.
feel free to add it to vban in the same pr
although you don't have to for it to be merged
ok cool will do
I used allowed_mentions so you could still see it's talking to you
Is this for the #bot-commands redirection issue?
If so, can you just remove the first message?
Seems redundant
Makes sense
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
Contributing guide
We're a large, friendly community focused around the Python programming language. Our community is open to those who wish to learn the language, as well as those looking to help others.

Wait is that an org lol
<
Could someone add a cooldown on .catify to avoid situations like this? #bot-commands message
User bucket is fine, with 5seconds
Sure I could do that
thanks github... ???
lfmao
Weird, happens on IOS
@green oriole
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)
mobile's embed rendering in general is ??!!?!??!!!?
discord in general is ??!?!
lmao I was wondering why you appproved after it was merged
quackstack#38
ngl im proud of the sentence i just wrote
unfucky the ducky should be an otn
unrelated but related note: I forked this bitnami project to the org and tinkered with it to add discord support, it's pretty nice https://github.com/python-discord/kubewatch/
Thatβs nice π
just a shame it's golang 

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>.*)`β)```
!remind 1M maybe dewiki is done by then?
Your reminder will arrive in 1 minute!
It's gonna be done in a minute?
@green oriole
Here's your reminder: maybe dewiki is done by then?.
[Jump back to when you created the reminder](#dev-contrib message)
lmfao
Well
minutes-is-not-months
!remind 1m Try again Akarys
Your reminder will arrive in 1 month!
i was actually rewriting the time parser for a different bot, aka stealing the parser from this bot
@sleek steppe tested thing. Works well.
which is just the dateutil library but still lol
@patent pivot ye wise man 
π₯Έ
hey no, lemme give you the context so you can thank me
I added it π
That's an important fact
i suggested it :read_no_evil:
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
Python was named after Monty Python, a British Comedy Troupe, which Guido van Rossum likes.
Suggest more facts here!
thanks!
What a fact
That's not the only context
ya, we did receive stuff, we should prob add some π
I may or may not be running on 2 hours of sleep
we don't need to discuss the etymology of off topic names here
it's ok though, I'm going back to sleep after this zoom class
!e
print(f"Xith's uptime: {2 / 24 * 100}%")
@green oriole :white_check_mark: Your eval job has completed with return code 0.
Xith's uptime: 8.333333333333332%
yes, it was actually vco who first did it
Wait, it is the other way around
I thought we paid the hosting for more than 91% of uptime
I feel bad for anand, he's going through the 84 files of my PR π
I'm going to have to review it as well lol
D:
lol
15 PRs on bot, but can it go to 10?
is there a reason https://github.com/python-discord/bot/pull/1561 is still open?
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
Oh yeah my PR is the biggest on lancebot lol
The spring cleanup one?
I wonder if the check is stuck
nah, it's not
Oh it was out of date
the lint action needs to be approved to be ran for first time contribs
Flashback to my open 1.4k lines PR on the site, my god, why did I step into
even if its a core dev that does an action (such as merge in main)
we still need to approve lol
It was a draft for a while
Yea, that wasn't the issue π It's all of the above
it's merged now anyway
Congrats π
but can we get 13 
is today the pydis pr sprint lol
Depends, can bot#1564 get merged
poor @balmy sparrow
you won't be forgotten
guys can someone explain this to me my brain has shrunk https://why.life-is-pa.in/0wrlyp
me and toxic: ποΈ
Reviewing is easier than doing it π
Aren't we thinking about doing this for other commands, or have admins said that we're ok with this merging?
99% of my comments are nitpicks on other parts of the code that wasn't touched by the PR ποΈ
lol
It is a cleanup π€·ββοΈ


