#dev-contrib

1 messages · Page 85 of 1

cosmic moat
#

ah okay

#

I'll add that in a bit then

celest charm
#

You could make some abstraction that would do all the error-handling, but maybe it's not really worth it

#

Another question @cosmic moat: you don't differentiate between an erroring result and an empty result. Is that intentional?

cosmic moat
#

yes

cold moon
#

@cosmic moat You should also not load cog if token not provided in environment

celest charm
#

@cosmic moat

class YoutubeError(IOError):
    """Something went wrong, and it's YouTube's fault"""

...
    async def _request(self, url: str, description: str, /, **params: Union[str, int]) -> Any:
        async with self.bot.http_session.get(url, params=params) as response:
            if response.status != 200:          
                raise YoutubeError(f"{description} failed: status code {response.status}")
            return await response.json()
   
    async def get_statistics(self, id: str) -> VideoStatistics:
        """Queries API for statistics of one video."""
        response = await self._request(
            STATS_API,
            "Getting statistics",
            part="statistics", id=id, key=KEY
        )
        view_count = response["items"][0]["statistics"]["viewCount"]
        like_count = response["items"][0]["statistics"]["likeCount"]

        return VideoStatistics(view_count=view_count, like_count=like_count)

how do you like that?

cosmic moat
#

and doesn't that catch the same things?

celest charm
#

@cosmic moat no, the error class is just 2 lines, ... indicates some absent code

#

i.e. it should be in the cog class

#

It does have the same behaviour, just in a different way

cosmic moat
#

ah okay

celest charm
#

@cosmic moat You could also add a try-except around the async with that would catch all the errors. Another approach that I expressed above is to just leave it to the top-level, and not care about it

cosmic moat
#

alright, i will be able to work on this later

clever wraith
#

is pride avatar blocking?

vale ibex
#

.src prideavatar

dusky shoreBOT
#
Command: prideavatar

This surrounds an avatar with a border of a specified LGBT flag.

Source Code
vale ibex
#

Yes it is

#

So is 8bitify, easterifier etc

#

they should all be put into executors

#

Care to raise an issue @clever wraith ?

clever wraith
celest charm
green oriole
#

I feel like having blocking image processing images as bad as it looks haha

#

We would at least need to make sure that only one instance of all avatar command can be ran at the same time

subtle kraken
#

thats rather simple then

#

d.py has decorator to ensure that only 1 command can run at a time afaik

#

I think looking into that would be much better than blocking whole bot

vale ibex
#

yea @commands.max_concurrency(1, commands.BucketType.user)

#

I imagine a guild bucket is what we want

#

if we end up doing sir-lancebot#584 we should have that in and executor though, since it'll take longer than the normal processing

dusky shoreBOT
subtle kraken
#

I'd guess default bucket won't hurt at all

vale ibex
#

We can add a cog_command_error to the file too and catch commands.errors.MaxConcurrencyReached to output to the command invoker why their command isn't running

eager fable
#

.8bit

#

.8bitify

vale ibex
#

Maybe worth doing that at the bot level

green oriole
#

Because our resources are far from infinite haha

celest charm
#

ah, you mean one per user

#

yeah, that makes sense

#

like with snekbox

green oriole
#

I guess you could say that anything is far from infinite as much everything else

#

But yeah

celest charm
#

but the limit does make sense

green oriole
vale ibex
subtle kraken
#

so group command applies concurrency limit

vale ibex
#

That's a good idea, I imagine there's a fair amount of shared code too

subtle kraken
#

and to keep the posibility of being able to use command as .command and not .base command we could borrow Mark's implementation for that from @stable mountain

#

Mark did some magic for .base command being invokeable as .command iirc

green oriole
#

That sounds good

vale ibex
#

Would that be something you'd want to implement @subtle kraken ?

#

Only asking because I've been looking for a slightly larger project to get my teeth sunk into and this sounds like fun

subtle kraken
#

I wouldn't say so as am rather inconsistent with whatever am doing so that PR would possibly take quite bit of time under my name to get it done
Plus am being bit busy nowadays so feel free to do the coding if you so wish, I can always review it

vale ibex
#

Cool, I can draft an issue later this evening to get the specifics down

subtle kraken
#

take your time, no rush

vale ibex
#

Where would I look for the thing you mentioned in @stable mountain ?

subtle kraken
#

leeeet me find it

#

give me 1min

vale ibex
#

take your time, no rush

#

😄

subtle kraken
#

it has all files relevant

vale ibex
#

.bm 810938851877978163

#

thanks 😄

subtle kraken
#

and the change it bot.py file

#

to add_command and remove_command
I imagine for the system itself, you need to port the class and those 2 methods

#

Hopefully that helps

vale ibex
#

Me too 😄

#

Lol that doesn't make sense

#

I read your msg as I hope that helps

subtle kraken
#

I do recommend into looking most of the PR as it shows all the stuff that needed to be done & how to use it

#

actually

#

it is interesting if max concurrency will work on that

vale ibex
#

huh just taken a look at the Pr

#

interesting implementation

subtle kraken
#

I dooo have slight doubts on its implementation to handle parent checks to be fair so that could be interesting

vale ibex
#

Yea, could do a small poc to make sure it'll work

subtle kraken
#

would mean that you'd have to drop the root alias implementation or rework it so it supports parent checks

#

well, I wish you best of luck!

vale ibex
#

Thanks 😄

tawdry vapor
#

Can't this be implemented with a custom bucket instead?

#

Maybe not cause I imagine each max_concurrency decorator has separate state

vale ibex
#

I can't seem to find anything that suggests it can be on google

#

But also nothing to the contrary.

clever wraith
#

i finished the .pyfact command

#

but i need some more fax

#

should I make the PR now, then add facts later, or vice versa?

celest charm
#

@clever wraith I guess you can make a PR now, and then we'll bikeshed intensely

dusky shoreBOT
#

Law of triviality is C. Northcote Parkinson's 1957 argument that people within an organization commonly or typically give disproportionate weight to trivial issues. Parkinson provides the example of a fictional committee whose job was to approve the plans for a nuclear power plant spending the majority of its time on discussions about relatively...

celest charm
#

@clever wraith Discussing unimportant details when facing a conundrum

clever wraith
#

ok

celest charm
#

hence this creature:

#

a ducky bike

clever wraith
#

what did @dusky shore bring? was that an automatic thing?

celest charm
#

yeah, it's the .wiki command

#

I just erased the invoking messages, they were pretty noisy

clever wraith
#

ok

celest charm
#

it would be much faster to send a link manually, but since this is #dev-contrib

clever wraith
#

ok

celest charm
#

ok

vale ibex
#

🆗

short snow
#

.bm 810938851877978163

short snow
#

Who is working on getting all the image commands into one group and adding ccool down on it?

gritty wind
#

@vale ibex

short snow
#

(updating .ttt log show 1

#

added a # before 1 now

short snow
#

@green oriole Pull request made for the above

green oriole
#

Sweet

short snow
#

should be just one approval ig

gritty wind
#

Isn't it sir lancebot?

#

Also why are there a bunch of extra whitespace everywhere

#

I think code following docstrings is pretty standard

vale ibex
#

Please add any comments you have to sir-lancebot#594 😄

#

ummm, lance bot? hello?

#

sir-lancebot#594

hardy gorge
#

bot#1

vale ibex
#

He's taking lunch it seems

vale ibex
sleek steppe
#

I don't think so yeah it is

short snow
#

the bot hosting service has gone down?

#

i guess

#

alright @vale ibex

vale ibex
#

Nah, it looks like ttt has some issues

short snow
#

not ttt, i think the quiz command

late wolf
#

@dusky shore help command aint working?
#bot-commands message

short snow
#

bot#1

dusky shoreBOT
short snow
#

ok, it is ttt ig

vale ibex
#

Yea, looks like while a ttt game is in prog other commands are held in a queue

#

they may possibly time out afterwards too

#

I don't have time to investigate right now, anyone feel like raising a bug issue? 😄

short snow
#

lemme start tic tac toe once and then try

#

yes it is

#

hmm, maybe due to the reactions.

vale ibex
#

It looks like when multiple games a requested, they're put into a queue

#

I'd suggest seeing if you can reproduce the issue with just 1 game running, and none in the queue

#

probably easier on your own server

eternal owl
#

@surreal venture left a comment on the stackoverflow feature issue

obsidian patio
#

Hey Xith, do you have a few minutes for this now?

vocal wolf
obsidian patio
#

If you can/want to hahah

#

Or isn’t it like 5 am for you now?

vocal wolf
#

We'll have to do it another time, it's 6am and I'm embedded in bed

obsidian patio
#

Sure thing

#

I’m free later today as well

#

Either way, enjoy your embedded-in-bed-ness

vocal wolf
#

Thank you, and hopefully we can meet later.

#

Along with @green oriole

green oriole
#

!otn a embedded-in-bed-ness

stable mountainBOT
#

:ok_hand: Added embedded-in-bed-ness to the names list.

vocal wolf
#

Our open source boi

#

Alright gn lol

green oriole
#

Night!

#

what is it all about though?

vale ibex
green oriole
#

Okay I see

#

That’s an excellent point, we should totally discuss that

#

Not sure if I will be available today, but hey

#

I’ll try

obsidian patio
short snow
#

@eternal owl commented on so pr

obsidian patio
#

Otherwise, I should be free during most of this week for short meetings

green oriole
#

I shall be free during the weekend too

obsidian patio
#

Lovely

#

Also, missed opportunity to drop an e

green oriole
#

Haha

clever wraith
#

?

gritty wind
#

You probably have a conflict with your local files, and whatever you’re trying to merge

clever wraith
#

ok

#

WHY DO I GET THIS WHEN TRYING TO COMMIT MY CHANGES?

bot/exts/evergreen/pythonfacts.py:15:60: ANN201 Missing return type annotation for public function

vale ibex
#

Because you're missing a return type annotation for public function

#

eg a function should say what it returns

#
def get_a_number() -> int:
clever wraith
#

OK

vale ibex
#

Specifically, the function in pythonfacts.py on line 15 needs one

clever wraith
#

what would it be for mine?

vale ibex
#

What does it return?

clever wraith
#

it sends an embed

vale ibex
#

Could you paste the function here?

#

!paste if its long

stable mountainBOT
#

Pasting large amounts of code

If your code is too long to fit in a codeblock in discord, you can paste your code here:
https://paste.pydis.com/

After pasting your code, save it by clicking the floppy disk icon in the top right, or by typing ctrl + S. After doing that, the URL should change. Copy the URL and post it here so others can see it.

clever wraith
#
@commands.command(name='pythonfact', aliases=['pyfact'])
    async def get_python_fact(self, ctx: commands.Context):
        """Gives a Random fun fact about Python."""
        with open('bot/resources/evergreen/python_facts.txt') as file:
            await ctx.send(embed=discord.Embed(title='Python Facts', description=f'**{random.choice(list(file))}**'))```
vale ibex
#

Is that all of it?

clever wraith
vale ibex
#

Ok cool, so in python if a function doesn't have a return statement anywhere, it returns None by default when it gets to the end of the function

#

so add -> None: to the function signature

clever wraith
#

okie

vale ibex
#

I.E async def get_python_fact(self, ctx: commands.Context) -> None:

clever wraith
#

ok

vale ibex
#

These type annotations make it much easier for people reading the code to see what each function does.

#

So just by looking at that one line, you can see all of the parameters it takes, with their types and what the function returns

#

So that paired with the doc string on the line below should explain to anyone reading your code what that function does at a high level without the need to read every line in the function

clever wraith
#

ok

short snow
#

@clever wraith reviewed!

clever wraith
short snow
#

@clever wraith no frequent pushes. read the contributing guide.

short snow
#

eh, i swear i pressed the start review

surreal venture
#

I can't really work rn

#

im travelling

eternal owl
#

oki

short snow
#

what is a user token?

gritty wind
#

In the context of #1421 it's the token your client uses to authorize with discord

#

If you're familiar with frontend logins at all, they are a common way to keep your user authorized, so they don't have to reauthorize for every request

vocal wolf
sharp timber
#

I'll add some to the comments. I also have time to work on this tonight if desired?

blazing magnet
gritty wind
#

@sharp timber the 2 underscore thing isn't true necessarily

#

At least it wasn't for my token

sharp timber
#

Hm, ok

sharp timber
#

Yeah, looks like mine doesn't have any rn

tawdry vapor
#

Doesn't it already detect user tokens?

#

I remember a PR for that

gritty wind
#

It does bot tokens

#

but not client ones

sharp timber
#

It detects normal format user tokens

tawdry vapor
#

Wait, how could one even obtain such token for a non-bot user?

sharp timber
#

From your discord client dev tools, token grabber, etc

gritty wind
#

By less than recommended methods

sharp timber
#

Basically there's zero good reason to have one these days

tawdry vapor
#

So the console stores both token types?

sharp timber
#

The console stores everything discord needs to run, which includes a user token. But user tokens have two formats, one for users without MFA, shared with bots, and a different one for users with MFA enabled

tawdry vapor
#

Okay, understood

sharp timber
#

I adjusted our bot token detector a few months ago to detect whether a normal formatted token is a user token or not, but I didn't want to scope creep and wasn't sure the limits on mfa tokens so I didn't add it. It also was prior to our change to the !user command to support users outside the guild, so it doesn't detect bot/nonnbot for out of guild users

fallen patrol
sharp timber
#

It resets with your password as well, and presumably yet something else because I end up getting kicked from my logins sometimes for no reason

#

We can extract a user ID from a X.Y.X token straightforwardly enough, but there doesn't seem to be hidden lore on the mfa. format (not that I'd expect it), and it could be a truly random token as well, which would make that not really possible

gritty wind
#

We decode the other tokens for moderation purposes, but the removal can be done for all tokens anyways, even if we can't necessarily gauge moderation problems

fallen patrol
#

Hi all. So I was wondering why ns_jail was used on snekbox. A similar api I use uses docker instead of ns_jail. The major difference is probably that this system runs multiple languages on Wine. So far, no one has broken out of the container to my knowledge.

Disclaimer, I'm not the dev of it but am working on v2 as my learner project. Yes, not the best idea. Yes, I'm actually doing other projects to learn stuff along the way.

Anyways, using docker, it seems that it would work well for the same purpose that ns_jail does. So why use ns_jail over docker or vice versa? Since snekbox does use docker, why does it also use ns_jail?

(@Mark#3118 because scaleios told me to ask you)

#

Yep that mention worked @tawdry vapor

#

Do please ping if/when reply, I have a hard time finding this channel 😓

tawdry vapor
#

Docker isn't intended to be a sandbox, first of all

fallen patrol
tawdry vapor
#

Though it can be secured to some extent. It does used similar technology of the kernel as nsjail.

fallen patrol
tawdry vapor
#

We also deploy everything with k8s, so the web server for the API runs in Docker too. To substitute nsjail for Docker and avoid imposing limits on the web server itself, we'd need a Docker-in-Docker solution or to spawn a new container for each code evaluation request.

#

I don't even know if k8s supports Docker-in-Docker, but it's generally not recommended anyway.

fallen patrol
#

What is k8s?

tawdry vapor
#

Kubernetes

fallen patrol
#

which is...?

tawdry vapor
#

A way to orchestrate containers. I don't think I am the best person to explain it. You should look that up later.

fallen patrol
#

More containers, afaic

#

Manages docker or its own containers?

tawdry vapor
#

It's not really important to understand what it is for the purpose of this discussion. It's just the way we do deployment.

fallen patrol
#

Ok

#

So with ns_jail, you could run multiple concurrent scripts without spinning up new containers?

tawdry vapor
#

Well, not directly. But it is just a process, so multiple processes could be used. That's more lightweight than a container.

fallen patrol
#

However the disadvantage is that it can't interact with the file system

#

If you were making scripts that did that.

tawdry vapor
#

It can if you want it to

#

You can choose what gets mounted and whether its read only or read-write

fallen patrol
#

But it would interact with the actual file system, not a cloned file system like docker.

tawdry vapor
#

You can set up your own chroot if you want

#

If you need an entire typical linux install then I suppose it's not really the right tool anymore

fallen patrol
#

Which would then be docker

tawdry vapor
#

Maybe

fallen patrol
#

Or something else entirely

tawdry vapor
#

But it's not what we need so we use nsjail

fallen patrol
#

If you don't need an entire system you can use ns_jail

#

Can other languages be ran in ns_jail?

#

O

#

It's just for processes.

#

You run the process inside ns_jail

tawdry vapor
#

Yes

fallen patrol
#

So it and docker aren't really comparable, kinda

#

One is nearly a clone of the filesystem and desktop and the other is a single process

#

Which is extremely different.

sharp timber
#

Actually, is this feature something we could implement as a filter_token filter @tawdry vapor ?

tawdry vapor
#

If it's just going to be a regex without any extra heuristics, then yes

sharp timber
#

That's what it will be, afaict

tawdry vapor
#

It will have false positives but since it starts with mfa I think it won't be as bad as the other token format

fallen patrol
#

Thanks for the help, Mark 👍

tawdry vapor
#

They're similar since they use the same underlying technology, but they're intended for different purposes

#

It's just namespaces and cgroups fundamentally, and you could technically configure nsjail in a similar manner - it's just not nearly as convenient

fallen patrol
sharp timber
#

yes

fallen patrol
#

Although I can't help but wonder if there's a different tool for actually running code that needs to use a clone of the filesystem.

gritty wind
fallen patrol
#

Wdym match?

gritty wind
#

If we can extract a token from the message, we log the above properties

#

We don't log MFA though

#

because we don't search for it

#

At least right now

fallen patrol
#

well, time to test the regex with a already defunct token

gritty wind
#

Go for it

#

Maybe in #bot-commands to reduce spam

tawdry vapor
#

The module already has unit tests that do that

fallen patrol
#

done

#

so if a token is defunct it won't work?

#

how tf does it know

gritty wind
#

That's not

fallen patrol
#

oh

gritty wind
#

One sec

#

This is the matching regex
([\w\-=]+)\.([\w\-=]+)\.([\w\-=]+)

#

It matches tokens in the format of ---.---.---

#

You can try it with a bot token for example

fallen patrol
#

ah

gritty wind
sharp timber
#

It's a bit stricter, because it does check to make sure the first chunk is an encoded ID, the second is a valid timestamp, and the last not a dummy value (Eg: xxxxxx)

gritty wind
#

If only the webhook checker was that sophisticated 😔

sharp timber
#

lol

#

@fallen patrol mind sending this: mfa.asdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdf here?

fallen patrol
sharp timber
#

Thanks, works

sharp timber
fallen patrol
#

I sent a webhook id in #bot-commands earlier

#

#bot-commands message

gritty wind
#

that checker only looks for the /webhook/ part of the URL iirc

#

Which makes it very hard to demonstrate that URL

fallen patrol
#

/webhook/717983911824588862/386599446571384843_386599446571384843_386599446571384843

gritty wind
#

https://discord.com/api/webhooks/test

#

hmm

fallen patrol
#

admin immune? here, I can dm you a token
yes?

gritty wind
#

Oh wait

#

it matches

#

digits

stable mountainBOT
#

@gritty wind, looks like you posted a Discord webhook URL. Therefore, your message has been removed. Your webhook may have been compromised so please re-create the webhook immediately. If you believe this was mistake, please let us know.

gritty wind
#

wow okay

fallen patrol
#

#bot-commands

gritty wind
#

I'm trying to send the actual url itself haha

#

discord.c0m/api/webhooks/1/a

#

this would trip it off

#

without the 0 ofc

fallen patrol
#

apparently it doesn't check client secrets

fallen patrol
sharp timber
#

that'd be a really, really bad decision and I doubt that's the case

short snow
#

i got some free time on tomorrow most probably, so would be great if someone can review connect4 and the ttt fix.

vale ibex
#

Can I trouble someone for feedback on sir-lancebot#594?

green oriole
#

Done!

vale ibex
#

Thanks lemon_hearteyes

#

Do pushes to draft PRs trigger gh actions?

green oriole
#

I think so, but that’s the point lemon_pleased

vale ibex
#

yea, that was my guess just wanted to double check before I raise a draft PR and start hammering the runner 😛

green oriole
#

Github actions isn't limited for open source, so hammer it as much as you want lemon_happy

vale ibex
#

😄

vale ibex
#

Raised a draft Pr for now, going to carry on over the weekend 😄

#

If anyone want to take a look and make sure my to do list isn't missing anything, it's sir-lancebot#597

short snow
#

sir-lancebot#595 needs the labels and a review should be quite short, not a big change, a small one

dusky shoreBOT
gritty wind
#

@short snow Was the visual change discussed?

short snow
gritty wind
#

Alright, good enough for me

#

I'm talking about the X and Os

#

not the embed

short snow
short snow
#

Thanks will mention your changes.

#

also just a reminder u and ak have pending reviews on c4 pr

gritty wind
#

Were there changes on that one?

short snow
#

Ah, use emojis library

#

@green oriole ^

short snow
#

@gritty wind what emoji suggestion do u have for the ttt?

balmy sparrow
#

On what cloud platform are the bots and the site running?

gritty wind
#

That would be linode

balmy sparrow
#

Right I think they're one of the sponsors? Do they give you some referral code or something I could use to get some free credits?

gritty wind
#

Yup

#

It should be automatically added when you visit the website through the URL at the bottom of our site

#

3bc18ce876ff43ea31f201b91e8e119c9753f085

balmy sparrow
#

thanks :D

short snow
#

what is DEFCON settings?

gritty wind
#

Defcon is part of the suite that we use for raids and other attacks

#

Not being able to get the settings just means it had to fall back to defaults

short snow
#

what settings does it need? also isn't all that specified in the config.yml?

gritty wind
#

Config is good for constants

#

The defcon is set dynamically

#

The settings are things like day, and verification level

short snow
#

oh.

#

and how is it set dynmically? Can u link the code.

gritty wind
#

It's just a command that connects to the API and database

short snow
#

and in what types of cases does it fail?

#

ohk

gritty wind
short snow
#

like it isn't able to establish a connection between the two?

gritty wind
#

Yeah if it can't connect to the API for whatever reason

short snow
#

then, shouldn't the status code be logged? It would make a quiet more clear i think

gritty wind
#

It is logged internally

#

The message there is just to get extra attention

green oriole
#

The new defcon implementation will have the traceback in it

short snow
#

oh ok

gritty wind
#

oh hell if I know lol

#

I mind the old ones less than the red ones on white backgrounds

green oriole
#

Don’t we already have some

#

We do, they are in the emoji server

short snow
#

ok, can you give me their ids

#

like \<emoji>

green oriole
vocal halo
#

hey can you explain how @stable mountain scrapping docs.python

vale ibex
#

!src d

stable mountainBOT
#
Command: docs

Lookup documentation for Python symbols.

Source Code
vale ibex
#

@vocal halo this

#

If you have any questions about it let us know 😄

vocal halo
#
  • have some*
#

@vale ibex what is inovertry?

vale ibex
#

iirc its a term used by intersphinx to describe what is held about a specific package

vocal halo
#

hmm how can i get that inpvertry @vale ibex

brazen charm
#

The interpshinx inventory files provide a mapping of symbol names you use in the get command to urls where they are located, the bot then fetches the url and parses the information from there

vocal halo
brazen charm
vocal halo
#

@brazen charm this is in chiness?

#
‣灓楨确椠癮湥潴祲瘠牥楳湯㈠⌊倠潲敪瑣›祐桴湯⌊嘠牥楳湯›⸳ਹ‣桔⁥敲慭湩敤⁲景琠楨⁳楦敬椠⁳潣灭敲獳摥甠楳杮稠楬⹢砊듚嶽阸緯㹿곅鹵曛늦穻鵪舻䲀ࢦ욈비跴낗렅壂쭎ࢎ폪稿솱撀潫휹쪪ˆ﻽►孋喓笸볙Ɡ頼隯ᇿ뿽刷쟼ッﴑ翉톾瓢톇㲡ᆭᨷ翽ᄋﳳ槣ᓺ긾욞旳縨정䒑㬅䝃摺짅겊︞託재鳟瓫妲➭엣ᰢ㾯㲿靍ₛ최셦獴ဧ㒑슽㉠꾟羶꣒ꄔ友콎ꮁ褬䱘쉯ꝧ隀ꍀŗꫬ⨬阓↝䭎〻⃽ᨪꨇ蟘꓏퓠騔笔镍ᢧ鱤翅폐⬻뽌㥤庉ㅡ╾螰쎪펣闸䦤䩌荚ꏢ䣪튳聑늟觨ޖ抦ꪼ똏폽谎㇈䤤୉ݙ燩ୋ鬠近쬒设ᶘ蟙妗常ࣾ꬧曥茶騵땭퇛Ợ࣓砰庸Ꮉ咘囍꟫웱拋ਁ礌ᦀǦ쯦劉칩㧑킨굝̟硨㏈퓅㵦鱿䈾菃ꑒﺇ麶왯긏샏橘ട䍛姸軁阋ᷭᔑ班⋁溷ᖨ둾藝婻蓪휈䅸䩓䔸葈⒳❍⬬經⫅鐞ቅ捓毗욋⠱爦ዸဵ䳾柋撖肆蹳玎뎭䠙줅呟ᖌ則䌍퉔共鎐擙諚覯蕂䃣융查董뒽䒪皖ߓᯛᎩ땩﫝陱х쪇㶲㓧휎☹➌坙⩐ꞟ턛ᆱ詻힂掔䗣砧ꬣꚤ꫶෌ﮡ낫목傝❮ꬺᦹ곫ᷞ碈䞪芚黀꺾ײַ鮺ᖟ鑃玶㕫緒풭脈녣괴낛妓砣꣓奸兔ᕙ剛娞㲳堷絏莜愓衑䋞들钍났䭰軺ಠ朹젧ꔶ꿝䱢칈㔫뼏苊罈౬폛㯜䟑㎪ᖗᢠ嶅ⴥ㴎薱⣅ꯐ셈鋴⤜а턻ㇹէ㧼峧夭㦀鵋擬簂ѱ앞‑⎋ᑀ䴇Ỹ믑⑆瑨햟ꌪ桳ɚ픊㨜ꔀ$쒥秐䈙颲滺唙毈硳賙ꂬ㋙᫑空쯌ఓꎑ㏖ꯣ锬身㊛ᣖਲ䠟쫴쉓欏Ꞛꈤꋓ蕠긵Ⓢ䣱埥ꐈ㄀೓贜恆쳑᧷〫ベꋏ쪂恵抒꼞掅ﶒ왇㏞娅䐌뤫쪵ϕ㢃⯢髍Ꮾɞ눟얉吧컘Ე铗䭀荄諟蒤䦃≔朗槽㤱抐睍잸泂텻꟯⼀⒯꒘颴撥板᭞ﯟ⍝梣鄨畆舨浳ࢬ槔꙰禎᭡푝䚗䱂➡꿵쳦䃭蘻㺧滊睖檡ዑ媛㼉䪲᱌頸ᾝ绉㗌蘍荅텋熰㏼쾆쥶뛾鏤⤬䣃敽㸊⬊썎峃䖾갴选「꜆䒶䭄䐿켻먋㹋ᐼ銪注ࣅ掠ୗ㒿礎✙섌ꖫ瞂摒葺沑塁愺詾硸월各﵅㶐葕蹽뺘⌡ꮏṣ烧ꯔ饔ꤝ뉀씸钴隆౉쟹庐᭬鄏䁦䨄檨⧃ᆍ㬨눢儭ﴓ䲰灐珆ꈽ䇁繡↦䤙뫃㣘䡆䈮ẉ෻粓勎扒㫲箥鴒謤㯙㛇ꏐˈ鬦⤷輑騮岶ᒔ䡪᡹䑆臼儨讖鐪䗼ꘙ䷴貭㔃ピⴆ䐽ㆆ囝౻ṝퟴ뽍좏態霉뉩ᎍd爋㌌概抿≼롢輪㲩䲰鹦㗨蔑돶お굵㊨⣱ൺⰜ樻蹜婉ᦷ쬸蹝⊪镌ḡ讛帉㒘댋줵칃⊪௱虞鉩ṡ療ṵ摣⏍잇哵魷塰퍚骢Ԧ߲쁎聣撮ꔇ儊ᅴ⹔鼽⋠艢方儜뉰鍟㒝჋ﻹᜮ䈗ᡩ⡇ᬃ㡳앉擐彼ϕ엎聺伿傿켪鞪毃◈ఝ퀗걲䋇ꨌ硞ퟶເ帊런꘤恚⨒뽒먕杙ὑ릋㜺垰ꆚፅഗ勣㝂闸퀔૴㏄劵젞딁쾾䟨铗ꈨ㱤㣳난蓼✆兕츍굏➯쥻ҏ┗䚲謀悥햶苗蟝ⷭ⌿絤挒捨濺㹃⍫헶祜䀾㢻菫샴响쳭당奺竉䰕⬧䏛復馲⣺폠崰왬ﱱ栒虥႟䍞뚭㾋姆䦼富怙資ㆥ䡒싾牋ᇌ嵼䠤槲䅼㾲掦ꍌ쳘벟픚呫᤭ꍤ⬺폠︠㟹棋닸蕴ቶᗓ뮢珁䜽顠䵚鋓ᾀ˰齁酐ᇪឃ예礣䁚⤼
#

see

brazen charm
#

As the header says, the file is compressed with zlib and is binary

vocal halo
#

@brazen charm ok now i understand what is inovertry

#

can you help me how @stable mountain search in that inovertry

#

?

round pond
#

Yes i guess its chinesse

fallen patrol
#

#dev-log message
No, The api exposes all users names and stuff even if they aren't in the server.

gritty wind
#

That comment is more on the fact that if you (the user) don't have it in your cache, it will just show up as the id

#

I can probably find an example

vocal wolf
#

@cosmic moat if you have time, do you think you can finish up the YouTube command?

cosmic moat
vocal wolf
#

Thanks!

cosmic moat
#

:D

vale ibex
#

grrr

#

it seems like @commands.max_concurrency() doesn't work with command groups as you'd expect

#

the command listed under the group decorator has max concurrency, but commands in the group don't

#

and if you put the decorator on all the commands, they don't share a bucket

gritty wind
#

How about implementing a custom dispatcher

#

Or didn't Mark have another suggestion as well

vale ibex
#

yea, I was looking into implementing a custom bucket, but they won't be shared across the root aliases

#

might give a custom dispatcher a go, would be simpler than making buckets+aliases work

#

I've done all the easy stuff at least now, they're all in 1 cog, sharing common code and running in executors

twilit pumice
#

Hey Guys, I am currently trying to get myself involved into the discord bot. Now I took over the task to remove the trivia question with the Nile which itself is not that hard. Now I was trying to get the bot (or after that the original version) running on my testserver to see, if my changes work or if I messed something up.The problem is that I cant get the bot running. I already tried creating several venvs with pycharm and pipenv directly but whatever I do "docker-compose up" and "pipenv run start" just cause some errors I cant really solve 😩

gritty wind
#

Can you share some of the errors 😄

twilit pumice
#

@gritty wind Sure, docker.errors.DockerException: Error while fetching server API version: (2, 'CreateFile', 'Das System kann die angegebene Datei nicht finden.')
[5148] Failed to execute script docker-compose; socket.gaierror: [Errno 11001] getaddrinfo failed

gritty wind
#

Ah, okay I think I know what this is

#

Could you post the rest of the error to make sure though

#

!paste

stable mountainBOT
#

Pasting large amounts of code

If your code is too long to fit in a codeblock in discord, you can paste your code here:
https://paste.pydis.com/

After pasting your code, save it by clicking the floppy disk icon in the top right, or by typing ctrl + S. After doing that, the URL should change. Copy the URL and post it here so others can see it.

twilit pumice
gritty wind
#

So the error you get from starting with pipenv is pretty common

#

It is due to not having Redis running

#

You can easily get around this by setting USE_FAKEREDIS to true in your env file

#

I'm trying to figure out the docker problem though

twilit pumice
#

You mean the .env file I created for the bot with all the discord IDs ?

gritty wind
#

Yeah

vale ibex
#

@twilit pumice Your docker issue seems to be that docker isn't running why you try to run docker-compose

#

do you have the little whale icon on your task bar?

#

As Scaleios said, either you can set USE_FAKEREDIS is your env file and use pipenv or, if you want to use docker, you'll need to have docker running before you run docker-compose up

twilit pumice
#

I managed to run 'pipenv run start' and got another cmd which says '(Bot)' at the beginning. What that it or how do I know it worked ?

vale ibex
#

Could you show the output?

twilit pumice
#

(Bot) E:\Python\Projekte\Bot>

vale ibex
#

Alright, so that looks like the pipenv shell has started

#

have you done pipenv sync --dev?

twilit pumice
#

Yeah all dependencies are up to date

vale ibex
#

Could you paste the full output from when you run pipenv run start?

#

including the command line

twilit pumice
vale ibex
#

what about pipenv run python -m bot

twilit pumice
#

C:\Users\Robin.virtualenvs\Bot-P_HbSUeV\Scripts\python.exe: No module named bot

(Bot) E:\Python\Projekte\Bot>

vale ibex
#

what is in your Bot folder?

twilit pumice
#

ok, i missed that the git clone created another sub folder ^^

vale ibex
#

ahh that will make sense

twilit pumice
vale ibex
#

yea, now that you're in the right folder, you will need to do pipenv sync --dev again

#

since pipenv creates a separate env for each folder its ran in

twilit pumice
#

ok, done

vale ibex
#

is your .env file in the right folder?

twilit pumice
#

yes

vale ibex
#

cool

#

does pipenv run start work now?

twilit pumice
vale ibex
#

yea, seems like your bot token in your .env file isn't right

twilit pumice
#

It seemed to have worked now because I got a message from my bot 👍

vale ibex
#

Cool

#

Make sure to run pipenv run precommit to install the precommit hook

#

this will make sure your code passes linting before you can pushcommit it 😄

twilit pumice
#

Am i right that precommit and flake8 check the indentation and stuff of my code ?

vale ibex
#

yup

twilit pumice
#

but does it also deal/change .json files ?

vale ibex
#

precommit is a script that run a bunch of linters, one of which is flake8

#

it'll deal with mixed line endings and other things

#

so yes, some linters will affect .json files

twilit pumice
#

ok, thank you so far. I'll get back in touch if further help is needed. Have a nice day 🙂

vale ibex
#

No problem! Good luck 😄

vocal halo
#

Hey devs my question is still a mistery

#

can any one help me

eternal owl
#

What's the matter

gritty wind
#

Hey, what question was that?

#

Ah I see it

vocal halo
#

if i search list docs on @stable mountain how he select which one to show from tree list

#

!docs list

stable mountainBOT
#
class list([iterable])```
Lists may be constructed in several ways:

• Using a pair of square brackets to denote the empty list: `[]`

• Using square brackets, separating items with commas: `[a]`, `[a, b, c]`

• Using a list comprehension: `[x for x in iterable]`

• Using the type constructor: `list()` or `list(iterable)`

The constructor builds a list whose items are the same and in the same order as *iterable*’s items. *iterable* may be either a sequence, a container that supports iteration, or an iterator object. If *iterable* is already a list, a copy is made and returned, similar to `iterable[:]`. For example, `list('abc')` returns `['a', 'b', 'c']` and `list( (1, 2, 3) )` returns `[1, 2, 3]`. If no argument is given, the constructor creates a new empty list, `[]`.

Many other operations also produce lists, including the [`sorted()`](functions.html#sorted "sorted") built-in.... [read more](https://docs.python.org/3/library/stdtypes.html#list)
vocal halo
#

how he know that he have to show this one but meanwhile other two list are also in python docs

#

there are total 3

#

whose keyword is list

gritty wind
#

I think it just matches the first symbol with that keyword

vocal halo
#

yeah but all 3 got same keyword

gritty wind
#

Yes, it just finds the first one

vocal halo
#

oh

gritty wind
#

This is the relevant line
url = self.inventories.get(symbol)

vocal halo
#

yeah

#

so it just takes the first one

gritty wind
#

I'll test it right now, but I think so

vocal halo
#

hmm great let me try too

#

@gritty wind ```py
a = {"name" : "cool", "name" : "fool"}
print(a.get("name"))

stable mountainBOT
#

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

vocal halo
#
a = {1 : {"name" : "cool"}, 2 : {"name" : "fool"}}
print(a.get("name"))
#

@sleek steppe ^^^

#

this give None

gritty wind
#

Update, it doesn't actually have repeats

#

And yeah, that of course gives None, it searches the top level keys

#

The inventories is a dict

sleek steppe
#

It's None because there's no key called "name"

vocal halo
#

yeah when i convert inv to json it in that form

gritty wind
#

So the get returns the second one

vocal halo
#

wait how to convert object.inv to dict as Isee bot is using from sphinx.ext import intersphinx

gritty wind
#

Only one them is exactly list

vocal halo
#

which one is list

#

they all are -list-types

gritty wind
#

Right, but none of them are specifically list

#

Since list exactly matches one entry in there, that's the result

vocal halo
#

then how bot find correct one

gritty wind
#

Because there is exactly one item in there called list

vocal halo
gritty wind
#

It's right after xml.etree.ElementTree.tostringlist

vocal halo
#

yeah

#

so how you get that data

#

you convert to plane?

gritty wind
#

I got that from the debugger running on my bot

#

But you should be able to parse sphinx output

#

I'm going through the code to find out how

vocal halo
#

i used this

#

and i convert it to plane and json i got these

#
xml.etree.ElementTree.tostring py:function 1 library/xml.etree.elementtree.html#$ -
xml.etree.ElementTree.tostringlist py:function 1 library/xml.etree.elementtree.html#$ -
xml.etree.ElementTree.xml.etree.ElementInclude.default_loader py:function 1 library/xml.etree.elementtree.html#$ -
xml.etree.ElementTree.xml.etree.ElementInclude.include py:function 1 library/xml.etree.elementtree.html#$ -
xml.parsers.expat py:module 0 library/pyexpat.html#module-$ -
#

this is when i convert plane

#

this is just a part ot it

#
{
  "0": {
    "name": "CO_FUTURE_DIVISION",
    "domain": "c",
    "role": "var",
    "priority": "1",
    "uri": "c-api/veryhigh.html#c.$",
    "dispname": "-"
  },
  "1": {
    "name": "PYMEM_DOMAIN_MEM",
    "domain": "c",
    "role": "macro",
    "priority": "1",
    "uri": "c-api/memory.html#c.$",
    "dispname": "-"
  },
  "2": {
    "name": "PYMEM_DOMAIN_OBJ",
    "domain": "c",
    "role": "macro",
    "priority": "1",
    "uri": "c-api/memory.html#c.$",
    "dispname": "-"
  },
  "3": {
#

this when i convert to json

gritty wind
#

We store a map of the name to the URL

vocal halo
#

bot use json or plane?

#

CO_FUTURE_DIVISION c:var 1 c-api/veryhigh.html#c.$ - this to api/veryhigh.html#CO_FUTURE_DIVIDION

gritty wind
#

I'm not sure, that's just handled by the library

vocal halo
#

i will check bot source thanks for help mate

#

that was realy helpful

eternal owl
#

!remind 12h review 595 560

stable mountainBOT
#
Aye aye, cap'n!

Your reminder will arrive in 12 hours!

vocal halo
#

hey devs help me pls

gritty wind
#

Feel free to ask questions here or there, but please don't advertise your channel

vocal halo
#

Can anyone explain to me this

SPHINX_MOCK_APP = SimpleNamespace(
    config=SimpleNamespace(
        intersphinx_timeout=3,
        tls_verify=True,
        user_agent="python3:python-discord/bot:1.0.0"
    )
)
gritty wind
#

It's pretty much an object that allows you to access properties with dot access

#

That snippet for example allows you to do something like SPHINX_MOCK_APP.config.user_agent

vocal halo
#

no i mean i try to found those tls_verify and other but they are not on sphinx

gritty wind
#

They are read and set dynamically from a config file

#

Sphinx is not really meant for what we use it for in the docs command, it is meant to be an app that integrates with your code

vocal halo
#

oh

#

we making a fake SPHINIX class

gritty wind
#

That being said, I'm pretty sure you can still see the actual config class if you dig into the sphinx code

#

Yes

vocal halo
#

nice

#

hey @gritty wind ```py
if symbol in self.inventories:
group_name = group.split(":")[1]
symbol_base_url = self.inventories[symbol].split("/", 3)[2]
if (
group_name in NO_OVERRIDE_GROUPS
or any(package in symbol_base_url for package in NO_OVERRIDE_PACKAGES)
):

symbol = f"{group_name}.{symbol}"
# If renamed `symbol` already exists, add library name in front to differentiate between them.
if symbol in self.renamed_symbols:
  # Split `package_name` because of packages like Pillow that have spaces in them.
  symbol = f"{package_name.split()[0]}.{symbol}"

  self.inventories[symbol] = absolute_doc_url
  self.renamed_symbols.add(symbol)
  continue
#

this is answer of my previous question

#

how @stable mountain find which one to show from those three lists

gritty wind
#

For any given inventory, there is exactly one resource with the given symbol

#

That part of the code just checks if you passed an inventory, for example discord.py, and if so, it searches d.py symbols instead of python

vocal halo
#

now i understand i am just tell you

gritty wind
#

Ah right, thanks

vocal halo
#

the correct answer of my question

#

is this so if anyone else ask show him this

#

:D

#

Now i need help with ther thing

#

!df

#

how @stable mountain do this

#

!df

gritty wind
#

This is part of the error handler

vocal halo
#

i wanna learn did you mean but there are no tuts

#

!src did you mean

stable mountainBOT
#
Bad argument

Unable to convert 'did you mean' to valid command, tag, or Cog.

gritty wind
#

Well, it's mostly just us doing a fuzzy search on the functions of the bot

#

If one matches, it is added to the list

vocal halo
#

!src error

stable mountainBOT
#
Bad argument

Unable to convert 'error' to valid command, tag, or Cog.

vocal halo
gritty wind
#

Hello peeps, I've started working on a troubleshooting guide for the bot projects. I've collected some of the most common issues, and tried to list their most common fixes.

I'm looking for feedback on the errors and fixes I have right now, and any errors you believe should be added. The formatting does not matter right now, as it will all be migrated elsewhere once it's ready.

https://gist.github.com/HassanAbouelela/878b6ffcb82c15ae410ee0c063c3f6f4

short snow
#

is it for the bot specific?

gritty wind
#

Python and sir-lancebot

#

Some issues will only apply on one or the other of course

short snow
#

ok, i can have a look at them later in the day.

stable mountainBOT
#
Alright.

Your reminder will arrive in 4 hours!

balmy sparrow
#

Is a tag on the difference between instances and classes planned?

subtle kraken
balmy sparrow
#

That's a rather short thread

subtle kraken
#

well it also links to old thread

#

its all community suggestions not our plans
anyone is free to implement tags

balmy sparrow
balmy sparrow
vocal halo
#

hey devs

#

i have a question

#

!src

stable mountainBOT
vocal halo
#

how to make my code like this repo

#

i mean manages like this one

#

my code looks like this spaghetti

obsidian patio
#

@vocal wolf @green oriole do you have time now? Or maybe later today?

vocal wolf
#

I'm about to go to bed

green oriole
#

It will have to be later for me too

obsidian patio
#

Alright

green oriole
#

Some time between 1pm and 5pm UTC is fine for me, not sure for @vocal wolf

obsidian patio
#

That’s fine with me too

vocal wolf
#

I'm UTC - 8, anytime after 11am (my time) is fine for me

#

These next few days are going to be a bit hard for me to find time since I have midterm stuff

obsidian patio
#

I see

vocal wolf
#

I should be able to find some time though

green oriole
#

So 5pm should be fine, right? Disclamer, I probably messed up the calculation

gritty wind
#

cough time and date dot com

vocal wolf
#

Is it 10am UTC right now?

gritty wind
#

Yes

obsidian patio
#

10:24 am UTC

vocal wolf
#

hmmmmmmmmmmmm

obsidian patio
#

I think 5 pm UTC would be 9 am for you Xith

vocal wolf
#

I'd really like to put time into this meeting, but I won't be able to until after monday

#

by time I mean like many hours

obsidian patio
#

Maybe we could start off with a few minutes to set a general direction soon, and see if we get more time later on

green oriole
#

If we start at the 5pm I will be able to stay for one hour

#

Next week should be fine for me too

vocal wolf
#

By next week do you mean the weekday or weekend?

green oriole
#

Weekday or weekend, both works for me

#

It is spring break!

vocal wolf
#

Would you mind if we pushed to tuesday?

green oriole
#

Works for me

vocal wolf
#

If we did the meeting at 9pm my time I'd be running on very little sleep from tonight and nights before

gritty wind
#

Is this the direction meeting for the bots?

vocal wolf
#

that's the motivation

vocal wolf
gritty wind
#

If it is, I’d like to drop by for a while, but don’t schedule around me

green oriole
#

I have no idea what this is about tbh

vocal wolf
gritty wind
#

Mainly because I don’t have a schedule

vocal wolf
#

I remember not having a schedule

#

good times

#

all async classes

green oriole
#

Because you have one now? 👀

vocal wolf
#

exactly

gritty wind
#

I mean you do show up at predictable times

short snow
#

is dev-bounty board the thing i had suggested in meta, or related it. since the name sounds like that

gritty wind
#

When was the suggestion?

#

Ah I remember

#

No

#

Different thing

vocal wolf
#

Are regular users able to see the bounty board?

green oriole
#

Nope

gritty wind
#

Just staff

vocal wolf
#

ah

gritty wind
#

Well +-

vocal wolf
#

Alright

green oriole
vocal wolf
#

meeting pushed to tuesday to avoid sleep deprivation (don't want it to happen again)

short snow
#

ooh

#

(i will finish the required changes after 24th due to final term school stuff.)

green oriole
#

Sure thing, good luck with your finals

vocal wolf
#

One final ping before I go off to bed

#

@green oriole @gritty wind @obsidian patio Meeting is now on Tuesday. Enjoy your weekend.

green oriole
#

Sweet

stable mountainBOT
#

@short snow

It has arrived!

Here's your reminder: https://gist.github.com/HassanAbouelela/878b6ffcb82c15ae410ee0c063c3f6f4.
[Jump back to when you created the reminder](#dev-contrib message)

obsidian patio
short snow
#

!remind 4H do it this

stable mountainBOT
#
Alright.

Your reminder will arrive in 4 hours!

obsidian patio
vocal wolf
#

sick

obsidian patio
#

Is scal joining too?

gritty wind
#

Haha hence the +-

#

I'd like to

obsidian patio
#

Aah, I see

gritty wind
#

But I don't know the time nor my schedule yet

#

If it's 5PM I can probably make it

obsidian patio
#

Yeah, true. Would be fun

#

@vocal wolf @green oriole @gritty wind Tuesday (23 feb) at 17:00 (5 pm) UTC

Does this work for you?

vocal wolf
#

yes

obsidian patio
#

Awesome, want me to send you an invite to a calendar event?

gritty wind
#

Ah that would be really handy

#

I’ll uhh DM you my address

obsidian patio
#

Perfect

#

I think you can modify the event. Feel free to add any details or change the event name to something more fitting

obsidian patio
#

Of course! Want me to invite you to the event?

patent pivot
#

yes pls

obsidian patio
#

Done

patent pivot
#

Cheers!

green oriole
obsidian patio
#

Sure thing—got an email?

obsidian patio
#

Thanks!

short snow
#

lets spam someone's mails

cold island
#

What are you meeting for? 🤔

short snow
cold island
#

oh

#

If it's here I might hop in, it should be after work hours

short snow
#

Scaleios the gist looks good, maybe i can try see if i catch some other issues while running them. Also in the docker command, you say just to run docker, maybe you can mention how to run docker. @gritty wind

#

!remind delete 1539,

stable mountainBOT
#
Bad argument

Converting to "int" failed for parameter "id_".

vale ibex
#

Are there any examples of custom dispatchers in lancebot/bot I could use as reference?

#

I'm trying to add concurrency to a group of commands, so that they share a limit & queue

tawdry vapor
#

You can look at discord.py's cooldown decorator or the lock decorator in the bot

#

Fundamentally you need some kind of global mapping to make the decorator work across separate commands

vale ibex
#

I'll give that a look, thanks

stable mountainBOT
#

@eternal owl

It has arrived!

Here's your reminder: review 595 560.
[Jump back to when you created the reminder](#dev-contrib message)

green oriole
#

chop chop

green oriole
#

Hello folks, if you are looking for a good first issue to get started with our Django website, here is one: site#445

dusky shoreBOT
green oriole
#

It does include a patch with hopefully all the needed changes already

twilit pumice
#

Hey Guys, does anyone of you use PyCharm and the implemented git functions for cloning, committing and pushing or in general for contributing ?

gritty wind
#

I do, what's up

past lagoon
twilit pumice
# gritty wind I do, what's up

I finally managed to create a push request after several problems with the virtual environment used after cloning the repository and I also had difficulties using git and I just wanted to see if anybody had any tips. It was quiet annoying to switch between ide and different cmd for git ^^

gritty wind
#

I'm not sure what you mean by that, was the pre-commit failing?

twilit pumice
#

I made sure i would lint before committing. For example after cloning the repository into my projects folder it started to use venv of another project and i wasn't able to change it. Another issue was that I then used the cmd of git to create a new branch and committed the changed file in there. I then tried to use pycharm for the push request but it did not even detect the other branch 😩

gritty wind
#

If you have the venv running already, you can type deactivate to exit it. For being unable to find the git commit, I guess was it in the same project? If it was, it should just be able to read it directly

twilit pumice
#

I'll try it in my next contribution. Thanks for your time

gritty wind
#

Feel free to drop a message here if it doesn't work

trim cradle
#

Are non staff members not able to commit directly to our repositories?

#

(namely sir lancebot?)

gritty wind
#

They are not

#

You have to fork and pull

thorny obsidian
#

You have to fork and then make a PR from that fork (which is still my preferred method)

gritty wind
#

Though they can review

trim cradle
#

ah

#

If I run the command git branch -va, the trivia branch on this repository isn't listed, even though I added it as a remote named arez https://github.com/Arez1337/sir-lancebot/tree/trivia

gritty wind
#

Hmm let me think

#

On windows and mac you'd just start up hub

#

what do you do on linux

#

systemctl?

short snow
#

yes

#

to start docker

#

and even containernerd i think so (not sure)

short snow
#

and then you can commit i think

#

not sure

#

ohh, never mind it was for non staff

short snow
#

You don’t need to ping specific users for that, people will see and give their input.

#

And i personally don’t like that feature.

gritty wind
#

A lot of core devs watch this channel

green oriole
#

I don't think having the bot automatically reacting to messages starting with I'm is a good idea

#

It will be way too spammy

subtle kraken
#

doesn't sound like a feature that fits this server

gritty wind
#

That sort of "spammy" feature is not something we usually pursue

green oriole
#

It will still be spam in those channels

gritty wind
#

Other examples include a counting channel

#

I don't understand what you mean? It's a feature that achieves nothing but spam. A game, utility feature, or seasonal cog are the sort of things we add to the bots, and I don't see how the bot echoing the message back can be a useful feature

cold island
#

It sounds like a fun project, but doesn't really fit a server with 150k members

balmy sparrow
#

Has something happened to @stable mountain

#

didn't respond to a few commands

gritty wind
#

Devops are on it, get back to you in a few

patent pivot
#

Python is returned

short snow
#

What was the issue?

patent pivot
#

minor network thing

short snow
#

Oh ok.

#

You can’t really see the bomb in here, maybe put some other emoji, or implement s bomb emoji on our own

rapid swallow
#

💣

short snow
#

Issues on pride avatar command. On image quality

vale ibex
#

I imagine this is an artefact of downsizing the pfp to 1024x1024

short snow
#

i dunno copying message link is not working on ipad

obsidian patio
vale ibex
#

Are there any errors coming from lancebot?

#

I'm not able to reproduce the issues coming from the help command locally

timid sentinel
#

On the guide to set up the bot https://pythondiscord.com/pages/contributing/bot/, Configure the bot step 6 says

Set urls.site_api to whatever value you assigned to urls.site with api prefixed to it, for example if you set urls.site to web:8000 then set urls.site_api to api.web:8000.

in config-default.yml it already says site_api: &API !JOIN ["api.", *DOMAIN], so am I right in thinking this step is unnecessary and could be removed?

green oriole
#

I think so

timid sentinel
#

Never mind, I was using the config-default of a very out of date fork smh lol

green oriole
#

Hmm..

#

Isn't it still defined like that in master?

timid sentinel
#

Nah now it's site_api: &API "pydis-api.default.svc.cluster.local"

green oriole
#

Riiight

#

Make sense

gritty wind
#

.help

#

it's very slow 🤔

vale ibex
#

slow, or erroring?

gritty wind
#

Just slow

vale ibex
#

Maybe there are more blocking commands out there

gritty wind
#

I think something may be blocking it

#

I actually know of one I'm p sure

vale ibex
#

I haven't PR'd yet as I was going to implement the concurrency limit too

#

we could PR this early though?

#

I'm gonna head off for the night now anyway, lmk if you want me to clean it up and PR early

#

I can just make another branch for the concurrency stuff

gritty wind
#

night night

#

I'll give it a look in a bit

vale ibex
#

👍

trim cradle
#

Who is the point of contact if I am able to implement the system we discussed in the staff meeting today? It's something I'd rather spend time doing than the other things I need to do (school, job hunt) but I don't remember if there were any other takers during the meeting.

gritty wind
#

Which idea?

trim cradle
#

rotating topic discussion channel

gritty wind
#

Right, that would be Kat

trim cradle
trim cradle
#

do you have the spec that you want written down anywhere?

thorny obsidian
#

Not yet, I was just about to start. Do you have any ideas for it yet?

trim cradle
#

I would think it would be a matter of having a cog with a command to change the channel description specifically for that channel.

#

I'm not sure what other functionality we would want

#

is the bot going to tell people what the topic is periodically?

thorny obsidian
#

I might want to wait on the functionality and trial it manually for a week or two to see what we'd for sure like

#

But in terms of a future cog for it, maybe a !weekly topic command to bring up the context for the topic. Some sort of system to load up and change the order of topics? Ability to change the channel description and also pin a message

trim cradle
#

we'd also want the existing .topic command to have special behavior for that channel, namely that it should always state that week's topic and never pick from the pool.

sullen phoenix
#

which bot is the new cog going into? i'd imagine it'd go into @stable mountain, so cross-bot communication probably wouldn't go so well there

gritty wind
#

I'm not sure it should go in python

#

Though we have a direction meeting on tuesday

trim cradle
#

I think it should go in Python. It's an "official" thing.

gritty wind
#

But is it a utility or moderation thing?

#

Or more of a fun thing

trim cradle
#

I think the current direction for lancebot is that it's a non-staff-driven open source project that we supply a platform for

gritty wind
#

Do you think you'd be able to make it to the meeting?

trim cradle
#

so if we create a new "feature" for the server (the discussion channel), that's part of the server itself, in a way. so it should go in Python

#

What time is the meeting?

gritty wind
#

5pm UTC atm

sullen phoenix
#

i think it makes more sense to have this in @stable mountain

trim cradle
patent pivot
#

new bounty board issue mmLul

short snow
#

@trim cradle Mentioned the changes for fix/ttt

#

shit sorry

#

wrong ping

#

@gritty wind 😛

gritty wind
#

You can ping steler too, we're spiritually connected

#

but no time for shitposts

short snow
#

lol ok

#

is there any example of using linapaginator

#

like is it used somewhere

#

so i can get an idea of how to use it

gritty wind
#

On sir-lance or python?

short snow
#

sir-lance

#

pycharm navigate doesn't give any result except for the pagination file itself

green oriole
#

You can use your IDE to find usages

#

Okay well

#

I guess we don't use it an lancebot

#

Maybe try with @stable mountain ?

gritty wind
#

Python's is still being ported

#

But hopefully it'll be the same interface

#

Anyways it is used in sir-lance

#

One sec

#

There's also an instance in ttt

short snow
#

so i have a list of dicts like this:

{
  "title": "",
  "snippet": "",
  "pageid": ""
}

Where field title is title with url of pageid and snippet is the description

EDIT: got it

short snow
#

How is this :D

#

What color should the embed be?

#

Green or just the default one or?

short snow
#

sir-lancebot#560 requires another approve 🙃

dusky shoreBOT
vale ibex
#

!remind 6h review sir-lancebot#560

stable mountainBOT
#
Of course!

Your reminder will arrive in 6 hours!

dusky shoreBOT
short snow
#

lemme try blurple for the embed color

#

hmm, whats the color code for it?

patent pivot
#

discsord.Color.blurple

#

or

#

0x7289DA

short snow
#

ok thanks!

#

How does this look?
cc @eternal owl

subtle kraken
#

looks pretty well done to me

short snow
#

I will open a pr for it

#

done 🎉

#

hmm, i forgot to add logging statements

#

what should i use for api problems?

#

which trace level

#

warning?

vale ibex
#

I'd say if its coming from wiki themselves, then info is fine, since we can't do anything about it, so no need to notify devops

#

But a core dev might have a different opinion

cold moon
#

I'd say warning. Then we get notification about it in dev-core chat.

short snow
#

lemme see what other cogs use

#

warning is used

#

so should i switch to log.warning?

cold moon
#

Yes

short snow
#

done 🎉

subtle kraken
#

I don't think warning is of any use there

#

using warning there will probs allow people to spam sentry alerts at us
well actually probs not alerts but warning doesn't sound like good one

#

considering that most likely it will be hitting 404 which is below useful to warn about

short snow
#

those are api errors, people can't spam them to you, until one gets one and starts doing it again and again

subtle kraken
#

well unless we are getting 429 I don't think the error code deserves any better than info

#

and I don't think we can even get 429 there

short snow
#

ahh right, lets just keep it info for all cases, how do i revert, i tried it few times, but it always messes up

subtle kraken
#

actually interesting logging I've seen is using debug on anything that is not 429 and warning on 429 we could perhaps adapt such idea for interacting with most stuff that is not ours

subtle kraken
#

am not sure if we do that already though

#

if we use info elsewhere we can stay with that

subtle kraken
short snow
#

Thanks will have a look at it.

#

should i undo it, or just a new commit

patent pivot
#

git reset HEAD~1 will undo the last commit

#

then you can do git rm ., make your changes to correct and git add .

short snow
#

ok joe, ty

stable mountainBOT
#

@vale ibex

It has arrived!

Here's your reminder: review sir-lancebot#560.
[Jump back to when you created the reminder](#dev-contrib message)

clever wraith
#

@short snow why do you want me to do cycle? wouldn't it be more random and better to use random

vale ibex
#

Is random what we want?

#

I think it would be better to cycle, as it means the same fact can't be repeated often, which would be possible with random

clever wraith
#

ah

#

ok

#

good point

#

i don't get that

vale ibex
#

@gritty wind What were your thoughts about sir-lancebot#597 should I PR it early so we can get them in executors?

vale ibex
clever wraith
vale ibex
#

This is where we usually store things like this.

gritty wind
#

I’m fine with opening it up early if you’re not planning on making large changes to the files you already made

#

I imagine the group util would probably be indpendent

clever wraith
#

ok

vale ibex
#

The only thing that I was planning on doing on top of this was implementing a util to limit concurrency

clever wraith
#

@vale ibex how would I take the colors from constants.py

vale ibex
#

so we could make pfp modifying commands queue up

vale ibex
clever wraith
#

ah

vale ibex
#

then you can do Colours.blue

gritty wind
#

Alright, feel free to open it, but leave a disclaimer at the top

vale ibex
#

I could PR this and raise another issue for the concurrency util

gritty wind
#

Something along the lines of the TODO that you already have

vale ibex
#

👍

gritty wind
#

That could work too if the two PRs don’t depend on each other

vale ibex
#

They don't need to

gritty wind
#

In that case, feel free to get this one merged while you do another PR for the rest of the features

vale ibex
#

Alright, I've updated the comment and marked it ready for review

short snow
#

all except 500 and 200 seem to be of WARNING level

obsidian patio
#

@patent pivot a wild PR has appeared bot#1429

dusky shoreBOT
subtle kraken
short snow
subtle kraken
#

I think info will be fine for time being

#

looks like @dusky shore could use some logging rework

patent pivot
short snow
#

sir-lancebot#600 is ready for review 🙃

dusky shoreBOT
gritty wind
#

Oh I thought the logging questions were for Python

#

Do we even do logging on sir-lance haha

subtle kraken
#

well we should

gritty wind
#

Hmm not really

#

I like logging

subtle kraken
#

there are multiple breaking points that we are unaware of due to lack of logging

#

logging generally is just good practice

gritty wind
#

But sir-lancebot doesn't have logging for the same reasons it doesn't have unittests

subtle kraken
#

but it does have logging pithink

gritty wind
#

I think in general we should stop relying on sir-lancebot for fun features

#

But that's a discussion for later

short snow
#

then what would sir lance be for?

gritty wind
#

just check the logs lol

gritty wind
short snow
#

sir lance is basically a bot with fun commans

#

hmm

subtle kraken
#

we did have like 40 logs in past few hours so

#

¯_(ツ)_/¯

#

frankly logging is crucial in programming rather often and leaving it out so beginners don't know of it does not sound good

gritty wind
#

Equally we had 0 over a 2 hour timeframe yesterday during peak activity

obsidian patio
vocal wolf
#

@celest charm when filtering characters, do we want feedback to include the illegal item passed? Or do we want to just say "Illegal character passed."

celest charm
#

when sanitizing input to a URL?

vocal wolf
#

filtering stuff for the pypi command url

#

ye

#

currently I just have ```py
ILLEGAL_CHARACTERS = re.compile(r"[^a-zA-Z0-9-.]+")

...

if (character := re.match(ILLEGAL_CHARACTERS, package)) is not None:
embed.description = f"Illegal character passed into command: {character}."
await ctx.send(embed=embed)
return

#

Walrus used for now, can be yeeted if we think it's not needed.

gritty wind
#

I think we should have it, otherwise it can be confusing at times

vocal wolf
#

ye

short snow
#

what is this for?

vocal wolf
#

@gritty wind