#dev-contrib

1 messages ยท Page 70 of 1

green mesa
#

ok but i am asking for pr template only

#

like have u run pipenv and all that stuff where we put x

green oriole
#

I'm sure you can write a PR body yourself

glass pecan
#

you can reference other prs that have been merged if needed too

green mesa
#

doing that only

brazen charm
#

A lot of seasonalbot features follow the same outline, that's not really the case for the bot. The ticking stuff you do on seasonalbot should be handled with a properly installed precommit

green oriole
#

We assume that you did everything written at the bottom of the seasonalbot PR template

glass pecan
#

maybe reference anything by ves

#

for a nice pr description

green mesa
#

ok

#

my first pr at bot repo ๐Ÿ™‚

#

.pr 1237

dusky shoreBOT
#

[404] #1237 Issue/pull request not located! Please enter a valid number!

green mesa
#

woops

#

.pr 1237 bot

dusky shoreBOT
eternal owl
#

I think the file should be inside bot/exts/info/ instead of bot/exts/utils/

#

the package cmd file

green mesa
#

but utility label is mentioned on it

#

thats y i added file there

#

i can move it if u wnt

eternal owl
#

ohk

green oriole
#

utils sounds good

hardy gorge
#

@cold island sure. I've had some work, but the cog has changed a lot in the meantime, so it's trashware now

cold island
#

I could also try add an option to display modmail logs, though I'll see how it goes with what's already outlined

#

@hardy gorge if it's saved to a specific branch I could take a peek for reference

green mesa
#

@green oriole if u r free can i get my bug_ec merged i have two approval ๐Ÿ™‚

#

i have one question if someone approved my pr and again he/she gave review his/her approval get dismissed?

eternal owl
#

My review does not count I guess, we need another review from staff

brazen charm
#

They do count

green mesa
#

noice

#

then i have approval

crude gyro
#

@crude gyro I got idea about articles app: Currently this is loading all data over and over again from filesystem and last modified + contributors from GitHub every time when somebody visit article. But what about in ready function in AppConfig fetching all guides, categories and GitHub data at once and store them to cache, because in order to modify article, this have to redeploy, what means this cache everything again.
@cold moon

Yes, implementing complete caching is part of the dewikification plan. I guess maybe I haven't made an issue for it yet, but the idea is that once we get rid of the API and the staff/deletedmessages, we can cache all the pages and only need to return cache. there are tools to do this for the entire site very easily.

for the github repository data, we actually already cache this for 10 minutes between every request.

cold moon
#

But what engine we will use? Redis? Memcached?

#

Or just local cache?

crude gyro
#

we haven't discussed the implementation details yet.

#

maybe even higher level than that.

#

instead of implementing caching as code, we may be able to just use a middleware for it.

#

but let's get back to it later. one step at a time.

cold moon
#

Implementing this is really really simple and when I currently implement caching as local memory cache, then later we just have to replace config, because interface stays same.

#

This interface apply to each cache engine and replacing cache engine means replacing engine in configuration

green mesa
#

If anyone is free can u have a look at my pr

#

.pr 485

dusky shoreBOT
patent pivot
#

We could just put varnish in front of the site

#

that would be fastest

crude gyro
#

yeah, that's more along the lines of what I'm thinking

clever wraith
#

everybody gangsta until the owners start to talk

patent pivot
#

lol

clever wraith
#

oh shit and they respond

#

thank you for this server tho

#

its great

patent pivot
cold island
sharp timber
cold island
lime mural
#

I can fix that Bats

#

can I? :D

cold island
#

@sharp timber what are you referring to specifically? it seems like the message started with the correct answer

lime mural
#

no, the multiple mentions of the same person

brazen charm
#

Is your local site up to date Zig?

cold island
#

@lime mural feel free to open an issue in the repo and ask to be assigned there

lime mural
#

okay thanks :)

brazen charm
#

Looks like the cog just adds the authors of messages with correct answers to a list, so if someone answers multiple times they'll get multiple mentions

lime mural
#

yep

cold island
#

Numerlor this might sound dumb but I'm still trying to wrap my head around what the bot image can and can't do without the site. Figured some things would just be voided instead of raising exceptions. I'll look into setting it up now ๐Ÿ˜„

tawdry vapor
#

It needs it for infractions, the syncer (which doesn't really count since that is only done to support other features that use the site), storing defcon settings, off topic channel names, deleted messages, and some other stuff I am forgetting

#

Reminders

brazen charm
#

Well, you can ignore the error, but you'll get exceptions from anything that tries to connect to the site if it's not up and errors like the above if it's missing needed features/changes. In this case it won't sync the members

cold island
#

Yeah, I understand what the site is for, I just thought that the errors would be when I try to run the commands instead of when it's trying to start

#

thanks

sullen phoenix
#

the syncer runs on bot start, so thatโ€™s why

#

it also gathers infractions

tawdry vapor
#

There are several startup tasks, like reapplying mute infractions, syncing the watch channel cache

brazen charm
#

A lot of them run as a part of the cog inits so those will error out if something's not right

cold island
#

I see

tawdry vapor
#

Never mind the mute infractions, those are just done when someone joins the guild

sullen phoenix
#

it should gather infractions to reschedule their pardons

tawdry vapor
#

Oh what it does is reschedule them

#

Yes

cold island
#

Because that's the command I used

#

Should I be cloning the site as well? placing it in the same directory?

sullen phoenix
#

no, itโ€™ll pull the image from docker hub

cold island
#

Then theoretically it should have done so

sullen phoenix
#

what do you have as the site url and schema in the config?

cold island
#

let's see

sullen phoenix
#

i thought you had this working before

#

hmm

cold island
#
site:        &DOMAIN       "web:8000"
site_api:    &API    !JOIN ["api.", *DOMAIN]
site_paste:  &PASTE  !JOIN ["paste.", "pythondiscord.com"]
site_staff:  &STAFF  !JOIN ["staff.", *DOMAIN]
site_schema: &SCHEMA       "http://"
#

It worked without the site I just kind of ignored it because I didn't need it

sullen phoenix
#

like Numerlor said before, is your local site up to date?

#

try a docker pull pythondiscord/site

cold island
#

I rebuilt it so I figured it was enough

sullen phoenix
#

a rebuild should also suffice

#

yeah

#

okay, maybe not

#

lol

#
docker-compose pull
docker-compose up --build
cold island
#

got a bunch of warnings but otherwise seems ok

#

ok cool it works

#

thanks to all who replied ๐Ÿ˜„

rapid igloo
#

i found this in the roles page:

This includes writing pull requests for open issues, and also for reviewing open pull requests (we really need reviewers!)
does that mean everyone is welcome to leave code reviews?

sullen phoenix
#

absolutely

rapid igloo
#

wow ok

#

i'm scared xd

brazen charm
#

You should be familiar with the environment of the project you're reviewing for before doing it though

rapid igloo
#

could anyone have a look at this if you're free

#

.pr 501

dusky shoreBOT
sharp timber
#

Something doesn't seem right here

#

This doesn't make much sense though, because this will only do an upload if theres a lot of newlines, but under 1000 characters, which doesn't apply to many files. In addition, there's a path here:

        if lines > 10:
            truncated = True
            if len(output) >= 1000:
                output = f"{output[:1000]}\n... (truncated - too long, too many lines)"
            else:
                output = f"{output}\n... (truncated - too many lines)"
        elif len(output) >= 1000:
            truncated = True
            output = f"{output[:1000]}\n... (truncated - too long)"

        if truncated:
            paste_link = await self.upload_output(original_output)

that seems to expect to upload code to the paste service if we cross over 1000 characters. But if we do, no upload happens.

#

For a use case example:

import dis

def f():
    try:
        1/0
    except Exception as e:
        pass
    return e

dis.dis(f)
#

returns ~1200 characters. Well short enough to reasonably upload to pythons paste, and still doable in a message, but the bottom gets cut off at the moment and it's not uploaded

cold island
#

@sharp timber this is a very old commit

sharp timber
#

yeah, and it hasn't changed since. Which confuses me.

#

because I don't recall the behavior

cold island
#

it's limited to 1000 characters

#

it might be outdated with the current pasting service, but it's something that joe can probably answer better

sullen phoenix
#

thatโ€™s there just because

#

the actual limit is like 50k

brazen charm
#

I'd say open an issue, afaik the limit is intended but the logic around it doesn't make all that much sense

cold island
#

it could be to prevent the service from being bombarded with large files, but it doesn't have to be 1000

#

We could limit it to say 2000, and if the output is still too great, then truncate it in the paste as well instead of not uploading it at all

brazen charm
#

I don't think it really matters but not truncating huge outputs for the paste service does exclude the amount of spammy while True print type things from it

tawdry vapor
#

During a staff meeting it was decided to leave it at 1000 even though I suggested something higher. I think all of the people involved overlooked the fact that it truncates at 1000.

brazen charm
#

There's also the nice opportunity to use the new line counting helper from the codeblock pr instead of count there

tawdry vapor
#

It was in voice so I don't remember what exactly was said over a year ago

#

I think the intent was to not overload the paste service but even 50,000 characters is only 0.05 megabytes

cold island
#

I think it's worth opening an issue about it a year later.. worst case it'll be closed again

tawdry vapor
#

At the time the limit was something like 100k character limit and 100 MB for content, which is why there's that comment about the 400 - you could spend a while uploading 100MB only for the server to send back a 400 minutes later cause there are too many characters

rapid igloo
sullen phoenix
#

it's not documented

rapid igloo
#

Wut

sullen phoenix
#

everything under http is not documented

#

we probably used it to save an API call

#

oh, i remember, it was in a PR that had some controversy

#

let me find it

rapid igloo
#

ok

sullen phoenix
#

yeah, it was to save an API call along with getting rid of some chunky code

rapid igloo
#

Ah ok, ty

#

Now that people know the bot pins the first message

sullen phoenix
#

i wouldn't mind now, but it's a good idea to open an issue to get the thoughts of other people as well

rapid igloo
#

done โœจ

#

im surprised there weren't any issue templates

green mesa
#

Yesterday same thing happened ๐Ÿ˜… with me

green oriole
#

You should see that as an exercise to make your write proper documents lemon_pleased

#

I have to say, doing that helped me quite a lot

rapid igloo
#

Oh well, discord doesnt help because now everytime i wanna type 'you' i type 'u' lol

lime mural
#

๐ŸŽƒ + ๐Ÿ‹

#

spooky lemoji for Halloween

obsidian patio
#

@lime mural feel free to propose it in #dev-branding and possibly open an issue on the branding repo

rapid igloo
#

what is the purpose of codeowners in pydis repos? are the requested people of a pr supposed to be the reviewers, or are they there just to show they are the code owners?

green mesa
#

.pr 485

dusky shoreBOT
green mesa
#

Woops

#

Wrong

green oriole
#

In pydis repos, we use them to make sure that at least 1 core devs approved the PR

green mesa
#

.pr 479

dusky shoreBOT
green mesa
#

1 approve from chibli and 1 approve from iceman is done

subtle kraken
green oriole
#

I wonder which algorithm are we using for auto-assignment

green mesa
#

For code review?

green oriole
#

Yeah

subtle kraken
#

Suggestions are based on git blame somehow afaik @green oriole

#

And github just uses those suggestions

green oriole
#

Huh interesting

subtle kraken
#

You can request a review from either a suggested or specific person. Suggested reviewers are based onย git blame data. If you request a review, other people with read access to the repository can still review your pull request.

green oriole
#

Thatโ€™s actually pretty smart

subtle kraken
#

I just found out github has docs
Thats where I got the text above from

green oriole
subtle kraken
#

Hmm

obsidian patio
#

Ah, cool

green mesa
#

Load balance is quite nice

rapid igloo
green mesa
#

How it will silently pin?

#

And how bot will know what to pin if it doesn't pin the first message?

rapid igloo
#

wdym? i'm talking about removing the pin notification (Python pinned a message in this channel), what it pins stays the same

eternal owl
green mesa
#

Ahh

green mesa
#

Just an idea when user will write the first message in channel we can ask what's your question and tell the user this will be pinned so others can check your question and after that user can put the question and then bot can pin

#

What u guys think

#

This way bot will pin the correct question

green oriole
#

Well, after using the channels at least one you see that it'll pin the first message

#

Having an "Hello" or something pinned is fine by me, you can still use it to jump to the beginning of the chat

green mesa
#

Ok

#

But don't u think we should try to make things more clear to our pydis community so, new people will also know what's happening

glass pecan
#

wat

#

it's pretty clear man

#

you're suggesting adding complexity for a thing that isn't really an issue at the moment

green mesa
#

๐Ÿ‘

tough imp
#

yea I see the pin as more of a jumplink to where the session started

#

it doesn't necessarily be the question itself

#

often the question is spread across multiple messages anyway due to pictures or codeblocks

green mesa
#

Ok

lunar elm
#

hi

#

i downloaded the source code for the python bot and dont know how to run it

tough imp
#

have you seen them?

lunar elm
#

i ve never seen them

#

im gonna see them now

tough imp
#

they should give you a good idea, but feel free to ask for help in this channel if something isnt clear

lunar elm
#

ok

#

thanks

#

im gonna now look in the guide

#

i still dont understand that much

tough imp
#

seasonalbot is a lot easier to setup

#

are you stuck on any particular step?

lunar elm
#

im stuck on the config

harsh veldt
#

i downloaded the source code for the python bot and dont know how to run it
@lunar elm git clone is better than downloading the source code, so it would be a git repo, so you can commit and contribute(if you want)

#

see the guide, I think it's really good one

green mesa
#

.pr 479

dusky shoreBOT
green mesa
#

If anyone is free can he/she have a look? at this

lunar elm
#

but what is seasonal bot?

obsidian patio
#

A Discord bot started as a community project for Hacktoberfest 2018, later evolved to bot that changes with the seasons

lunar elm
#

cool

obsidian patio
#

@lunar elm Adding to that, we recently moved to a SeasonalBot that isn't as seasonal. Almost all commands are available the year around nowadays. It's mostly a project where we can get started with contributing to open source and a really fun bot to have on the server. We have a lot of games and fun commands on it. Type .help in #sir-lancebot-playground if you want a full list of its features ๐Ÿ˜„

green oriole
#

We need to update dat description

lime mural
#

is there a way to get link to official docs using !docs command

glass pecan
#

for what

#

!docs contains like 14 different sources

lime mural
#

python

glass pecan
#

hmm probably not

#

!docs

stable mountainBOT
lime mural
#

like I did !docs math.factorial
if I could get link to official docs for that method

glass pecan
#

yeah only via the inventory links

#

oh that's what you mean

brazen charm
#

The link is in the title of the embed, if you're on mobile it doesn't show up but it's there

lime mural
#

oh

#

that worked ty

errant cobalt
#

Hey, guys. I am currently at my entry stage with my python and looking for a simple project to contribute, any ideas or projects?.

brazen charm
green mesa
#

.pr 479

dusky shoreBOT
green mesa
#

Anyone

rapid igloo
#

hey guys, need some feedback here, which option is better:

rapid igloo
#

cool stuff, updated it (:

#

thanks for voting

lime mural
#

is that the embed

rapid igloo
#

its one of the fields of the embed im working on

#

if you want the whole embed ill send a pic

lime mural
#

I like the last one better

rapid igloo
#

but the last one is a bit messy with the (1) numbers imo

#

and most ppl chose the 2nd so i used the 2nd

lime mural
#

yeah ig then use that one ๐Ÿ‘Œ

rapid igloo
#

borrowing joes lol

lime mural
#

ah yea the emotes make it better

#

check on mobile tho

rapid igloo
#

oh yeah thanks for reminding me

#

ios seems fine, but dont have a android device to test on ๐Ÿ˜

lime mural
#

hmm I can test it

#

if u want

rapid igloo
#

sure that'll be great its the :tada: and :clock1: im using

lime mural
#

Nah, I mean the layout might break on mobile, I'm sure emojis will be fine

rapid igloo
#

oh ok, because on web theres ๐Ÿช™ but on ios there isnt so i just wanna make sure

#

also yeah embeds are a bit messed up sometimes on mobile

lime mural
#

you can use the unicode instead of codes ig

#

๐ŸŽ‰

#

๐Ÿ•’

rapid igloo
#

oh thanks

#

but if a device doesnt have a particular emoji i dont think unicode will make it work

#

though

lime mural
#

I mean you can check that here

rapid igloo
#

but anyways im pretty sure they all have tada and clock

#

yeah i tried the coin unicode and on my ipad it shows as question mark

lime mural
rapid igloo
#

thx it seems android and ios should all support it

harsh veldt
#

what are those emojis

        defcon_disabled: ":defcondisabled:"
        defcon_enabled:  ":defconenabled:"
        defcon_updated:  ":defconsettingsupdated:"
#

hmm why doesn't discord keep ids

obsidian patio
#

Theyโ€™re for defcon. Itโ€™s basically the current anti-raid system we have

#

Theyโ€™re the emojis to symbolise the different states

harsh veldt
#

but there's no emoji named defcondisabled

#

:defcondisabled:

#

I'm asking this for server conf, if I don't have emoji how am I going to add it to server

obsidian patio
#

Use some placeholder emojis. The functionality is what is generally tested

sullen phoenix
#

we have separate emoji servers

harsh veldt
#

is its emoji files stored in repo like branding?

brazen charm
#

There's only a few emojis that you'll need to set for it to function

obsidian patio
#

To answer your question, I donโ€™t think the icons are actually stored there

harsh veldt
#

i've set them up

#

btw, the template that lemon sent is a bit outdated

#

where's verification channel?

crude gyro
#

not sure I sent a template..

harsh veldt
#

we will keep our own test server updated, and generate new templates from that whenever we need to.
@crude gyro

#

uh sorry for ping

#

didn't mean that

crude gyro
#

looks like I said that on April 1st?

#

so... uhh.. April Fool's!! lemon_sweat

obsidian patio
short snow
obsidian patio
#

Yeah. Itโ€™s called a rickroll

cold moon
#

I have heard that deployment backend will get rework, but is there any plans for deployment changes?

harsh veldt
#

Hi, I have some problems with docker. I have installed it and it runs containers perfectly on wsl 2 linux containers. however, in your https://pythondiscord.com/pages/contributing/hosts-file/ guide you have mentioned that you need to run command docker-machine ip default, adn I have issues about it. first what is docker-machine second, it gives error docker-machine is not recognazible so I probably need to add something to Path but im not sure. I tried to search in docs of docker but there is no info about not recognized command docker-machine in https://docs.docker.com/machine/concepts/.

#

ah wait I haven't checked possible errors page, lemme check that real quick

tawdry vapor
#

I am not familiar with using Docker outside of linux, but their docs do state

#

The installers for Docker Desktop for Mac and Docker Desktop for Windows include Docker Machine, along with Docker Compose.

#

So, presumably you should have it somewhere, and it isn't on your PATH as you suspected

harsh veldt
#

yeah but which folder I have to add to PATH

tawdry vapor
#

You need to run that on your host, not inside the container, to be clear

harsh veldt
#

oh

#

I see

#

okay, um lemme try that

brazen charm
#

The IP you need is already in the hosts file for docker, you just need to copy it over to the pydis domains

harsh veldt
#

what do I need to write in redirect_uri in the reddit app?

#

The IP you need is already in the hosts file for docker, you just need to copy it over to the pydis domains
okay, I am not configuring it yet, I'll see what i'll do when I configure that

brazen charm
#

@tawdry vapor Where did you find that? both the install pages on https://docs.docker.com/docker-for-... for mac and windows state

The Docker Desktop installation includes Docker Engine, Docker CLI client, Docker Compose, Notary, Kubernetes, and Credential Helper.

tawdry vapor
harsh veldt
#

what do I need to write in redirect_uri in the reddit app?
or do I really need to configure reddit app?

brazen charm
#

You don't need to set the redirect_uri to anything meaningful. You only need it for the reddit commands and posts like in #reddit

harsh veldt
#

okay thanks

brazen charm
#

Not sure if that's just incorrect or they meant is as docker machine that's part of the docker desktop app because it doesn't seem to come with it as far as I can see

harsh veldt
#

do I need to activate the virtualenv for docker-compose up -d?

tawdry vapor
#

No

#

The container uses its own virtual environment within the contaner

harsh veldt
#

yeah, docker-compose is not even in Pipfile

harsh veldt
#

is it just pipenv run?

#

just a note that, you may include this to "Running with Docker section":

If your computer has only 4GB RAM and 5 years old, do not try to run 5 containers at the same time, the computer might crash
green oriole
#

@harsh veldt would you mind commenting on meta#60 about that, please ? lemon_pleased

#

.issue 60 meta

dusky shoreBOT
harsh veldt
#

uh, I'm having some issues with postgres. When I open psql shell, it asks password for user postgres, which I set when I installed it. But if I do psql from normal command prompt it asks for the user MyName. Which there's no such user, ran \du from psql shell, and the result is

                                   List of roles
 Role name |                  Attributes                         | Member of
-----------+------------------------------------------------------------+---
 postgres  | Superuser, Create role, Create DB, Replication, Bypass RLS | {}
#

so there's only user postgres but it asks for user MyName

#

I tried to change password for user, using

ALTER USER Murad PASSWORD 'newpassword';

but how can I change password of user if there's no user ๐Ÿ˜„

cold island
#

I want to add a helper function which will serve several cogs. Where should I write it?

green oriole
#

In the utils most probably

cold island
#

That's where I'm looking atm, but can't find an appropriate file

green oriole
#

What's your function for?

cold island
#

I want to add a function which will define what mod channels are. Because currently the checks for that are scattered and repeated, and it leads to bugs.
So I want to be able to import a function which will tell me if the provided channel is considered a mod channel

green oriole
cold island
#

Hmm that's weird, I don't see that file in my clone

#

I'll check what's going on on my end, thanks ๐Ÿ˜„

lime mural
#

make sure you're on same branch

cold island
#

It's my own branch, but I created it a few days ago

#

Oh, I just have a bad case of blind

lime mural
#

haha

harsh veldt
#

unhandled exception in bot:

for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno 11001] getaddrinfo failed

What does this means?

brazen charm
#

What's the full traceback?

harsh veldt
#

just file names

brazen charm
#

How are you running the bot, outside of docker?

harsh veldt
#

yes

#

both bot and site

#

site is running

green oriole
#

You need fakeredis then

#

It is one of the first parameters in the config file

brazen charm
#

Or point it at the right ip/host if it's running somewhere

green oriole
#

use_fakeredis or something similar, you need to set it to true

harsh veldt
#

okay

#

what about REDIS_PASSWORD?

brazen charm
#

Doesn't matter for local dev

harsh veldt
#

k

#

probably better to include it to contributing guide that you need to set use_fakeredis to true when you're running both locally

brazen charm
#

It doesn't have to be true if you're running redis through either wsl, docker or something else which would allow it. But I don't think the guides mention redis at all which would be helpful

green oriole
#

Can you mention it in meta#60? ๐Ÿ™ƒ

#

.issue 60 meta

dusky shoreBOT
lime mural
#

I will try contributing once the guide is improved xD

harsh veldt
#

@lime mural the guide is good enough. if you're contributing only bot just run the site and stuff with docker, I cannot run because my computer is not strong enough to run 5 containers at the same time, it's lagging. but i do not think there will be some issues with running docker

lime mural
#

mine isn't either

#

don't think I can run 5 containers

brazen charm
#

Why 5 containers? I count 5 for completely everything, half of which is not needed

harsh veldt
#

Why 5 containers? I count 5 for completely everything, half of which is not needed
@brazen charm why not?

brazen charm
#

redis is optional, and you'll only need snekbox when working on it

#

personally I run the bot normally, and the site, postgres and redis in docker

#

So that'd be 2 running containers, although I'm not sure how much each individual container contributes to how much docker takes up

lime mural
#

oh 2 containers might be fine then

#

that makes more sense, thanks

cold island
#

I seem to be failing one of the tests. Is there an easy way to see what the input to that test is?

green oriole
#

Note that on windows a container will take more processing power than a native app because of the hypervisor, but not on Linux since it ks running as a native process, they are just a few restrictions on it

#

@cold island you can take a look at the source, or if it is a subtest there should be the test data in the output

cold island
#

The output message is pretty generic, and from what I see I'm already handling what it concerns, which is why I wanted to know the exact input

green oriole
#

Well, source code then

cold island
#

That would be great if I was good with unittests lol. I'll see if I can figure it out

green oriole
#

Haha, well, it should be pretty straightforward as for the I-call-the-production-code part

#

If you need anything, feel free to give me a little ping though lemon_pleased

glass pecan
#

no little pings left, only big pings

cold island
#

are those role pings?

glass pecan
#

no, they're big pings.

#

@โ€‹AKARYS

green oriole
#

Wut

#

How

cold island
#

lol

glass pecan
#

not as cool once i delete it

#

but still

cold island
#

@green oriole I think I'll take you up on that offer

green oriole
#

Alright

#

Which test is failing?

cold island
#

In tests\bot\exts\info\test_information.py

#

test_create_user_embed_expanded_information_in_moderation_channels

#

Fails on infraction_counts.assert_called_once_with(user)

#

AssertionError: Expected 'expanded_user_infraction_counts' to be called once. Called 0 times.

green oriole
#

It seems like cog.user_nomination_counts is never called when making an embed in a mod channel

lime mural
#

Note that on windows ร  container will take more processing power than a native app because of the hupervisor, but not on Linux since it ks running as a native process, they are just a few restrictions on it
@green oriole even on WSL?

green oriole
#

Is that intended?

#

@lime mural nope, WSL goes through the hypervisor

lime mural
#

ah rip then

#

what about Docker on Windows itself?

cold island
#

user_nomination_counts? don't you mean infraction counts?

brazen charm
#

wsl 1 doesn't use hyperv, but is slower in most aspects than 2

cold island
#

No it's not intended, and it shows the expanded counts when I invoke it in the test server

green oriole
#

Can you add a dirty print to make sure that the command is properly detecting the mod channel?

cold island
green oriole
#

Oh no, the decorator ordering got me, it seems like

cold island
#

And the assertion error says expanded_user_infraction_counts. Or am I missing something?

green oriole
#

Yes, you're right

#

So is this function supposed to be called?

cold island
#

Yes, it is

#

And since it shows me the expanded count in the test server it seems to work fine

#

I'll add a print there

green oriole
#

Oh, I think I know why

#

The test is patching constants.MODERATION_CHANNELS to be [50], but I think we aren't using this constant anymore, are we?

cold island
#

Hmmm there is a line which uses it ctx = helpers.MockContext(channel=helpers.MockTextChannel(id=50))

#

or do you mean something else

green oriole
#

It is a decorator on the class containing the test

harsh veldt
#

why does API gives me 401 (unauthorized) status code?

green oriole
#

Did you changed the API key on the bot?

cold island
#

Ok, and what do you mean by not using it anymore?

harsh veldt
#

Did you changed the API key on the bot?
@green oriole no I didn't set

#

it's badbot blah i think

green mesa
#

Yeh

#

I also have

green oriole
#

Ok, and what do you mean by not using it anymore?
@cold island can you check if the code is still using this constant to check if you are in a mod channel?

cold island
#

I am still using that constant, but I changed it so that it would include other criteria as well

green oriole
#

Hmm

cold island
#

But it's not using less channels, so whatever is in there should still work

brazen charm
#

Did you configure the site values?

harsh veldt
#

@green oriole if i don't set that in .env does that means it's not setted or it's default badbot?

#

Did you configure the site values?
@brazen charm

site:        &DOMAIN       "pythondiscord.local:8000"
    site_api:    &API    !JOIN ["api.", *DOMAIN]
    site_paste:  &PASTE  !JOIN ["paste.", *DOMAIN]
    site_staff:  &STAFF  !JOIN ["staff.", *DOMAIN]
    site_schema: &SCHEMA       "http://"
green oriole
#

I am not sure, I think you have to set it

harsh veldt
#

okay lemme set it and reload

green oriole
#

@cold island I'd suggest you to step through a debugger then, I don't know what could be failing

brazen charm
#

Yes, it needs to be set

green oriole
#

Maybe your new conditions isn't correctly detecting the mod channel?

brazen charm
#

How does your code look?

cold island
#

That's the only plausible explanation, even though it clearly does ๐Ÿคทโ€โ™‚๏ธ

green mesa
#

First time setup of pybot is pain but after that it goes smooth

harsh veldt
#

I just saw the comment of mbaruh in the issue. So there's pr from kosayada about improving !superstarify command(#1204). Should I wait for merging of pr then work on the issue #1224?

#

.pr 1204 bot

dusky shoreBOT
green oriole
#

It seems like you want to wait first, yeah

cold island
#

@green oriole siiiiiiiiiigh I found it

#

smh

#

The test didn't work well because I imported the mod channels constant using a relative import

#

Which I did because another constant was already being imported that way

green oriole
#

Ah damn

cold island
#

Which might mean that the other constant isn't being tested

#

Does it mean that I have to change it now because the PR tests will fail?

green oriole
#

Either that or fixing the test but I have no idea how

green oriole
#

@cold island oh no, the line continuation lemon_pensive

#

Why not putting parenthesis around the two conditions?

cold island
#

uuuuh, I could change that

#

Maybe we should add that to the linter ๐Ÿ˜›

green oriole
#

Hmm, they are valid cases for line continuations, I think

brazen charm
#

None that I'm aware of when we go to 3.9

cold island
#

I wouldn't need to break the line if I could just import the constant itself >:|

#

fixed

#

and now linting failed ๐Ÿคฆ

obsidian patio
cold island
#

I always lint before I push ๐Ÿ˜ 

#

It just was supposed to be simple ๐Ÿ˜”

obsidian patio
#

Hahah yeah

cold island
#

Can I run the precommit without committing?

sullen phoenix
#

just pipenv run lint

cold island
#

lmao it was a trailing whitespace

obsidian patio
#

Hahah that happens

fickle trail
#

my duo is on so im chill

cold island
#

so... because there is a difference in line endings between windows and linux, it now wants to stage changes on every single file on the repo

#

Can I just revert the last commit I made? lol

green oriole
#

You can append to it and force push, yeah

brazen charm
#

Should be able to just ignore that, but at this point I'd revert and replace the commit that added the \ and replace it with properly formatted parentheses

cold island
#

Nope, I reverted but linting still modifies all the files

sullen phoenix
#

you have to stage the changes

brazen charm
#

Don't lint then I guess, or configure the line endings for git

sullen phoenix
#

unless i'm missing something

#

oh, right

green oriole
#

I think this is happening because one of the hook creates a windows ending, and so the mixed line ending hook wants to change everything to windows endings, or something like that

cold island
#

I force pushed but I don't think I did it right lol

#

Either way, it seems like pipenv run lint has different behavior than the precommit

#

Because the precommit actually handled it right

green oriole
#

It looks okay

cold island
#

Ok yeah the commit history looks right

green oriole
#

And the CI succeeded \o/

cold island
#

woo

#

Thank you for holding my hand throughout the process

green oriole
#

Anytime lemon_pleased

tawdry vapor
#

I think it's pretty simple

#

I'd like to kind of fast-track it so I can get to work on something else that was beginning to involve a lot of passing around of the bot instance.

tough imp
#

loooking

brazen charm
#

Would patching it into builtins be too magical?

#

Right, it would be, didn't consider every checker that'd complain about it being undefined

tough imp
#

I dont know how likely it is, but if an import chain is triggered before the bot is instantiated, it could also cause some other module to assign or try to use the placeholder None

#

that'd be a nasty thing to debug

brazen charm
#

maybe a singleton class would give it a clearer value

thorny obsidian
#

Did I do something weird in #help-falafel ? Got an odd output from using !e

brazen charm
#

can't handle text yet, so you go a syntax error with ``` which the bot refused to output

thorny obsidian
#

But I feel like I've used:
```py before and it's been fine

obsidian patio
#

In other words, you canโ€™t add any commends around the code block

#
print(5)

Some extra text

#

This wonโ€™t be allowed

brazen charm
#

It's using the whole message as code

thorny obsidian
#

Huh. I figured it would only use what's in the code block.

obsidian patio
#

Thereโ€™s a PR about allowing that, though

#

And even having multiple code blocks like this:

# Some code

Some text ```py

Extra code ```

Final comments

cold island
#

You're welcome to review it so it can be merged lemon_pleased

thorny obsidian
#

I don't think my coding ability and standards are good enough to provide a review, otherwise I would

rapid igloo
#

@cold island which pr is it, just wanna have a look

cold island
rapid igloo
#

thanks

#

doesn't it already have 2 approvals?

cold island
#

It takes 2 staff approvals

rapid igloo
#

ohh ok

cold island
#

But others are encouraged to review PRs and give their opinions

brazen charm
#

only one core dev approval is needed afaik

cold island
#

It takes two staff approvals, at least one of which needs to be a core dev

patent pivot
#

yep, it's 1 core dev approval + 1 approval from anyone else (contrib/staff)

#

It does depend on the PR really

cold island
#

Yeah but are we talking about an automatic merge? Because a core dev can just merge if they want

brazen charm
#

Nothing's merged automatically, just don't have to do a force merge if it's two from the org

patent pivot
#

ah right, yeah, for GitHub UI to glow green it needs 2 core devs, but yeah, as Numerlor says, can merge at any point

cold island
#

Right, that's what I mean

obsidian patio
#

@cold island Iโ€™ll have a look at it if I find the time

#

!remind 3d Ready to review Zigโ€™s PR?

stable mountainBOT
#
You got it!

Your reminder will arrive in 3 days!

obsidian patio
#

And in the future, Iโ€™d recommend working on a feature branch, so you always have a clean master branch

cold island
#

ik, that's why I do usually, just kind of forgot with this one

rapid igloo
#

@obsidian patio @green oriole I think my PR 475 is almost ready for review now, it would be good if you could have a look (when you're free) and help me test it? One big problem i have now is the amount of api fetching needed which slows down the response time, but i have tried to optimise it where i can. tysm

green oriole
#

Alright, I'll try to

#

If we have some serious rate limit issues, we can always use a blank token to increase the limit

rapid igloo
#

For me when i was running it locally i had to generate a token from github, but i dont know if a token is used in production

green oriole
#

Actually, it seems like we have a GITHUB_TOKEN env var

rapid igloo
#

Yup i used that and it worked for me

green oriole
#

It should be set in prod ๐Ÿ‘

cold moon
#

@patent pivot All changes in Voice Gate PR made.

patent pivot
#

awesome stuff, will take a look later today

cold moon
#

I think Python Discord repositories should have .editorconfig, because then most biggest editors will automatically get like end of line and indent type + amount.

glass pecan
#

i don't hate the idea

patent pivot
#

reviews left @cold moon

#

primarily formatting + copy

cold moon
#

I think I have to find way to get Grammarly to PyCharm lemon_sweat

obsidian patio
#

Fwiw PyCharm already checks for spelling errors

patent pivot
#

yeah, but it's fairly simple

#

spelling and grammar checkers are more complex

obsidian patio
#

Yeah

#

Itโ€™s more of a โ€œis this in the dictionaryโ€ type of thing

rapid igloo
green oriole
#

There's also the JB plug-in, Grazie

brazen charm
#

The config is fairly standard so I'm not sure if .editorconfig is worth it, but settings EOL though gitattributes would be nice if possible as there have been some problems with them and lint on win

rapid igloo
#

Doesn't pre commit fix/check the line endings?

green oriole
#

Yeah, but the fix part seems pretty broken, as it tries to change the line ending for every files in the repo haha

cold island
#

The precommit fix part seems ok, but pipenv run lint gave me hell yesterday lol

brazen charm
#

I had issues with the EOL fixer with pre commit on almost every commit (then a second commit after the files were changed passed), making things like merges a PITA; Mark suggested setting autocrlf to input and eol to lf in the config which seems to have fixed it, but I'm not sure what the gitattributes equivalent it or how it affects the files on other OSs

cold moon
#

@patent pivot Voice Gate changes made. I made that now this only remove underscore for infraction only for visual side to not break anything.

patent pivot
#

yep โ€” that's what I was hoping for, sweet. will give it another test shortly

patent pivot
#

I think this review is final @cold moon

cold moon
#

@patent pivot All suggestions applied

cold moon
#

One approval left for Voice Gate... Nice...

cold moon
#

@patent pivot Currently everybody can see voice channels, even without voice verified role.

patent pivot
#

intentional.

#

it's rolled out

#

we're just gating the speak permission, not the connecting.

cold moon
#

Oh, so you can listen but not talk without role?

patent pivot
#

yep

short snow
#

some problem

#

here it shld be .roll and not !roll

obsidian patio
#

Youโ€™re right. Iโ€™ll fix that now

brazen charm
#

Probably worth going over the code and making sure everything uses the prefix var

obsidian patio
#

You mean something like {CONSTANTS.bot_prefix} instead?

brazen charm
#

either from there or from the bot instance

obsidian patio
#

Alright

obsidian patio
#

@short snow should be fixed now

short snow
#

ok perfect :)!

thorny obsidian
#

So I have my DMs off for this server and I just tried voiceverify. It told me to check my DMs and I didn't get any sort of fallback response as per PR #1246

glass pecan
#

orly?

thorny obsidian
#

mhm, I only got the "check your DMs messsage"

glass pecan
#

i did test it myself and got the reply i expected

#

so lemme check logs

#

it still says "check your DMs" regardless though lol

thorny obsidian
#

I didn't see that second embed

glass pecan
#

@thorny obsidian can you try again?

#

yep definitely shown

thorny obsidian
#

I got removed from the channel before I saw it

glass pecan
#

ahh that'll be why then

#

thanks, that's not something i could test... kinda can't hide channels from me

thorny obsidian
#

Ha, yeah. That makes sense

obsidian patio
#

thanks, that's not something i could test... kinda can't hide channels from me
@glass pecan you could view it as a person with the developers role

#

The new โ€œview as roleโ€ feature

glass pecan
#

yeah, probs

#

@thorny obsidian when you lost perms, did you still see the channels last few messages?

thorny obsidian
#

Nope, it kicked me back out to welcome

glass pecan
#

hrm

#

whoops, time to force push

#

never tried to do a multiline git commit message via cli before, so that was fun and surprisingly simple

obsidian patio
#

Really?

#

Most people do git commit and then use the editor, but there's also git commit -m "XXX" -m "YYY" -m "ZZZ"

#

All of the new message things will be new lines

cold moon
#

And I use Sublime Merge/JetBrains IDE lol

glass pecan
#

git commit and then use the editor
yes this is what i did

#

i had to check though

#

as i've only ever used -m before, or a gui lol

#

vscode/pycharm commits

patent pivot
obsidian patio
#

Done

patent pivot
#

gnarly

#

merged

rapid igloo
#

just saying, this part seems repeated

try:
                 await ctx.author.send(embed=embed)
                 await ctx.send(f"{ctx.author}, please check your DMs.")
             except discord.Forbidden:
                 await ctx.channel.send(ctx.author.mention, embed=embed)
patent pivot
#

intentional

rapid igloo
#

ok

patent pivot
#

oh, do you mean because it is repeated for failure and success?

obsidian patio
#

Letโ€™s hope we didnโ€™t the break the bot and now have to suffer

rapid igloo
#

yeah @patent pivot

patent pivot
#

riiiight, yeah, I misread, whoops

rapid igloo
#

haha

patent pivot
#

yeah, there would be less duplicated ways to go about that โ€” but it's not hugely critical

brazen charm
patent pivot
#

hmmmm

#

what would the proposed implementation be there

#

saving the files and reuploading?

brazen charm
#

The bot would send them the text contents of the message (if any are present)

patent pivot
#

right, but for the "or an attachment" part

brazen charm
#

You can upload an attachment with a message, if the attachment doesn't pass through the filter the whole thing gets deleted

patent pivot
#

ahh right, so you're not suggesting reupload the attachment, right

obsidian patio
#

@brazen charm I added my view on it now

brazen charm
#

We could keep the message around for a minute or two in case of disabled dms

patent pivot
#

hm

#

Eventually Discord will have ephemeral messages

brazen charm
#

Is that eventually close?

patent pivot
#

They are suggesting end of the year

#

hmm, I think keeping things around defeats the point of the filter

#

we recently had the filter catch actual malware

brazen charm
#

Oh, in memory, not in the channel

patent pivot
#

ahhhh

brazen charm
#

so delete, keep in a cache and then some user command could be used to retrieve it for a short period

patent pivot
#

riiiiight

cold island
crude gyro
#

@cold island approved. merge if you want.

rapid igloo
cold island
#

approved. merge if you want.
@crude gyro thank you, but I don't think I have perms to merge pithink

obsidian patio
#

@cold island I added another comment. Itโ€™s probably not worth removing

rapid igloo
#

not sure if mark has anything to say, because i think he's the first to mention its presence

tawdry vapor
#

I'm indifferent

timid sentinel
#

I would be happy if it was removed, but then again I don't use the pinned message feature

#

And I know it is there if I wanted to use it

crude gyro
#

I don't see any need to remove it.

rapid igloo
#

gosh its october 20th already; not much time left. im worried that this pr wont be merged before hacktoberfest ends, because then its gonna be a waste of time ig, rules could be different next year ๐Ÿฅบ reviews anyone? https://github.com/python-discord/seasonalbot/pull/475 atm it really hurts seeing people receiving not entirely accurate hackstats. i know it could extend until first half of november or so, but still

obsidian patio
#

Should the functionality be correct now, so itโ€™s actually filtering according to the rules?

wispy quail
#

Not sure how of a good suggestion this is, but: add a limit for !remind so people don't fill the db with unnecessary stuff (e.g. 50+ years) to avoid this

#bot-commands message

obsidian patio
#

It doesnโ€™t really add that much extra data. I think itโ€™s fine from that aspect. It also doesnโ€™t really get used that much (with strange times)

green oriole
#

Yes, you have a limit

obsidian patio
#

!remind @green oriole 9999999999y Well, itโ€™s only the datetime failing and not an actually reasonable limit

stable mountainBOT
#

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

ConversionError: (<class 'bot.converters.Duration'>, OverflowError('signed integer is greater than maximum'))

obsidian patio
#

Isnโ€™t that something like 4080 years as the limit?

subtle kraken
#

Datetime has 9999y limit

#

9999y 12m 31d
So long its not passing into 10000

#

Max would be 9999-12-31 - current date

#

7980y few months few says

obsidian patio
#

But didnโ€™t you mute me for 7980 years because that was the limit?

subtle kraken
#

It was close to it

#

It wasnt the limit

obsidian patio
#

Ah, okay

subtle kraken
#

Gimme a sec

#

7980 would be the limit had it been 2019-12-31 @obsidian patio

#

!remind 251799076610s test

stable mountainBOT
#
You got it!

Your reminder will arrive in 7979 years, 2 months, 11 days, 3 hours, 56 minutes and 50 seconds!

obsidian patio
#

Aah okay

rapid igloo
#

Should the functionality be correct now, so itโ€™s actually filtering according to the rules?
@obsidian patio yeah i believe the logic is according to the hacktoberfest rules now. but the only thing is that their source code also check for "spammy" repo/prs which i'm not quite sure about, but i don't think it's too much of a problem compared to the hacktoberfest topic, pr acceptance, etc

stable mountainBOT
#

@obsidian patio

It has arrived!

Here's your reminder: Ready to review Zigโ€™s PR?.
[Jump back to when you created the reminder](#dev-contrib message)

green mesa
#

Plz anyone check my pr bug emoji now it's seven day no one checked it

#

!pr 479

#

.pr 479

dusky shoreBOT
short snow
cold moon
#

.issue 475

cold moon
#

There is one point about what I'm unsure:

When a PR is labelled invalid/spam but it is merged/approved, it will still be counted

rapid igloo
#

@cold moon thats the hacktoberfest rules i guess, i asked in the hacktoberfest server and they said that if a pr was labelled invalid/spam but merged/approved, it will also be counted (which is what i said)

#

in the pr matt also said that invalid/spam labelled prs shouldn't be ignored so that proves my point

short snow
#

that links takes us to a blackhole (atleast for me)

rapid igloo
rapid igloo
#

lemon_hyperpleased it's merged

#

nvm now

green mesa
#

Mine is still waiting ๐Ÿ˜”

surreal venture
#

!pr 123

#

.pr 1234

dusky shoreBOT
#

[404] #1234 Issue/pull request not located! Please enter a valid number!

surreal venture
#

.pr 123

dusky shoreBOT
surreal venture
#

.pr1

#

.pr 1

rapid igloo
surreal venture
#

oh sorry my bad

green mesa
#

Can someone look at my pr also๐Ÿ˜”

#

.pr 479

dusky shoreBOT
green mesa
#

It has 2 approval one from iceman and one from chibli

#

And 7 days already passed

obsidian patio
#

Iceman isnโ€™t staff, so weโ€™ll need another staff approval before the count is 2

green mesa
#

Chibli?

#

Is mod

#

And core dev

obsidian patio
#

Yes. We need 2

green mesa
#

I thought we need only 1

obsidian patio
#

Either way, it doesnโ€™t look like youโ€™ve addressed the feedback given

green mesa
#

Yes I addressed all buddy

#

Which one I left can u point it plz

tough imp
#

the PR still has changes requested from 2 people

obsidian patio
#

You need two explicit approvals from two staff members, where one of them is a core developer

green mesa
#

Actually chibli approved it and after that he requested for feedback

#

That's y his approval got removed

#

But I addressed what he asked for

green mesa
#

Finally UwU

#

Ty Chibli

short snow
cold moon
#

@eternal owl Why you closed user events management site PR?

eternal owl
#

I made a few changes to the API which were already commited, I will open new PR with cleaner commits

#

nvm, mb, not sure what I was thinking, lol, re-opened it

cold moon
#

Rebase is always option

obsidian patio
#

That would remove PR comments from what Iโ€™m aware, but that doesnโ€™t mean it shouldnโ€™t be done

cold moon
#

This PR don't have any reviews/comments

eternal owl
#

its a draft PR

#

I'm writing some final tests now and will push changes

obsidian patio
#

Okay. Then I donโ€™t have anything against rebasing

green oriole
#

If it is a draft PR, it is pretty fine, but don't forget that you can always force push the branch if no one commented on it yet, and start over without making a new PR

eternal owl
#

I have made changes to the model and I wanted to include it in a commit which I made in the beginning, hence I thought of making a new PR with new commits

#

if model changes, then tests, serializer, viewset also change, so more commits

cold moon
#

Yeah, after any comments is added, it's not good here to rebase it, but I have contributed to some repos where force-push is required, as commit history have really specific guidelines.

short snow
#

@rapid igloo congrats for contributor role!

eternal owl
#

gratz!

cold moon
brazen charm
#

Don't you already have them?

eternal owl
#

we do

green mesa
#

Still waiting for my pr to get merged ๐Ÿ˜”

obsidian patio
#

Have you addressed the requested changes?

cold moon
#

Oh, they added it! lemon_s_autumn

green mesa
#

@obsidian patio I still aren't able to locate

#

I have got these

eternal owl
#

!pr 479

#

.pr 479

dusky shoreBOT
obsidian patio
#

Looks like you have one staff approval. Youโ€™ll need a second one as well

green mesa
#

Whatttt one is required only right๐Ÿ˜”

eternal owl
#

it would be better if the if statements were consistent

#

both of them accomplish the same but with diff conditions set

#

line 34 and 44

green mesa
#

First one is for when dict have only 1 item

#

And second one is for if dict has more than 1 item

#

That's y I have two conditions

eternal owl
#

make the if statement condition same in the 2 chunks

#

just for consistancy

#

2 chunks

#

line 34 and 43

green mesa
#

@eternal owl one is checking if condition is =1 and one is checking more than 1

#

If I use same condition code will mess up

eternal owl
#

I meant, mimic the if statement conditions in line 34 and 43

green mesa
#

Is it making much difference๐Ÿ˜…

eternal owl
#

nop

green mesa
#

2nd chunk is checking same thing as first just in oppo manner

rapid igloo
#

is it a youtube problem or...

sullen phoenix
#

it really depends on your browser

#

joe and i see them differently as well

#

i don't think there's much we can do

patent pivot
#

hgrnh that padding is not good

sullen phoenix
#

yeah lol

rapid igloo
#

same result on chrome, just saying

patent pivot
#

wow leaked

sullen phoenix
#

SORRY JOE SORRY JOE

rapid igloo
#

wait what apr 8

cold island
#

why not?

sullen phoenix
#

didnโ€™t change the date on that pic yet

cold island
#

o

trim cradle
#

I'm doing a code exploration to wrap my head around what adding a timer to !watch would entail, but the idea is that you'd do !watch <user_id> <duration> <reason> and the user will automatically be removed from the watchlist after that duration

#

is there anywhere in particular I should be looking, other than bigbrother.py?

brazen charm
#

Not familiar with the code for it, but that would probably be most fitting for the scheduler from scheduling utils and some persistence from redis; I believe silence is merged now so you could take a look there

trim cradle
#

@brazen charm thanks!

green mesa
#

.pr 479

dusky shoreBOT
green mesa
#

Anyone plz

rapid igloo
#

why is there a reddit command on both python and seasonal bot?
they seem to almost do the same thing

eternal owl
#

they are slightly different

#

the seasonalbot one needs a few fixes

obsidian patio
#

Is there any reason we donโ€™t simply merge them?

#

I know Akarys has brought up this topic before as well

cold moon
#

I think this should stay as Python feature as Python post them to #reddit

obsidian patio
#

Maybe, though I donโ€™t think it quite fits @stable mountain. Does anyone else have a thought on this?

crude gyro
#

It's not a core feature. I think it belongs in SeasonalBot. I hate that it exists in both and we should absolutely merge it all into one place.

cold moon
#

I think maybe should milestone page loaded dynamically from YAML? Then adding new entries will need only change YAML file, not editing whole HTML?

#

And currently there is this nice bouncing effect only when you are moving down first time. I think this should be changed that this like leave with this bouncing effect when this is going out from screen and then next time going back again with same effect.

crude gyro
#

I don't think I need either of those things.

cold moon
#

These should be nice improvements, I think. Not something really-really important.

sour sierra
obsidian patio
#

Iโ€™ll probably have time to review it again tomorrow

green mesa
subtle kraken
#

Sure though I might only just have time around tomorrow morning (in 12h or so)
Though will try to check it within 3h @green mesa

green mesa
#

Ty

sharp timber
#

The token remover filter doesn't function on @stable mountain 's dms. While this makes sense from one perspective ( Bot dms aren't the server, so most moderation filters don't make much sense there ) I think for tokens it's a different matter?

cold moon
#

Is DMs relayed to somewhere?

sharp timber
#

DM's to the bot are, yes

cold moon
#

hmm, then tokens + webhooks should be catched.

sharp timber
#

In DM's you can't delete a message someone else sent, so this may be more difficult than it looks

short snow
rapid igloo
#

There's a pr fixing the candy command

#

.pr 496

rapid igloo
#

I think it revamps the whole logic so it should fix those bugs

obsidian patio
#

It changes a lot of the logic. Iโ€™ll probably review it a second time later today

rapid igloo
#

(if i counted correctly)

rapid igloo
brazen charm
tawdry vapor
#

Because lemon misunderstood its purpose

#

The integration is only useful when running an aiohttp server

patent pivot
#

yeah, it doesn't harm having it but it is redundant

green mesa
#

@subtle kraken ๐Ÿ˜… my pr

vocal wolf
#

@green mesa can you post it here?

green mesa
#

Sure

#

.pr 479

dusky shoreBOT
subtle kraken
#

will check the PR in <2h for sure

#

gotta run an errand and will get to the pr

green mesa
#

๐Ÿ™‚

rapid igloo
glass pecan
#

did you say low-effort pr? are you asking to be invalidated

#

jks

#

i'll have a look

rapid igloo
#

uh i don't get it, but thx

glass pecan
#

eh, it's hacktoberfest

rapid igloo
#

nah i'm not worried for a tshirt

#

i already ordered it

glass pecan
#

the joke is lots of low effort prs going around, so i was just poking fun

#

it's fiiine

#

Looks alright, just some missing capitalisation in your description, no capitalisation in your commit message and the commit message could be more descriptive. Not worth correcting on seasonalbot, but worth making note of for future PRs.

rapid igloo
#

shit

glass pecan
#

?

rapid igloo
#

everything is shirt.

#

shit

glass pecan
#

The code appears fine and the feedback is only minor feedback for future improvements. If it was shit, it wouldn't have been approved lol

obsidian patio
#

Iโ€™ll have a look at it as well. Is it fine if I potentially approve the code of it without testing the feature? @glass pecan

glass pecan
#

@obsidian patio sorry, disappeared for a sec there. yeah that's fine, I've run the code

green oriole
#

Oh oh

#

Sorry vest

glass pecan
#

lol

obsidian patio
#

Ehhh

#

Seems like I left a review on a merged PR

glass pecan
#

yeah

#

but your comment is valid. it matched on mine, but I also haven't had a non-accepted pr yet

#

soooooo

obsidian patio
#

So we merged a non-working PR?

glass pecan
#

we gotta confirm the issue first

obsidian patio
#

Right

glass pecan
#

if so, then we just gotta make a fix, no biggy

#

it wasn't accurate before the merge either lol

obsidian patio
#

Yeah, I guess

green oriole
#

Oh no

#

Haha

glass pecan
#

there is so much code in this module

#

there we go, so it wasn't a problem

#

thanks IPv4

late wolf
#

don't know if the right channel, if it aint the tell me so but The silence or the shh commands uses overwrites right?

subtle kraken
#

@green mesa you already checked that it all works well?

#

well its merged now

green mesa
#

It got approved 3-4 days before but no one merged but u did finally ty

glass pecan
#

force refresh your cache

#

๐Ÿ™‚

cold moon
#

Yeah, this worked

glass pecan
#

It was tempting to just say yes and let you get worried though lol

patent pivot
#

hahaha

past falcon
#

The stat tracking on !e looks a lil weird to me:

if ctx.channel.category_id == Categories.help_in_use:
    self.bot.stats.incr("snekbox_usages.channels.help")
elif ctx.channel.id == Channels.bot_commands:
    self.bot.stats.incr("snekbox_usages.channels.bot_commands")
else:
    self.bot.stats.incr("snekbox_usages.channels.topical")``` This doesn't seem to cover all whitelisted channels/categories (esoteric, help_available, voice), so they would just get bundled as topical. And the topical help channels don't even seem to be whitelisted ๐Ÿค” 
(https://github.com/python-discord/bot/blob/master/bot/exts/utils/snekbox.py)
green oriole
#

Topical help channels aren't whitelisted, but staff members can use eval in those

past falcon
#

Ah, true. So esoteric is treated correctly there then, but what about help_available / voice?

And separate question - why are topical help channels not whitelisted?

green oriole
#

I guess you can call voice topical, but maybe it could have another category for the stats

#

I don't see how you'd run an eval in help available though

past falcon
#

I agree, but the available category is whitelisted ๐Ÿ˜„

green oriole
#

That's really weird

#

I guess you could start your question with an example

#

As for the second question iirc it was because they still considered the topical help channel shared, and people could disturb the conversation with evals

cold island
#

I'd like to consult the hivemind
I want the top-most function responsible for the !user command to know whether the user has infractions, assuming the command was invoked inside a mod channel.
Now, I could start searching inside the embed the function receives from its helper functions, for the exact format resulting from a user having infractions in a mod channel, but it sounds silly to search for information I already gained inside the helper functions, and it would also be volatile to any formatting changes.

That said, the idea of propagating a boolean value throughout the helper functions doesn't appeal to me too much either.

Thoughts?

#

I cooouuld change what each helper function does

#

yeah, that sounds alright

green mesa
#

Scarygif command of seasonalbot is not working

sour sierra
#

It works on my local instance. Maybe giphy API key is missing/not set?

cold moon
#

Problem can be on API key. There was mess with YouTube API key too some time ago

green mesa
#

Hmmm

cold moon
#

Tested locally: Problem is on missing API key. Having key = no error, removing it shows exactly same error.

#

Have to be solved by DevOps team

glass pecan
#

.scarygif

dusky shoreBOT
#
A spooooky gif!
green oriole
#

Ah yes

#

Very spooky

obsidian patio
#

That taco cat is terrifying. It frightens me

cold moon
#

I think for https://github.com/python-discord/site/issues/385 it's better to add another template engine to site: Jinja2. Jinja have one big thing that Django own lang don't have: setting variables inside templates. This is really important thing for event pages, as this will make much much easier defining sidebars inside templates (these should be built with dictionaries, what building Jinja supports). This don't mean that everything have to use Jinja, as Django supports multiple engines too.

green oriole
#

So you want to use jinja2 instead of jinja I'm guessing 1?

cold moon
#

Yes, I said Jinja2 first, then I didn't included 2 anymore

green oriole
#

I don't understand, which templating engine are we using right now?

cold moon
#

Django Template Engine

green oriole
#

Huh I thought we were using jinja2

#

I'm not opposed to adding it, but you should leave a comment on the PR issue to ask what others think about that

cold moon
#

Also can someone assgin me to this issue?

green oriole
#

Sure thing

hardy gorge
#

@cold moon Could you explain to me why we'd need Jinja2 for that?

#

My view is that we can use DTL's include system for things like shared side bars

#

You have a main content area for the content area and all the pages that share the same sidebar include the same sidebar template

#

That would be the DTL solution for what we're trying to do

#

(It's the same as how all our pages include the same template for the top navbar area, just for a common side bar)

#

Including two different template systems into our app does not sound like the most straightforward solution, tbh

cold moon
#

Okay, but then so there should be static sidebar from template, and then block that allow inserting page-specific sidebar blocks?

hardy gorge
#

I think we don't have a common sidebar design that we can just insert a small bit of data

#

We want different kinds of sidebars for different pages, which means we'd need to have some kind of template for those anyway

#

If we want a common side bar, say for all events, we could insert context data for the template and render it that way

#

using template iteration

cold moon
#

Actually yes, there isn't common elements for every page sidebar.

hardy gorge
#

What do you mean?

#

Anyway, I much prefer to use one templating system instead of two in our relatively small web application

cold moon
#

I thought that this upcoming event is in every sidebar, but it isn't.

hardy gorge
#

That wouldn't be a problem with DTL, right?

cold moon
#

Yes. My original idea was building sidebars with dictionary and for this DTL doesn't work

hardy gorge
#

You can create template for an upcoming events box, make sure it has the context data to render the template, and include it

cold moon
#

So own template for upcoming events, own template for relevant links etc?

#

And also, where should event pages be? In root templates folder or app templates folder?

cold moon
#

Also, will event guides, rules etc. pages handled by content app or by events app?

patent pivot
#

content I would assume

cold moon
#

But same time some of these pages is connected with specific event, like per-event rules?

cold island
#

Sounds like the distribution is basically something that is generally relevant over a prolonged amount of time, and something that is relevant only to a specific event

cold moon
#

And they have sidebars too

green oriole
#

Can't we just have subfolders? lemon_thinking

cold moon
#

Yes, I plan using subfolders for events app

green oriole
#

I don't see the issue then

eternal owl
#

if we make our site 400 responses consistent, we can parse them and send it
example:
all 400 responses can be of this format:

{
field: [error message],
field2: [...]
}

and then parse this on the bot site and send it in the channel

green oriole
#

What is that?

#

the site API wrapper?

eternal owl
#

the bot error handler for site API responses

cold moon
#

Huh, events dewikification was really simple.

patent pivot
tawdry vapor
#

I'm concerned it's turning into bikeshedding

#

I have another PR to refactor help channels which is based on this

glass pecan
#

@tawdry vapor Sorry, I didn't see this ticket. In a branch I'm working on, I actually kinda already made an importable reference to bot from anywhere, but it's different from the proposal that you were laying out in your PR.

#

Since this is something you were touching already, I'll stop what I'm doing and discuss first.

#

For reference, the solution I was going to go with was a class attribute on Bot: literally Bot.instance

#

which would be redefined on __init__

#

I 100% agree though on the convenience of some form of importable reference to the instance, as it's stupidly annoying having to pass a single reference of bot around that will never change into a whole bunch of utility tools.

tawdry vapor
#

That's not bad I suppose

#

Would avoid import changes but I've already done the work

sour sierra
late wolf
#

What is snoflake?

green oriole
#

It is the way discord (and originally Twitter) IDs are made

dusky shoreBOT
cold moon
#

๐ŸŽ‰ And events app is ready! Time to open PR.

green oriole
#

Noiiice

cold moon
#

I hope this get merged sooner than content app, as this don't have so much logic in views, basically loading templates.

green oriole
#

You should mention it on the PR then

cold moon
#

And I think events app issue is not worth advanced level. This was really easy to do.

green oriole
#

The difficulty levels are just indicators, that's not an issue