#dev-contrib

1 messages · Page 153 of 1

static canyon
#

Nope

#

I'm getting a 404

gritty wind
#

Good

#

What's giving the 404 exactly

static canyon
#

Everything

#

lol

#

lemme send

#

Ah, I think it's /healthcheck

gritty wind
#

It's just bot, you've now gotta change from 8000 to 8001 on bot

#

Hmm, maybe not

static canyon
#

You told me to change to 8001 in bot here

#

So I did

gritty wind
#

Yeah, that was correct. I was more referring to the one in your bot config

#

But you're using the docker URL, so it shouldn't matter

#

Oh your config is old

static canyon
#

Soyml site: &DOMAIN "web:8000"should beyml site: &DOMAIN "web:8001"?

gritty wind
#

It's correct as is now

#

But

#

what's the api URL

dim pelican
#

Good catch, I got too caught up in it. I added a length check before stripping it off now

static canyon
gritty wind
#

Change that to !JOIN [*DOMAIN, "/api"]

static canyon
#

Okay

#

And then docker-compose up?

gritty wind
#

Yeah

static canyon
#

It's migrating stuff I think

#

Okay, so the bot is running but it doesn't have the dm_sent field @gritty wind

gritty wind
#

Alright, what did you do where you saw it doesn't have that field

static canyon
#

an int e

#

@gritty wind

gritty wind
#

Could you send the logs from the site container again

static canyon
#

Err

#

site isn't running

#

🤔

gritty wind
#

Uh, what now

static canyon
#

These are the only things running

gritty wind
#

bot_web_1

static canyon
#

No errors or anything

gritty wind
#

Could you run docker build in the site repo again

static canyon
#

Yep

green oriole
#

bot_web should be the tag, bot_web_1 a container

#

you want a tag there, which should hopefully be site_web or just site

gritty wind
#

It is using site_web

static canyon
# green oriole you want a tag there, which should hopefully be `site_web` or just `site`
  web:
    << : *logging
    << : *restart_policy
    image: site_web
    command: ["run", "--debug"]
    networks:
      default:
        aliases:
          - api.web
          - admin.web
          - staff.web
    ports:
      - "127.0.0.1:800:8000"
    tty: true
    depends_on:
      - metricity
    environment:
      DATABASE_URL: postgres://pysite:pysite@postgres:5432/pysite
      METRICITY_DB_URL: postgres://pysite:pysite@postgres:5432/metricity
      SECRET_KEY: suitable-for-development-only
      STATIC_ROOT: /var/www/static```
#

It's using site_web

gritty wind
#

docker build -t site_web:latest . to rebuild

green oriole
#

why not docker-compose build?

gritty wind
#

Less that can go wrong

static canyon
#

Now what?

gritty wind
#

docker compose start on bot, and manually verify the site is working without using bot. It's exposed on port 8001

static canyon
#

I put it back to 8000 now

#

And it's working so 🤷

#

docker compose start on bot, and manually verify the site is working without using bot.
So cd ../bot then docker-compose up then go to 127.0.0.1:8000/api/bot/infractions or something?

#

@gritty wind

gritty wind
#

Well, you can't just go to the URL unless you add your token

#

Do you have any http clients you can use

static canyon
#

Just using CURL

gritty wind
#

That works

static canyon
#
curl: (7) Failed to connect to 127.0.0.1 port 8000: Connection refused```
#

It didn't work

gritty wind
#

What did you run

static canyon
#

It's port 800

#

lol

#
C:\Users\tizzy>curl -X GET https://127.0.0.1:800/api/bot/infactions -H "Authorization: Token badbot13m0n8f570f942013fc818f234916ca531"
curl: (35) schannel: next InitializeSecurityContext failed: SEC_E_INVALID_TOKEN (0x80090308) - The token supplied to the function is invalid
#

Can't remember

green oriole
#

800 is problematic because it is a low number iirc

#

try with 8000

gritty wind
#

It's not https

#

That's the security error

green oriole
#

... or I just open my eyes and see it is trying to use SSL

static canyon
#

It's because I was doing https

#
C:\Users\tizzy>curl -X GET http://127.0.0.1:800/api/bot/infractions -H "Authorization: Token badbot13m0n8f570f942013fc818f234916ca531"
[{"id":1,"inserted_at":"2021-11-12T15:14:37.005899Z","expires_at":"2021-11-12T16:14:36.931405Z","active":false,"user":407110650217627658,"actor":442244135840382978,"type":"mute","reason":"Testing x","hidden":false,"dm_sent":null}]
#

This has the dm_sent

#

So does my int e now

#

It seems to be fixed

tawdry vapor
#

To whomever deleted their message, that is a known issue. It happens when there's an idle help channel that was created by someone else's bot.

#

Your bot didn't track who created that channel, so it just has None for the user ID.

rapid igloo
fallen patrol
#

*system

#

been looking at that....
it has some issues when closing the connection

short snow
warm garnet
#

Guys is there reaction role system in any of the bots in this server?

static canyon
warm garnet
#

I see

#

I don't know what would be needed but will try my best

static canyon
#

It's been brought up a number of times in #community-meta so if you look you can probably find a better explanation than what I can give

static canyon
#

Maybe wait for a core-dev to approve first to make sure I'm correct

warm garnet
#

I know how to do that

#

@static canyon Btw buttons or selection menu?

static canyon
static canyon
warm garnet
#

I see

static canyon
#

First Page | Previous Page | Next Page | Last Page

#

Maybe with some logic for only displaying when needed

#

E.g on first page don't display first/previous

warm garnet
#

I see

static canyon
#

I've not touched interactions so don't know if it's possible but I imagine it shouldn't be too difficult

warm garnet
#

I know how to do this

#

I have made this on one of my team's bot

static canyon
#

But yeah, wait for a core-dev to confirm before working on it (just to be safe so that you don't start working on something we don't actually want)

warm garnet
#

Btw don't warn this time cause I used team word

#

Lol

#

I got warned due to this advertisement a hell lot time

#

Lol

short snow
cold island
brisk brook
timid sentinel
#

you'd have to host it yourself, I don't think we'd be interested in hosting it publicly

#

We have limited resources, and it's something that could be potentially quite resource intensive with not that much benefit. Since the servers we used are sponsored for use running the server, it could potentially be unfair to use that for something not really related to the server (?) not sure on the details of the agreement though

#

Would require proper ratelimiting etc, and there would be an expectation that we could keep the service running even if demand increased (if it was used too much there would be a limit to how much we could scale it with the resources we have, and we'd then have to break stuff by taking down the service)

short snow
fervent sage
#

That would be pretty cool

molten perch
#

Seems like a nice idea, although there should be a way to associate a specific channel with a specific github organization.
(Like an API endpoint? lemon_xd )

short snow
#

file constant

patent pivot
#

more work for me

#

but yeah what wookie said

#

it is nice having all evaluations in server as well, since we can monitor if things break and see why

#

opening it up reduces our visibility into that

short snow
#

engineerman/piston

#

that's what I use

molten perch
#

Hey! Just a quick question, httpx is BSD-3, is it compatible with MIT?
(It's a core part of the testing suite of API)

brazen charm
#

should be fine, just need to add the license with the notice

#

oh, or just use it if you don't actually take some code from there

molten perch
#

Alright, thank you! 🙂

molten perch
#

Hey! I ran into a bit of a problem while implementing the async test suite for the API.
The API uses pytest, and pytest-asyncio, and it seems like the async fixtures are run with a different self than the actual test methods.
(The corresponding issue: pytest-dev/pytest-asyncio#197)
Has anyone occurred something like that?
(I've come up with a solution, that circumvents this issue, but I don't think that it's the way to go)

fervent sage
short snow
#

lol

sour wolf
#

!docs str.isupper

stable mountainBOT
#

str.isupper()```
Return `True` if all cased characters [4](https://docs.python.org/3/library/stdtypes.html#id15) in the string are uppercase and there is at least one cased character, `False` otherwise.

```py
>>> 'BANANA'.isupper()
True
>>> 'banana'.isupper()
False
>>> 'baNana'.isupper()
False
>>> ' '.isupper()
False
sour wolf
#

whats that 4 doing there

#

oh, its a link to a footnote about cased characters, could use being superscripted tbh

brazen charm
#

should be simple to do if the href has some footnote class

fallen patrol
#

don't mind me just want to see features

#

!guild

stable mountainBOT
#
Server Information

Created: <t:1483877013:R>
Voice region: europe
Features: PRIVATE_THREADS, SEVEN_DAY_THREAD_ARCHIVE, THREADS_ENABLED, RELAY_ENABLED, VANITY_URL, NEWS, COMMUNITY, MEMBER_VERIFICATION_GATE_ENABLED, MEMBER_PROFILES, ANIMATED_BANNER, BANNER, ROLE_ICONS, PARTNERED, PREVIEW_ENABLED, INVITE_SPLASH, ANIMATED_ICON, DISCOVERABLE, NEW_THREAD_PERMISSIONS, THREE_DAY_THREAD_ARCHIVE, VIP_REGIONS, WELCOME_SCREEN_ENABLED
Roles: 92
Member status: status_online 41,987 status_offline 234,248

Members: 276,236

Helpers: 133
Moderation Team: 31
Admins: 15
Owners: 3
Contributors: 46
Leads: 13

Channels: 240

Category: 30
News: 8
Staff: 76
Stage_Voice: 2
Text: 113
Voice: 11

fallen patrol
#

MEMBER_PROFILES
neat

austere hornet
#

#bot-commands

stable mountainBOT
#

bot/exts/info/information.py lines 179 to 185

# Server Features are only useful in certain channels
if ctx.channel.id in (
    *constants.MODERATION_CHANNELS, constants.Channels.dev_core, constants.Channels.dev_contrib
):
    features = f"\nFeatures: {', '.join(ctx.guild.features)}"
else:
    features = ""```
austere hornet
fallen patrol
#

see above snippet 😛

austere hornet
#

Ah ok gotcha

patent pivot
fallen patrol
#

pr what

patent pivot
#

add features to bot-commands

fallen patrol
#

ah

patent pivot
#

while I don't think it's necessary, I'd rather you spam commands there than here, so either we remove dev-contrib from the list or add bot-commands

#

I think the latter is fine

fallen patrol
#

is there a line character count on bot?

patent pivot
#

not sure what you mean

fallen patrol
#

nvm

#

flake8

#

its fine

austere hornet
#

sir-lancebot#901 is finally ready for review!

dusky shoreBOT
austere hornet
#

Also if someone could mark @static canyon 's requested changes as done, that would be great. Thanks!

trail pilot
#

Does anyone know where the error handling of Sir Lancebot is?

austere hornet
patent pivot
trail pilot
#

Thanks!

patent pivot
fallen patrol
patent pivot
#

i don't think it's something that particularly needs a huge deal of testing

#

it's adding a constant to a list

fallen patrol
#

its more, i need to ensure I pass pre-commit since i'm not sure if adding it would go over the line limit and im too tired to be testing that without flake8 telling me it'll pass or not

patent pivot
#

i'll just add it

fallen patrol
#

meh

#

okay

#

im gonna go sleep then

patent pivot
#

emacs is so great, i did all of that from emacs from the editing to committing to opening the PR and i enjoyed every step

fallen patrol
#

;-;

fallen patrol
#

<@&267628507062992896> seems there's a problem with @stable mountain and github

#

the above link is not the problem

#

but python is not automatically embedding github code links

thorny obsidian
#

You mean the line number thing?

fallen patrol
#

yeah

thorny obsidian
#

I don't really think that's ultra critical though to our infrastructure

fallen patrol
#

no, but it seems like a sign of something else

thorny obsidian
#

So what other things have been going wonky with Python?

fallen patrol
#

since there hasn't been any redeploys, it would be the same code, which means that the token could have expired, or the bot is being ratelimited or worse
it could also be a github issue tho

fallen patrol
static canyon
#

Altho something I noticed at first glance is you never got around ro restructuring the json file

static canyon
#

RE site#621

The lint-test check is failing since the max-line-length is configured to 100. Should I fix this, or do we want to increase the max-line-length to 120 to be consistent with the other repos?

dusky shoreBOT
green oriole
fallen patrol
#

ah

#

i pinged admins because that's what I remember being told last time

#

ohhh it was an admin fix issue tho because help channels

#

guys akarys is crazy

molten perch
#

Hey! I ran into a bit of a problem while implementing the async test suite for the pydis. API.
The API uses pytest, and pytest-asyncio, and it seems like the async fixtures are run with a different self than the actual test methods.
(The corresponding issue: pytest-dev/pytest-asyncio#197)
Has anyone occurred something like that?
(I've come up with a solution, that circumvents this issue, but I don't think that it's the way to go, only a last resort idea to go with.)

molten perch
#

Accessing the correct instance via a non-async-fixture. But, that's something that should be considered as a last-resort (or maybe not even that) idea.

dim pelican
#

sir-lancebot#842 should finally be finished, or close to it if someone finds anything else that needs tweaking

dusky shoreBOT
dim pelican
#

Apparently color is hard

austere hornet
#

I probably should have asked but I've been quite busy and been focusing more on getting the game itself working, and then worrying about the nitpicks. Just want you to know that I'm not purposefully ignoring your comment, I was primarily focused on getting everything else to work before focusing on the nitpicks. Does that make sense?
Also as I said, I'm still not sure exactly what I need to do, so if you could explain a little more about how exactly you wanted me to restructure the JSON, that would be great. Either ping me here or add a comment on GitHub. Thanks so much!

static canyon
#

Literally that's it

austere hornet
#

Ohh ok lol

#

That was easy

#

I understand things more visually than reading things that's probably why I was confused

austere hornet
green oriole
#

Hey @dim pelican, if that's fine with you, can I push a commit to your color PR and just merge it? I think you've spent enough time on that time 😄

dim pelican
green oriole
#

the JSON file is missing the copyright notice

dim pelican
#

I see, yeah give me a second to set you up

green oriole
#

If you checked "allow edits from maintainers" I have push access to that branch

#

yep I do

dim pelican
#

I invited you just in case

green oriole
#

I feel like I borked the file

#

looks good

#

I am capturing the first core dev I see to leave a proxy approval

brisk brook
#

huh

austere hornet
green oriole
# brisk brook

qwerty isn't a core dev and chris also committed to the PR lol

austere hornet
#

I'm getting this error when I try to commit. Does anyone know why?

#

I also got this error when I ran poetry run task precommit:

gritty wind
#

Did you run poetry install?

austere hornet
#

I had poetry installed for a long time I'm pretty sure

gritty wind
#

Try “poetry install —remove-untracked”

#

The option name may be wrong, check the help

austere hornet
#

It's working now actually. Thanks Scale!

austere hornet
#

Anyone know why I'm getting this when I try to start up my test bot? (cc @dim pelican because I think this is related to your color PR)

#

I ran pip install coloredlogs and it's still not working

dim pelican
#

That's the colored trace logs

austere hornet
#

....ok, and? How do I get rid of the error?

thorny obsidian
#

are you running it via poetry or docker?

austere hornet
#

Docker

thorny obsidian
#

delete the image/container, then docker-compose up to rebuild it

austere hornet
#

How do I delete the container? Inside Docker?

thorny obsidian
#

mhm, through the docker desktop window/menu

austere hornet
#

Actually, can't I just run docker-compose up --build?

#

Instead of deleting the container?

thorny obsidian
#

I prefer deleting the container in most cases since sometimes caching within docker can do funky things

dim pelican
#

Gotta compose it down or delete it to rebuild the image right?

austere hornet
dim pelican
thorny obsidian
#

Yeah coloredLogs has nothing to do with brad's color PR

austere hornet
#

Oh ok, I thought it was, but I guess not

#

Thanks

vocal wolf
#

@dim pelican is it over? Is it... done?

thorny obsidian
#

.color

dusky shoreBOT
#
Oxford Blue

Color information for Color Oxford Blue.

RGB

(56, 69, 85)

HSV

(213, 34, 33)

HSL

(213, 21, 28)

CMYK

(34, 19, 0, 67)

Hex

#384555

Name

Oxford Blue

thorny obsidian
#

IT LIIIVES

dim pelican
vocal wolf
#

I'm so proud of you

austere hornet
vocal wolf
#

This was one hell of a PR

summer garden
#

I'm assuming the bot auto updates when you push to main branch. How does that work?

vocal wolf
#

Microsoft Azure

#

iirc

thorny obsidian
#

It's a really good command, thanks for sticking with it brad~ (also pushing back on a lot of the scope creep >_>)

dim pelican
#

On a totally unrelated note, I probably won't be PRing anything for a while. I'll just stick to reviewing and testing

vocal wolf
#

for your sanity

dim pelican
vocal wolf
#

lol

trail pilot
#

That probably wiped a way a lot of your sanity

patent pivot
gritty wind
#

I don’t think we’ve been on azure since I joined the staff team ages ago lol

patent pivot
#

oh please say i still have it

gritty wind
#

You always do joe, it’s your speciality

patent pivot
thorny obsidian
#

Is that from the devops talk?

patent pivot
#

yes

#

lol

dim pelican
patent pivot
#

i also have this one

#

for how traffic gets from user --> us

#

it's a bit simplifed though

trail pilot
#

That’s a lot

patent pivot
#

the full on version is out of date now I think

trail pilot
#

Is it the most commented PR on sir lancebot?

patent pivot
#

hmmmmm

#

it is

summer garden
#

oh damn

patent pivot
#

correct enough

#

the coredns/kubernetes api stuff is weird but the rest looks correct

#

it also omits that not all volumes are databases

#

services can have their own volumes

#

nginx ingress fetches the IP from the API, any other service, unless explicitly configured for kubernetes, fetches the IP from CoreDNS, which in turn fetches it from the Kubernetes API, so CoreDNS just wraps the Kubernetes API over DNS alongside resolving all external DNS queries (e.g. discord.com)

#

it just adds a .cluster.local. zone which it can resolve for

green oriole
#

Who's gonna read and try to understand the whole diagram lmao

patent pivot
#

lol

fallen patrol
patent pivot
#

yeah

fallen patrol
#

ok

fallen patrol
#

which decorator is that for whitelisting a new channel in addition to the defaults??

vale ibex
fallen patrol
#

hmmm

#

should i add #dev-branding to the config, or just whitelist this entire category

vale ibex
#

Honestly this command seems like one that could be useful everywhere

#

Or at least in help channels and topical

#

Category seems fine for this specific change

#

But it might be worth opening an issue to see if it should be extended further after too

fallen patrol
#

oki

#

should i also add constants.Categories.media?

fallen patrol
stable mountainBOT
#

bot/utils/decorators.py lines 283 to 291

def whitelist_override(bypass_defaults: bool = False, **kwargs: Container[int]) -> Callable:
    """
    Override global whitelist context, with the kwargs specified.

    All arguments from `​in_whitelist_check`​ are supported, with the exception of `​fail_silently`​.
    Set `​bypass_defaults`​ to True if you want to completely bypass global checks.

    This decorator has to go before (below) below the `​command`​ decorator.
    """```
gritty wind
#

If you want to enable it globally, set the role to everyone

#

The defaults part allows you to remove parts of the global whitelist, so you can disable certain commands in channels where they are otherwise enabled

fallen patrol
#

ahhhh

fallen patrol
rapid igloo
# dim pelican F I N A L L Y

congrats 🎉 it's a really nice feature, well done! support for alpha values and color palettes is on my todo list :P

short snow
placid ermine
#

holy fuck the color pr has 142 commits

fallen patrol
#

@gritty wind are you okay.

gritty wind
#

I hate it so much

fallen patrol
#

you know the definition of insanity right?

gritty wind
#

I was trying different things smh

fallen patrol
#

force pushing multiple times and expecting different results

gritty wind
#

I wasn’t just pushing the same thing 10 times lmao

fallen patrol
#

;-;

#

its actually pretty funny to view #dev-log lmao

gritty wind
#

Force pushes are the new commits

fallen patrol
#

what was up with it passing??

gritty wind
#

It was expected to pass

#

It’s exactly like the final push

#

It’s just not a nice solution

fallen patrol
#

ah

green oriole
#

Scaleios just smashing that branch over and over again
🐍 🖐️ bonk
🌲 🔥

gritty wind
#

It’s a shit branch, deserves all the punishment

green oriole
#

poor branch

fallen patrol
#

that's my branches

#

i uh, i have several unpushed branches of code on my own project

fallen patrol
#

+2

fallen patrol
#

what's the deal with the wolfram command?

#

why is wolfram broken, any internal sentry errors on that?

vale ibex
#

It's not broken

#

.wa short 2+2

dim pelican
dusky shoreBOT
fallen patrol
#

...

#

what.

#

it's been breaking a lot aside from that one exact example

vale ibex
#

Can you give an example?

fallen patrol
#

you just saw it lol

#

.wa iirc

vale ibex
#

Oh, that's not it breaking

#

That's wolfram saying it doesn't have an answer

fallen patrol
#

well

#

different comment, then

#

wolfram returns what it is having trouble with

vale ibex
#

Yea the command was made a while ago, so that either didn't exist back then, or was ignored by the person who made it

fallen patrol
#

if it doesn't have an answer could the reply be a bit more informative

#

ah

short snow
#

oh shit

#

my bd

#

ty akarys

green oriole
short snow
#

and that's it

#

finally opened them

clever wraith
#

what is this channel for and what do you do here~?

#

i read the description

dim pelican
#

Contribute to the open source bots we have

clever wraith
#

and not other things?

dim pelican
#

Like what other things?

#

Python Discord Project discussions. Don't forget to lint!
From the channel description

green oriole
#

Don't forget to lint or... bad things happen

#

I believe you get murdered by lemon in some ways

dim pelican
#

Eternal shame in #dev-log for failed checks

green oriole
#

I still think there is murder included

#

Right, so @crude gyro will throw his face into your face until you die and delete your internet

#

The latter being way worse than the former

short snow
#

Don't lie, you are still alive

green oriole
#

I always lint before I push smh

short snow
#

one more lie

green oriole
#

Smh I haven't pushed that one! Ks did!

short snow
#

😔

crude gyro
#

murder is such a strong word

dim pelican
#

sudo rm -rf life?

green oriole
#

lemon will end up murdering me in due time, don't worry

short snow
#

That's good news for alizee, she will live longer life

green oriole
#

thonking not sure if that's how it works

green oriole
short snow
#

.

austere hornet
#

Oh wow

green oriole
#

Excellent

thorny obsidian
#

@eternal owl heeeey so took a look at the Events issue and what functionality is covered by Discord's new native events functionality... and yeaaaaaaaaaaah. The discord's event functionality does accomplish everything I listed in the issue. Thank you so much for working on it though!! I super appreciate it!!!

molten perch
#

Well, haven't done anything specific since last time. We'll implement paralel testing later on.
For now, I'm waiting for @vale ibex 's PR to be merged, then I'll push my PR that adds the reminder endpoints, but now using the newest SQLAlchemy syntax, and an async driver.

#

If that PR gets merged, and tested, we can start migrating the rest of the endpoints, based on my "template", sort of.

green oriole
#

All of them

#

I believe

molten perch
#

Yeah, that's the one.
Just a few modifications and it's good to go.

vale ibex
#

Can we just merge it and deal with issues after if it's blocking

#

Since its not prod anyway

thorny obsidian
#

👉 👈 ... but if D0rs4n is blocked then I can maybe con convince him to do another event PR :D

molten perch
#

Actually, it's just 2 characters and a space, and it's good to go. I can push the changes, I believe i have push perms.

vale ibex
#

Oh it's failing linting lol

molten perch
#

Yeah it should be postgresql. 😄

vale ibex
#

Eh?

#

Where did I miss that lol

thorny obsidian
#

peeerhaps another AoC one that shouldn't be too bad???

molten perch
stable mountainBOT
#

.github/workflows/lint-test.yml line 27

DATABASE_URL: postgres://pysite:pysite@postgres:5432/pysite```
molten perch
thorny obsidian
#

sir-lancebot#325

dusky shoreBOT
molten perch
#

Oh, I see. It was not completed during October. 😄

thorny obsidian
#

yeaaaaah

vale ibex
molten perch
molten perch
# thorny obsidian yeaaaaah

I see, last time I checked my session cookies did not work. Might have been a temporary problem will check.
So, I guess I can use the same dataset like the last time? 😄
(btw. How's the point system look like in AoC? 5 points each completed star? )

thorny obsidian
#

For N users, the first user to get each star gets N points, the second gets N-1, and the last gets 1

#

So if you have 100 people, 100 points is the max. If you have 200 people, 200 points is the max. It varies per day.

#

As people complete them, it changes how many points

#

which does give me an idea for the very end, recalculating points but only taking into account people who have completed all days

molten perch
thorny obsidian
#

Mhm, but the global leaderboard operates differently than the private ones

#

Global only cares about the first 100 people who finish for each day. Those people get points, everyone else gets 0

#

It's also why AoC (and subsequently us) have a hard "no spoilers until global is filled" policy

molten perch
#

I see, then I guess the issue description is wrong.
It says that you can just find yourself by searching for it on the site with CTRL+F

gritty wind
#

You can look on the private leaderboards which do work like that

thorny obsidian
#

So that issue is old enough that that's when we had a single community leaderboard

#

With multiple private leaderboards you can no longer do the ctrl+f

molten perch
stable mountainBOT
#

bot/exts/events/advent_of_code/_helpers.py lines 141 to 148

    sorted_result = sorted(results, key=operator.attrgetter("completion_time"))
    for rank, star_result in enumerate(sorted_result):
        leaderboard[star_result.member_id]["score"] += max_score - rank

# Since dictionaries now retain insertion order, let's use that
sorted_leaderboard = dict(
    sorted(leaderboard.items(), key=leaderboard_sorting_function, reverse=True)
)```
thorny obsidian
vale ibex
#

Fixed the lints

molten perch
molten perch
vale ibex
#

<@&409416496733880320> I request your seal of approval on api#29

dusky shoreBOT
thorny obsidian
green oriole
#

yessss

vale ibex
#

@patent pivot Any objections to me update the review policy in api so it uses the default?

#

well it's pushed now anyway

#

we can revert if he says otherwise

gritty wind
#

It would mean more reviews per PR, no?

vale ibex
#

but it won't take affect until it's in main

molten perch
# thorny obsidian mmmm, not sure I'm getting. Could you show an example?

Sure, so... You request the scoreboard, and you provide a parameter like my_stats and 1.
And it'll format the output accordingly.

----------------------------------------------------------
(You) 21 | Xy #112312                | 95
       1 | Anonymous #500370         | 123
       2 | Mushinako                 | 121
       3 | Square789                 | 120
   

(Sorry I edited this by hand)

gritty wind
#

The default is 1 staff and 1 contrib, so like you’d just increase it

vale ibex
#

Ah yea makes sense

#

I've dropped that commit

#

should be mergable after lint pases

molten perch
#

Nah, we're fine. :3

vale ibex
#

well two of them are draft lol

molten perch
# vale ibex well two of them are draft lol

Is creating an init.sql and mount the volumes for them, a good way for creating the test database?
I had some problems with raw SQL queries. (I spent about an hour with them, and in the end the problem turned out to be an "unurlsplitted" url passed into the engine. -_-)

#

Which projects is this?

#

Yeah, cool.
So for now issue this command flake8 --config=tox.ini

vale ibex
molten perch
#

Sorry, github actions.

vale ibex
#

run it with docker in lint

stable mountainBOT
#

.github/workflows/lint-test.yaml lines 42 to 43

- name: Run database using docker-compose
  run: docker-compose run -d -p 7777:5432 --name pydis_web postgres```
vale ibex
#

Just need to update in lint too DATABASE_URL: postgresql+asyncpg://pysite:pysite@localhost:7777/pysite

molten perch
#

Oh.. I actually went defining a service and such, since it was in the file. But that seems way easier.
I'll add it, and push my PR.

vale ibex
#

rule 47 of coding, there's a 95% chance someone has already solved the issue you are seeing 😛

molten perch
#

I'll keep that in mind 😂

#

I have just rebased my branch, I hope everything's alright 😂

thorny obsidian
molten perch
#

I'm not sure. I've gotta check it out.

#

Yeah, it seems so. The code iterates through the sorted result, and just assigns a score to a member in leaderboard

#

I did too, conflicts are meant to be (re)solved lemon_fingerguns_shades

#

Yeah, it's a new line

gritty wind
#

It doesn’t matter, pick either, relock, and push

#

Lock files weren’t made to be handled by humans

#

You’re more likely to break it if you try to manually resolve it tbh

vale ibex
#

just do git checkout --theirs path/to/file

#

rather than manually fixing each line

molten perch
brazen charm
molten perch
#

@thorny obsidian
There seems to be a problem here..
bot.exts.events.advent_of_code._helpers | ERROR | It seems like the fallback cookie has expired! I can't use my session cookie anymore. :/

thorny obsidian
#

uhhhh dev tools are disabled at my work, but I can get you a new one .. WAIT

#

YOU'RE STAFF NOW

#

Just join the staff board

green oriole
#

is the year correctly set?

#

or just.. do that lmao

thorny obsidian
#

If you join the staff board you can grab your own session cookie

molten perch
#

Alright, how do I do that? 😄

thorny obsidian
#

give meeee one second and I'll send you the invite

gritty wind
#

How and why do you block dev tools 🤔

thorny obsidian
gritty wind
#

Lol

thorny obsidian
#

no one ever accused my employer of making sense

molten perch
green oriole
#

Hmm, the code is in a repo with no license

molten perch
#

Yeah, that's why I'm not sure. I mean I used it as a source for tests, documentation on that topic is pretty bad

green oriole
#

Did you copy code verbatim?

molten perch
#

I hope not? 😄
I just followed the logic most of the times. On some places changed on it.

#

The only thing is the conftest there. That's all.

#

But there are things that are so straightforward you can't change them

green oriole
#

Should be fine then I think

molten perch
#

Yeah, I guess, I can't see how else I could yield an async httpx client 😄

#

I'll open an issue, just to make sure. 😄 That's the only and easiest way.

ashen isle
#

@static canyon i implemented the suggestions from the thing. you weren't originally a reviewer so i can't request your review (😔) ples check it out? 🥺

brisk brook
#

It was a real pain because I was doing frontend at the time..

#

Couldn't even Inspect Element 💀

gritty wind
#

Maybe try profile = black

#

Where do you have that

dusky shoreBOT
trail pilot
#

Hmm, quick question real quick, what do you all think of a command similar to CarlBot's highlight command, where you get a DM if a certain keyword was used

I think it could be useful for people who wanna help out somewhere or read a convo on a certain keyword (say, sockets) and they can customize which channels that would have watched, etc.

thorny obsidian
#

I can dig up reasoning from the meeting since I don't think we've closed the issue yet

stable mountainBOT
#
Sure thing!

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

brisk brook
# trail pilot That would be nice, thanks!

Tl;Dr too much spam at our volume (ratelimits!), there's a potential that too many people try to help at the same time (leading to a poor help experience) and then also how we would moderate what one can highlight.

trail pilot
#

Ah, gotcha

fallen patrol
#

the worst thing is when multiple changes are made, but only half of them are staged, and then black and flake8 complain

clever wraith
#

I already love the command palette

stable mountainBOT
cold moon
#

@static canyon I think MyPy looks weird, because official name is mypy/Mypy (#dev-log message)

static canyon
#

Ah, I thought the name was MyPy

#

Leave it as-is then

#

I'll update my comment

static canyon
#

bot#1959 exists now @short snow

dusky shoreBOT
static canyon
#

Thanks for the issue 👍

#

I'd been putting that off for a while lol, and it was actually pretty easy

short snow
#

yep saw it, will try reviewing soon... same, I was supposed to create it about a month back

static canyon
#

:p

fallen patrol
#

lol i love pre-commit

vale ibex
#

Ideally each commit should conform to pre-commit checks. If you really need to have intermediary commits, and you have the intention to fix afterwards, then there's always --no-verify

fallen patrol
#

that doesn't always work out, but that goal means that any bugs will be easier to find which commit and therefore feature caused them

vale ibex
#

Yea. That's the preferable option.

fallen patrol
#

yepp

#

by aiming for that, its not as bad when it doesn't happen

#

and it makes using git bisect a lot easier

brisk brook
green oriole
#

hi

dim pelican
#

They are just posting hello in every channel they can find

hoary haven
#

ikr right this akarys guy 🙄

dim pelican
#

Ohhh thats awesome. I guess they got banned and purged?

static canyon
dusky shoreBOT
vale ibex
#

you (or black) made some changes to the migration files

#

Yea, I had assumed as much

#

We do want that yes. But also, might as well fix the parts we can in the mako file, so that it doesn't need to

#

👌

green oriole
#

Why are we using black?

#

Doesn't seem to match with our code style

thorny obsidian
#

Legacy decision, Seb added it to the repo awhile ago

green oriole
#

Do we still want it?

short snow
#

for migrations.. I had like to have it... it keeps them formatted otherwise you get them all in single line with no indentation. It could be manually done also though, as the initial migrations is done and other changes are going to be small ones

thorny obsidian
#

I don't think it really meshes, since we're planning on using API in conjunction with site and bot. That's going to be annoying to remember that just one service uses black and the others don't

green oriole
#

I would personally not even lint migrations, but that's another problem I think

molten perch
short snow
#

some write migrations on their own... that includes me, yes.. I didn't know we can auto generate them and now just write it on my own

green oriole
#

But I think we should be either yeeting black now or never do it

#

Hey @hardy gorge, what do you think about whenever we should keep black in the api or not?

molten perch
#

I don't think we should write migrations by hand.
And I'm strongly against implementing such a process.

hardy gorge
green oriole
#

There are some decent reasons to add some python code to migration

thorny obsidian
#

(But pls, from a new contributor standpoint, it's awkward when 3 services that are supposed to talk to each other don't use the same linting tools)

hardy gorge
#

I really like having black, even if some of the style decisions it makes are different to my personal preference. I really hate spending time arguing over this or that style.

#

It's non-constructive.

short snow
#

I agree with seb here

green oriole
#

Sometimes you have to actually migrate the data manually

molten perch
green oriole
#

Yup

molten perch
#

If you have to modify something, then feel free to do so, but I'm not gonna remove auto-generation in favour of linting 😄

short snow
#

huh? the inital migration is already linted

green oriole
#

Maybe we could have a core dev + contrib discussion over using black in our projects? I think we shouldn't have a disparity in our projects

molten perch
thorny obsidian
#

(I don't care what y'all use, my concern is that it should be consistent for different repos that communicate)

short snow
#

then, why would we need to modify it again?

molten perch
green oriole
short snow
#

yeah and we did that for the initial migrations

#

i thought he was talking about those, not the new oens

molten perch
#

No, we're talking about future migrations. (Or migrations ported over from site)

#

I guess we can add it, but we still have time.
We have to migrate the endpoints and the test suite first, there shouldn't be too much migrations til' then. 😄

short snow
#

just add it as alembic hook, so they come auto formatted.. we won't need to run manually and edit them, like doublevcodes said

molten perch
#

Sure, feel free to open an issue, and maybe later on a PR.

short snow
#

doublevcodes is alreayd doing that on his PR

#

that;s what you meant by "make alembic do it" right? Or i got it wrong

thorny obsidian
#

@molten perch consider yourself assigned

molten perch
#

Alright, I can assign myself if you don't mind 😂

thorny obsidian
#

please do, I'm not logged into my personal github at work so I can't do it until I get home

molten perch
#

Alright, so is the idea which I proposed yesterday fine with you? (The list where (You)'re the first and then it lists the actual top scorers)

molten perch
#

Alright, I'll give it a try this weekend, shouldn't be so hard! 😄

short snow
#

IIRC there is already something like mystats on the AOC site

thorny obsidian
short snow
#

Ah yeah, but could the format be something like that?

thorny obsidian
#

That could probably be a thing for a future iteration. I like to see how people use the command and what kind of features they're after

#

Also we're 2 weeks away, so I want to keep the scope small since we're so close

short snow
#

👍 right, is there a basic mock/write-up on the current proposed format

thorny obsidian
#

I think somewhere above in this channel

molten perch
#

I edited that by hand, don't mind the indentation.

short snow
#

uhh so it would jsut put your score on the top and rest remains the same?

molten perch
#

Indeed.

#

Small, simple idea, yet useful. 😄

short snow
#

rather than that, could we jsut add it to as the 11th line to the lb command?

molten perch
#

Well, what difference would it make? This way they spot it easily.

short snow
#

They would spot easily on both cases imo... The embed is only 10 lines long

thorny obsidian
#

I don't think which one really matters, I'll just go with what d0rs4n prefers

short snow
#

The command is just gonna be a duplicate... But yeah for now it's fine as we aoc is in 2 weems

molten perch
#

Lucky, that I do not plan to create a separate command. (Read the description of my message I sent above)

short snow
#

Mhm I didn't read that, it's ok then 👌

#

My eyes directly went on the codeblock

#

Yeah, add black as alembic hooks

short snow
#

👍

dusky shoreBOT
gritty wind
#

How do we create new filterlists 🤔

#

Ooh cool, they're hardcoded into the site models

short snow
#

yeah

green oriole
gritty wind
#

It makes it easy, cuz I can just search for one of the other tokens and duplicate it

fallen patrol
green oriole
#

Can we get url unfurling before a new filter list? akarys_pleading

fallen patrol
#

unfurling?

static canyon
#

"unfurling" url shorteners

#

There's a bot issue for it but I can't remember the number off the top of my head

fallen patrol
#

i mean, that's not going to always work

green oriole
#

Yes, it isn't a direct redirect it won't work

fallen patrol
#

yeah like this https://rroll.to/3txzi7

green oriole
#

But if they do end up doing that, fuck it tbh

fallen patrol
#

perfectly legit link pls click it thanks

fallen patrol
#

one thing the first time you go to it and a different the second

gritty wind
#

I mean we aren’t trying to solve non-existent problems

#

The unfurl url issue has a very well defined scope internally because we need it for something specific

#

It’s also more or less ready to be pushed, but its 3 PRs, all which need reviewing

#

I’ll probably have xith bully the mod team

cold island
gritty wind
#

What am I conflicting with lmao

#

Either way it’s a one line change, so it’s relatively okay for me to recreate from scratch

cold island
#

If we're migrating a chunk of the table it will need an update in the migrations of the other PR

gritty wind
#

Ah, I see

#

Well, I already committed another migration like a week ago lol

#

Anyways, I've made site#625 for now, it doesn't need to be merged until the bot PR is ready, and if the other PRs are merged by then, I'd be happy to remake migrations

dusky shoreBOT
gritty wind
#

Btw, while I have you here Zig, what do you think about this

#

I have a utility (separate of the filter itself), which allows you to invoke the unfurling manually through a command

#

Now technically, it's standalone of the filter work, but it's going to be helpful for working with the filter in cases where the filter fails

#

It's ready, so I can either include it in this PR and get it done with, or make a follow up PR so this one doesn't get delayed because of it

vale ibex
#

I'm very much in favour of running linting against migrations files. It's code which is reasonable to assume will be looked at to debug issues, and if it's code that needs to be looked at, it should be linted to our standards.

green oriole
#

I think we can enforce that the style of those files is reasonable through code reviews, but we shouldn't be strict about it and have the contributor edit the file because of styling

short snow
#

why would the contributor edit it because of the styling? Alembic is running black against them so they are already partiallly linted

vale ibex
#

Why not? Especially if we can just have black ran against them.

gritty wind
#

Ok, just pushed the redirect filter PR, and it auto requested Akarys, joe, and Zig

Perfect

green oriole
#

Black doesn't follow our code style though

#

In the case of the API it doesn't really matter I guess

#

@gritty wind about about domain_redirect? :3

#

I would be for simplifying the others, but i think this one should be explicit

gritty wind
#

Do you believe redirect is not clear enough? It would require making two more commits on two separate PRs :P

#

I can look at it tonight

green oriole
#

700 lines diff dear god

gritty wind
#

It’s a biggin

#

And that’s before you consider the worker 🤡

green oriole
#

it was supposed to be like 30 lines lmao

gritty wind
#

Half of it is tests for the service lol

green oriole
#

smhmhmh

cold island
cold island
gritty wind
#

Time is relative to my sleep schedule

green oriole
#

Didn't know time could go backward, because that's really how I feel sometimes with my sleep schedule

short snow
#

Nice, black on bot!

thorny obsidian
#

Just a test, not certain we'll keep it yet

short snow
#

Welp, celebrated too early

austere hornet
#

Lol

patent pivot
#

lol, yeah, it was just a "wonder what this'll do" thing

vale ibex
#

This is just to see what the diff would look like and whether we would want some of these changes.

patent pivot
#

lol

vale ibex
#

I was hoping the PR description would be enough lol

patent pivot
#

any further formatting decisions will be published as security advisories from private forks

#

CVE-2021-69420: Python Discord Bot was missing a trailing comma

vale ibex
#

with an accompanying CVE

green oriole
#

Lmfao

fallen patrol
gritty wind
#

See the linked PRs

#

But yeah, 300 lines of tests is a death sentence for a PR

fallen patrol
#

👀

#

since when

gritty wind
#

Since we’ve been doing tests on our repos

fallen patrol
#

i guess i need to get better at smaller prs....

gritty wind
#

The silence PR was an eye opener for me

#

I opened it when I joined staff

#

And merged it as an admin

fallen patrol
#

iirc I have a 600 line pr of just tests

#

because previously I did not write tests

#

(not for pydis)

clever wraith
#

Lmao

#

Was the silence PR that big

#

510 lines, not that bad

#

Wait, that one is by Num

gritty wind
#

Bot#1297

dusky shoreBOT
clever wraith
#

Oh, voice chat muting

#

Is it even used, heh

#

What the heck +600 of tests

fresh rock
#

Hello, sorry for lame question. I wanted to play around wuith sir lancebot -> I created a discord server, created a bot, cloned a project, run docker-compose build and then up. Bot got activated but it doesnt respond to comments. I got such error msg when activating bot.

Traceback (most recent call last):
  File "/bot/bot/bot.py", line 134, in send_log
    devlog = await self.fetch_channel(constants.Channels.devlog)
  File "/usr/local/lib/python3.9/site-packages/discord/client.py", line 1491,  in fetch_channel
    data = await self.http.get_channel(channel_id)
  File "/usr/local/lib/python3.9/site-packages/discord/http.py", line 329, in request
    raise Forbidden(response, data)
discord.errors.Forbidden: 403 Forbidden (error code: 50001): Missing Access
#

Is this something wrong with .env ? Missing tokens?

thorny obsidian
#

It looks like your bot doesn't have permissions, what permissions do you have on the bot role?

fresh rock
#

need to check, brb

clever wraith
#

I believe the error here is you didn't change the ID of the dev log channel

#

Because a fetch will only fail if you don't have read permissions over that channel, which the bot most probably have

fresh rock
#

Bot permissions integer: 0 😅

#

So i should add read permissions for my channel only, right?

#

CHANNEL_DEVLOG variable in .env, right?

#

ok, I need to rethink that topic...

#

nice, got it working

#

now one more question:
bot reacts to command after ' (single quote) sign instead of . (dot) sign. Can I somehow change/fix it ?

clever wraith
#

that's.. interesting

#

what does your env file look like?

dim pelican
#

(minus the token)

fresh rock
#

Im on it

#

30sec

#

omg

#

there is a PREFIX variable 😅

#

im sorry guys, learning is painful and sometimes teaching is even more painful

dim pelican
#

Don't be sorry about it 👍

clever wraith
#

there is no stupid question!

clever wraith
#

wat

short snow
austere hornet
#

That doesn't belong here (I'm sure you know that, but just in case)

#

K

brisk brook
#

I am confusion

#

It seems like @green oriole, @cold moon and @sharp timber have required changes that are blocking the merge right now.

thorny obsidian
#

The required changes aren't blocking it, you just need a core dev to actually press the button

brisk brook
#

Oh you're right, hmm, I am probably gonna stop using the GithHub app honestly.

The only benefit is being able to comment on multiple lines lmao

vale ibex
#

You can comment on multiple lines in github web

#

Just click and drag on the line numbers and then click the + on the last line

short snow
#

chris 🥺

brisk brook
brisk brook
short snow
#

nope...i use the web to review

brisk brook
#

Besides, it fucks up indents with word wrap like what the-

#

Like bruh

short snow
#

you can disable that, its somewhere in the settings

brisk brook
#

Okay okay okay let me see

#

Oh my God I am so stupid smh

green oriole
# brisk brook

Nag that's a UI bug, you don't have write perms onto main, you cannot merge

short snow
#

someone merge enhance incidents PR 🥺

green oriole
#

Dismissed my review

cold island
#

Need to test it again before I merge

#

Unless someone else wants to

cursive relic
#

can the @stable mountain bot control slowmode by itself, without the slowmode command being ran?

#

like if the chat is really fast, can it make slowmode higher automatically

brisk brook
#

That's not a current feature

#

I know it has been discussed

green oriole
#

we have some stats for it now

cold island
#

My next pet project if I ever finish with the filters lol

short snow
#

the new filters system?

cold island
#

yeah

green oriole
short snow
#

it would be good to include the additional frame which was skipped.

#

and you could probably add good first issue

green oriole
#

it has good first issue

#

the last frame isn't relevant, it is the d.py dispatcher

short snow
#

umm did you just add it pithink I couldn't see it earlier... the last frame would have included the line (L408 prob) on which the deletion happens which may be helpful

clever wraith
#

no, like every command traceback the first frame is in discord.exts.commands.core

#

... that's so dumb, does the docs mention that

vale ibex
#

Ah, it seems it's not part of Messageable

#

!d discord.TextChannel.delete_messages

stable mountainBOT
#

await delete_messages(messages)```
This function is a [*coroutine*](https://docs.python.org/3/library/asyncio-task.html#coroutine).

Deletes a list of messages. This is similar to [`Message.delete()`](https://discordpy.readthedocs.io/en/master/api.html#discord.Message.delete "discord.Message.delete") except it bulk deletes multiple messages.

As a special case, if the number of messages is 0, then nothing is done. If the number of messages is 1 then single message delete is done. If it’s more than two, then bulk delete is used.

You cannot bulk delete more than 100 messages or messages that are older than 14 days old.

You must have the [`manage_messages`](https://discordpy.readthedocs.io/en/master/api.html#discord.Permissions.manage_messages "discord.Permissions.manage_messages") permission to use this.
clever wraith
#

it does..

#

that's so stupid

molten perch
#

Hey!
I get this linting error when trying to lint sir lancebot

And if I try to fix it isort will revert it 😄
Is there something that I don't know of, regarding this issue? 😄

vale ibex
#

run poetry install --remove-untracked

#

looks like flake8-import-order is still installed in your env

molten perch
#

Oh, true. Haven't worked on lancebot for a while. My apologies. 😄

vale ibex
#

No worries 😄

molten perch
#

Here we go again: sir-lancebot#949 😂
I would appreciate if someone could give it a look, it's a fairly easy PR.
(Hopefully)

dusky shoreBOT
brazen charm
#

bot#1663 also needs a review if anyone has a larger bit of time

dusky shoreBOT
fallen patrol
#

uhm @vale ibex since when do workflows on the .github repo run on every repo

#

cc .github#9

dusky shoreBOT
fallen patrol
#

I've looked into that before and they've never run on all repos

#

there's some apps that do it, but nothing native

#

unless, of course, that's changed recently

patent pivot
#

we might need to move them into .github/workflows, but yes, it's a thing.

fallen patrol
patent pivot
#

yes, but we're not ready to roll this out anyway lol

fallen patrol
#

gotcha, should probably be detailed in the pr lol

patent pivot
#

it's fine as is

#

we're altering some policy, we'll publish that policy when we want to

#

i don't think we need to document the nitty gritty of rollout details on our .github repository, it's just unnecessary work

#

once we have policy in place we'll put it somewhere to explain what the label means

fallen patrol
#

hmmmm

patent pivot
#

maybe

#

we’ve had pretty limited success with modification so far, seems discord do some level of validation at their end, but it’s worth a shot. downside is we then have to parse all bodies whiiiiich eh… not sure I want the hassle tbqh

#

it’s an edge case

green oriole
#

I don't think black is behind a worker anyway

gritty wind
#

It is, for more control over what gets posted

green oriole
#

oh cool

#

it is behind our usual worker or a custom one?

gritty wind
#

It’s the same one

#

Hard coded into the worker

stable mountainBOT
#

github-filter/src/index.ts line 55

let isBlackNonMainPush =```
green oriole
#

that's cool

cursive relic
#

Is there a feature that tells how many times a modmail thread is opened? (by some user)

green oriole
#

yes, we can count that using ?logs

cursive relic
#

Can I know how many times I have opened a thread?

green oriole
#

43 times

cursive relic
#

Thats more than I thought 😅

#

Is the @slow bone source that this server uses a open source?

green oriole
#

?about

slow boneBOT
#

This is an open source Discord bot that serves as a means for members to easily communicate with server administrators in an organised manner.

Uptime

28d 23h 22m 1s

Latency

101.10 ms

Version

3.10.2

Authors

kyb3r, Taki, fourjr

Hosting Method

DOCKER

Want Modmail in Your Server?

Follow the installation guide on GitHub and join our Discord server!

Support the Developers

This bot is completely free for everyone. We rely on kind individuals like you to support us on Patreon (perks included) to keep this bot free forever!

Project Sponsors

Checkout the people who supported Modmail with command ?sponsors!

green oriole
cursive relic
#

Thx!

short snow
#

deleted

patent pivot
#

lol, let's not start advertising stuff in on topic channels

short snow
#

yeah 👍

cold island
#

@short snow it's merged lemon_happy

#

Thank you for working on it and sticking with it for such a long time

green oriole
#

That's the good stuff, thanks jason! pixels_snek_2 partygopher

short snow
#

zig I am waiting for your review on modpings 🙃 lol and thanks!

cold island
#

That might take a while, there's a bit of a queue 😅

vale ibex
short snow
#

👏

#

also we were going to squash merge it ig, atleast that's joe had said

cold island
#

Yeah I noticed the amount of commits a moment too late. Not a big deal though

rapid swallow
# vale ibex

wow
!ban @short snow We've received reports that you have worked on incidents enhancement. thank

short snow
#

banning and thanking, odd combination, thanks!

austere hornet
#

Lmfao

#

Wait why didn't the bot actually ban him

#

?

cold island
#

Because it's in the middle of the message

austere hornet
#

Ah ok

short snow
#

If no one gets to 1964, I will get to it once i get my lance PRs done

#

btw 745 needs core dev approval, bluenix did the first one

green oriole
#

no idea what those numbers are

#

what repo is it?

patent pivot
#

bot

#

bot#1964

dusky shoreBOT
patent pivot
#

not sure about 745

green oriole
#

lol @vale ibex they fixed links on Android like 3 days ago, they work pretty well now

#

I'm a bit eeeeehhh on that issue, but if people want it why not

#

sir-lancebot#745 maybe?

dusky shoreBOT
patent pivot
#

oh you already pinged in core

brisk brook
short snow
#

yeah those are the links, sorry forgot to include the repo

green oriole
#

that's cool

short snow
#

yes, thanks to bluenix for bringing that up - thread support

thorny obsidian
green oriole
vale ibex
#

Yea, that middle bit it the sticking point, it's currently in beta

#

so not "fixed" yet

thorny obsidian
#

I don't count anything in beta as being an actual fix

green oriole
#

well, at least a fix is coming\™️ soon\™️

tight mica
#

SIKE#

molten perch
#

I managed to patch the issue in this PR
sir-lancebot#949 , so I would love to have some reviews on it. 😄

dusky shoreBOT
green oriole
#

!remind 14h review after you get your freshly cutted hair

stable mountainBOT
#
I'll allow it.

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

thorny obsidian
#

I'll review it when I get home in like ~6 hours

fallen patrol
trim cradle
#

Disregarding what a bad boy in need of punishment I am for having all these mute infractions, there are too many new lines in here.

#

You could drive a truck between "Reason:" and "If you would like to discuss or appeal ..."

brisk brook
#

I think that we could place that in the footer instead?

vale ibex
#

because for bans we use a hyper link

#

I suggest just removing a new line

fallen patrol
vale ibex
#

I don't see the need to have it in two places

#

since we want to remove the new line anyway, for ban embeds

cursive relic
#

The bot has feature to link a github issue/pr etc sirlancebot#issuenumber, where could I find the src of it?

dim pelican
#

I think it is a webhook

cursive relic
#

Ah, thank you!

green oriole
#

Hmm since when do we have three line breaks

#

That's a recent change, my last infractions don't have that

#

@vale ibex ban me from watching the TV

vale ibex
#

bot#1965 🚅

dusky shoreBOT
vale ibex
green oriole
#

Oh what is he doing

#

Meh

#

Completing the pokedex

vale ibex
#

Speedrunning completing the pokedex on the new pokemon

#

it just came out today

green oriole
#

Oh speedrunning lol

#

Why casual plays when you can speedrun

vale ibex
#

😄

vale ibex
trim cradle
#

WHAT

vale ibex
#

I FIX

#

YOU APPROVE

trim cradle
#

JUST WHAT THE HELL DO YOU WANT

#

I'm at the gym

vale ibex
#

Ah

#

well enjoy dem gains

trim cradle
#

Sorry that was just the toxic masculinity leaving the body

vale ibex
#

lol

trim cradle
#

@vale ibex I approved it

#

Thanks!

vale ibex
#

ty

trim cradle
#

don't sus me

austere hornet
#

This channel got a bit off topic ngl

clever wraith
#

@trim cradle you commented and not approved lol

trim cradle
clever wraith
#

oh right

#

I just saw that

#

nice approval then

trim cradle
#

ye

patent pivot
#

emacs is so great

rapid igloo
#

yus but without evil it's nothing

stable mountainBOT
green oriole
#

!remind 2h learn how to calculate time

stable mountainBOT
#
Yep.

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

stable mountainBOT
fallen patrol
#

hmmm

#

interesting

#

I believe I've found a bug with the paginator

#

and that explains why I've found it so slow at times

#

its a simple pr to fix it...

stable mountainBOT
#

bot/utils/pagination.py lines 215 to 221

await message.edit(embed=embed)
embed.description = paginator.pages[current_page]
if footer_text:
    embed.set_footer(text=f"{footer_text} (Page {current_page + 1}/{len(paginator.pages)})")
else:
    embed.set_footer(text=f"Page {current_page + 1}/{len(paginator.pages)}")
await message.edit(embed=embed)```
fallen patrol
#

while at it, should probably make them if/elif for the slight efficiency boost

#

seems like the easy fix is actually

#

actually

#

there's a few other dupes in that file

stable mountainBOT
#

bot/utils/pagination.py lines 431 to 441

embed.description = ""
await message.edit(embed=embed)
embed.description = paginator.pages[current_page]

image = paginator.images[current_page] or EmptyEmbed
embed.set_image(url=image)

embed.set_footer(text=f"Page {current_page + 1}/{len(paginator.pages)}")
log.debug(f"Got {reaction_type} page reaction - changing to page {current_page + 1}/{len(paginator.pages)}")

await message.edit(embed=embed)```
scenic moth
gritty wind
#

The first message was deleted (by the bot, probably because it was an attachment)

#

They sent a new message, which did not get pinned

fallen patrol
#

okay, made a commit, prepped a pr, will submit if okayed 😄

green oriole
#

@thorny obsidian aoc PR reviewed

gritty wind
#

What time classes can have a TZ set? I'm assuming datetimes and time?

#

I'm trying to update the discord_timestamp utility to accept times with TZs

green oriole
#

I time has the tzinfo, yes

thorny obsidian
green oriole
#

catthumbsup merged

gritty wind
#

It only works with aware timestamps

#

but datetime.utcnow does not set the tz.... why what's the point

vale ibex
#

use arrow.utcnow()

#

or datetime.utcnow(tzinfo=timezone.utc)

gritty wind
#

just switched to datetime.now it's fewer characters lmao

#

Wait will datetime.now with the tz set get utc time, or local time and set UTC

vale ibex
#

datetime.now will return a naive with your current time

#

not utc

gritty wind
#

Nah it's utc it seems

#

datetime.datetime.now(tz=datetime.timezone.utc)
datetime.datetime(2021, 11, 20, 16, 11, 56, 78825, tzinfo=datetime.timezone.utc)

vale ibex
#

nah, that likely means your container is utc then

gritty wind
#

I'm running on my system

vale ibex
#

well yea, that converts it

gritty wind
#

Ah, that's what I meant

vale ibex
#

Yea, giving it a tz will convert the local time to that tz