#dev-contrib

1 messages ยท Page 110 of 1

vale ibex
sleek steppe
#

No access to link ๐Ÿ˜”

vocal wolf
#

ohhhhh

#

@vale ibex yeah that makes sense

sleek steppe
#

I'm fine with that, I'd like getting to 1k additions/deletions

vocal wolf
vale ibex
#

I think we can leave this PR as is and have the others as issues

#

or we can include the tvban part in this pr

vocal wolf
#

@short snow In bot#1564, please make purgeban not take any argument for purge days, but instead take args for time. If time exists, don't permaban.

Please also do the same thing for voiceban, where if a time is supplied, it won't be permanent.

dusky shoreBOT
vale ibex
#

Yea, since we're removing the arg for purge days, just make sure we still use 1 day as a const.

#

We should add this scope to the issue/PR for context

eternal owl
#

will it be possible to make a custom cooldown decorator that applies cooldown based on the command arguments?

sleek steppe
#

Yes

balmy sparrow
#

it looks like wrapping things in ` to make codeblocks is a rather common usecase, maybe we could make a util for it?

sleek steppe
#

I like how the docstring for the SourceConverter on lancebot still has tag in it

brazen charm
balmy sparrow
#

yeah

#

or maybe have it be a general markdown-adding function

sleek steppe
balmy sparrow
#

i saw some places with

strikethrough = "~~"
...
strikethrough + "text" + strikethrough
``` and the such
balmy sparrow
#

or is that not how everyone else thinks?

brazen charm
#

I don't think passing it through an util function instead really helps the readability of the string, do you have an example on how it'd look compared to just doing ```
f"โ€‹`{text}`โ€‹"

balmy sparrow
#

yeah, you're right, it's more readable this way

sleek steppe
gritty wind
#

Remember tests if you're doing converters ๐Ÿ‘€

#

Maybe

sleek steppe
#

Well the checks passed

gritty wind
#

The checks don't enforce tests

#

Just no failing tests

#

not no new tests

sleek steppe
#

Also that's only on bot right

gritty wind
#

Oh I thought this was bot

#

If it's lance just ignore that

sleek steppe
#

Oh lancebot has no tests

balmy sparrow
vocal prairie
#

I think that's a good idea, it would be cleaner

fervent sage
#

i'm good with ^ if a core dev is, considering i made the ping command i'd like to take it on

#

(will make an issue)

patent pivot
#

done

balmy sparrow
#

@fervent sage will it conflict if we merge your PR now before the spring cleaning PR?

fervent sage
#

yep but the conflicts shouldnt be too bad to fix

#

(+ i can fix them myself which im fine with)

stable mountainBOT
#

Pipfile line 13

"async-rediscache[fakeredis]" = "~=0.1.2"```
gritty wind
#

Used to think this format meant optional dependency

#

But I can't find anything about it in the pipenv docs

#

Tbf the pipenv docs are shit

#

Anyone know what it actually means?

vale ibex
#

the [fakeredis] part?

#

Those are optional extras

gritty wind
#

yeah

vale ibex
#

also "~=0.1.2" is wrong

patent pivot
#

yeah it is extra optional deps

gritty wind
#

SO post says extras option for extras

vale ibex
#

it should be "~=0.1"

#

since that's what ~ is for

patent pivot
#

for example, aiohttp has a speedups extra which brings aiodns, cchardet and a few other things

gritty wind
#

Gotcha

#

Thanks guys

tough imp
#

~=0.1 would allow 0.2

vale ibex
#

would it?

tough imp
vale ibex
#

I think I'm misunderstanding then

#

I was under the assumption ~=0.1 would only allow ~=0.1.X

#

IG I was wrong

#

Ahh yes I see now

#

~=0.1 is >=0.1, ==0.*

#

TIL, thanks

tough imp
#

Yea it's "this or higher right-most number"

vale ibex
#

yea

sleek steppe
#

@balmy sparrow I'm not sure about replacing return from with return by

balmy sparrow
#

what's this referring to lemon_sweat

balmy sparrow
#

๐Ÿค” i felt like "returned by" sounded right

#

but english isn't my first language, so maybe I'm wrong there

fervent sage
#

i think returned by fits better too

#

you return from a function, and have a thing returned from a function
the api returns a thing, the thing has been returned by the api

vale ibex
#

My two cents is that only reusable converters should be in there

#

If they're only used in one place, then they're better off in the same tower as the cog

sleek steppe
#

Well I'm pretty sure all lancebot's converters are only used in one place

vale ibex
#

Hmm, I think the destiction should be usable, rather than used

#

Eg a whitelist check or a duration converter makes sense to be a util

#

Whereas something specific to a cog should be with that cog

sleek steppe
#

The ones that I have in converters.py are WrappedMessageConverter, CoordinateConverter, SourceConverter, and DateConverter

vale ibex
#

Those names don't really tell me exactly what they do, but I'm willing to hear other people's opinions on this

#

I'd prefer only convertors that could reasonably be reused by another cog be in that utils folder

#

If those fit into that category then fine ๐Ÿ˜€

fallen patrol
sleek steppe
#

async-rediscache#1

dusky shoreBOT
sleek steppe
#

cool

fallen patrol
#

๐Ÿค”

#

how does that work?

gritty wind
#

Python allows you to set optional dependencies for your modules

stable mountainBOT
#

setup.py lines 37 to 39

extras_require={
    "fakeredis": ["fakeredis[lua]>=1.4.4"],
},```
gritty wind
#

This is useful if you have dependencies that can add functionality, or something similar, but don't need them to always be available

fallen patrol
patent pivot
#

not sure I follow, Sebastiaan maintains async-rediscache

#

ah, you mean how is it detecting it?

gritty wind
#

Oh do you mean how it found that when it isn't on pydis?

#

What joe said

fallen patrol
sleek steppe
#

It was previously on python-discord so it redirects

fallen patrol
#

ahhhh

#

okay

vale ibex
#

@sleek steppe smh, commiting single quotes in a PR

#

that's a paddling ๐Ÿ˜‚

#

Just found it funny since you have that spring clean pr lol

sleek steppe
#

I copied and pasted most of it lol

vale ibex
#

hah yea thought as much

stable mountainBOT
#

bot/exts/evergreen/avatar_modification/avatar_modify.py lines 313 to 314

"""Load the PfpModify cog."""
bot.add_cog(AvatarModify(bot))```
vale ibex
#

lul

#

that's on me

#

actually no, I blame @fervent sage for suggesting a better name

#

it's all vco's fault, yes, that's it

#

๐Ÿ˜„

sleek steppe
#

understandable

vale ibex
#

Hah

#

feel free to clean up my mistake in your PR if you like ๐Ÿ˜›

fervent sage
#

hahaha

sleek steppe
fervent sage
#

youre the one who stole it :P

vale ibex
vocal wolf
#

alright did anything get destroyed while I was asleep?

gritty wind
#

Yeah we're back up to 30 PRs on lance

#

On the bright side, you get to keep your job

vocal wolf
#

Understandable, the day of reckoning is upon us.

#

Would you look at that, it's progress o' clock.

gritty wind
#

@vocal wolf haaai

#

A separate issue was opened for pban

vocal wolf
#

noo!!

gritty wind
#

1566

vocal wolf
thorny obsidian
#

:3c you're welcome. I'm very good at making issues and no contributions

vocal wolf
#

like the creation of them

thorny obsidian
#

Egh, to me "real" contributions are the PRs and Reviews

vocal wolf
#

ah

thorny obsidian
#

Which is also why you should vote no to the thing in the other channel regarding me hyperlemon

vocal wolf
#

then you should totally like, make a tag

#

make a tag, kat

thorny obsidian
#

haha, maybe after my finals

vocal wolf
#

dew it

#

oh! good luck on those

thorny obsidian
#

I'm currently watching my lectures at 2x speed to just even make a real attempt at catching up

vocal wolf
#

sounds like something that I'd do

vocal wolf
#

ty

short snow
# vocal wolf ty

uhh one question, by taking no arguments for purge days, meaning, i just remove that argument?

#

and use 1?

vocal wolf
#

ye

#

@clever wraith Please fix up bot#1558 when you're available.

dusky shoreBOT
short snow
#

flake8 is acting so weird

short snow
#

arghh, the second i edit any line, it would cuz those flake errors

#

and if i reset it origin, it works perfectly

short snow
#

from core dev

#

we can reduce 3 prs down ๐Ÿ™ƒ

#

all of them are short

balmy sparrow
#

testing 645 now

vale ibex
#

Done your suggestion @balmy sparrow ๐Ÿ‘

balmy sparrow
#

thanks :D

#

aren't all the review comments sent by the webhook in #dev-log ?

green oriole
#

Nah, only the first three

balmy sparrow
#

oh makes sense

#

i thought the webhook hates me and selectively sent my stupidest nitpicks >.>

vale ibex
#

Haha, recently I had 3 of my webhooks fail

green oriole
#

Haha

vale ibex
#

I thought it was joe pulling a prank on me

#

but it was just timeouts

balmy sparrow
#

haha

#

totally sounds like a joe thing to do

vale ibex
#

!clos

sleek steppe
#

clos doesn't make sense

vale ibex
#

hmmm the command suggester doesn't catch it

sleek steppe
#

!clos

vale ibex
#

ah lol, just me then

#

yea, that's fine

sleek steppe
#

You're just an admin ๐Ÿ˜›

vale ibex
#

So yea, since the bot already suggests the correct command, don't think its something we want to change

#

if not any(role.id in MODERATION_ROLES for role in ctx.author.roles):

#

yup, looks like mods don't get suggestions

sleek steppe
#

yeah that

short snow
#

looks we are doing lot of reviews

#

xithrus is happy ๐Ÿ™ƒ

clever wraith
#

!clos

#

There we go

#

Hey @fervent sage must say that yeethon is amazing

green oriole
#

You should use off-topic though

fallen patrol
#

yeah

#

wait

#

kinda.

sleek steppe
#

Isn't that a webhook

fallen patrol
#

yes, and your point?

#

Should reimplement it so it does escape markdown except for

green oriole
#

Yes, we can do that

#

Do you guys feel like opening a PR directly?

brazen charm
#

I'm not sure if that's something that's worth it, considering that markdown is commonly used in the threads and is used for quoting

balmy sparrow
#

@vco re: sir-lancebot#722 , what do you think about moving the ping command to the uptime command's file? that way the original author will also show up on the file on github

dusky shoreBOT
sleek steppe
#

Also should resolve the linting errors

#

Maybe the Cog/Extension should be renamed

fallen patrol
#

wow smh @fervent sage linting errors

fervent sage
#

I'm gonna be totally honest, i really dont appreciate how you're talking to me like that, it seems very aggressive

fallen patrol
#

no, sorry, it was meant to be like a ๐Ÿ˜›

fervent sage
fallen patrol
#

do the thing where commits get reversed and then recommit into that file

patent pivot
fervent sage
#

issue 721 iirc

patent pivot
#

oh right, so swapping the order that was done?

fervent sage
#

im not totally sure what you mean?

#

currently there's a commit merging both cogs, but the suggestion is i merge them the other way

patent pivot
#

right yeah

#

so you need to undo the previous commit, make the changes and then force push a new commit

#

git reset HEAD~1 to go back a commit

#

then make changes

#

git commit ... to commit

#

and then git push --force to update the branch

patent pivot
#

yes, you are altering history

fallen patrol
#

mind blowing

fervent sage
#

then there's another issue which is that i did it this way round specifically because it makes more sense for 'uptime' to be in ping than the other way around

patent pivot
#

because we undid the commit with HEAD~1, which is git sugar for HEAD take away 1 commit

sleek steppe
#

git reset HEAD^ VeryCool

fallen patrol
sleek steppe
#

same thing I think

clever wraith
patent pivot
#

hahaha

#

hmmm

fervent sage
#

that should be an otn: "use the git push force"

patent pivot
#

HEAD^ is short for HEAD^1 which seems to differ from HEAD~1 in which commit it selects

#

so you can do HEAD~ as well for ~1

clever wraith
patent pivot
#

you could if you wanted to undo all changes

#

so yeah, --hard on that might help

fervent sage
sleek steppe
clever wraith
#

Ah true

balmy sparrow
fervent sage
balmy sparrow
#

oh oof

fervent sage
#

i tracked down the original commit and commented it in case anyone wanted to look kek

dry folio
#

hey, i have a question regarding https://github.com/python-discord/sir-lancebot/issues/719... even tho it was approved that we add new categories to the quiz command, are we authorized to also change some stuff, fix some flaws and add some dynamic programming? our current code can be found at https://github.com/cat-dev-group/sir-lancebot

GitHub

A Discord bot started as a community project for Hacktoberfest 2018, later evolved to an introductory project for aspiring new developers starting out with open source development. - cat-dev-group/...

vocal prairie
short snow
#

also remember, there is already a pr up on sir-lance which refactors this file, so have a look at it before doing stuff.

dry folio
dry folio
vocal prairie
gritty wind
#

This feels like a good time to say

vocal prairie
#

I agree, the commit messages aren't great

gritty wind
#

These commits are seriously in violation of our guide

#

I will close the PR if these commits are left as is

dry folio
#

oh no

vocal prairie
#

Yes, since those commits get merged

dry folio
#

then i really fricked up, i don't know that

short snow
#

the commits on the fork, will be same as that on the pr

gritty wind
#

No, but are you going to rename all of them before PRing?

dry folio
dry folio
vocal prairie
dry folio
gritty wind
#

These are all from the fork

#

Thanks

dry folio
#

i have this bad feeling

vocal prairie
dry folio
#

that all shit broke down

vocal prairie
#

I didn't mean now now. But whenever you get the chance, it might be best to go back.

gritty wind
#

You don't have to do it immediately, but the sooner the better

#

Definitely before PRing

#

Alright, back to the question on hand

gritty wind
dry folio
#

yay

vocal prairie
#

I'm still confused on this "dynamic" and these "flaws"

gritty wind
#

If the dynamic system refers to like switching numbers in math questions, that sounds cool as long as it works

dry folio
# gritty wind If the dynamic system refers to like switching numbers in math questions, that s...

also, regarding the https://github.com/python-discord/sir-lancebot/pull/618 pr, should we redo everything to make it fit with that?

GitHub

Relevant Issues
Closes #446
Description & Reasoning
The original code was quite big, I broke it down into various parts to keep reading the code simple.

_cog.py contains the main cog i.e. ...

short snow
#

not on current topic, but why is this happening?

#

the test

vocal prairie
dry folio
vocal prairie
#

Maybe take a look at Jason's code, and then see how you can change the code you have right now to make it work. But don't set anything in stone yet, keep in mind that things can change as reviewing goes along.

#

Keep in mind that that's a maybe

gritty wind
#

With all the reviews and what not, that PR is definitely approaching the final stages, so let's not make any huge changes for now

#

This should probably be a different PR as well

#

You can open an issue for that sometime

dry folio
short snow
#

for now, just adding math and science questions shouldn't be a problem

#

you can do the "dynamic" part once it gets merged

#

in a separate pr like scaleios said

dry folio
#

I need to sleep now, i'll make an announcement and close the issue tmr

fallen patrol
#

just wait for the pr with the open issue

short snow
dry spoke
#

What IDE do u guys use for Python

#

lemme know

gritty wind
#

Hey, that's not really relevant to this channel. This channel is for pythondiscord projects.

short snow
#

totally forgot that voice bans have tests too

#

@gritty wind you haven't awaited action here, should i do that in this pr? or it was not done for some reason

gritty wind
#

The action isn't called there

#

it's called by the scheduler

#

Follow the code

short snow
#

ah alright

#

tests were complaining

gritty wind
#

Which tests?

short snow
#

shouldn't it be just action?

gritty wind
#

No

#

The apply_infrac function expects an awaitable

#

it does:

await action```
short snow
#

yeah, just saw that, got it

gritty wind
#

notice the lack of parentheses

#
import asyncio

async def test():
    print("The function")

async def main():
    print("Started main")
    x = test()
    print("called test, but didn't await")
    await asyncio.sleep(2)
    print("slept a bit, still nada. let's await the function now")
    await x
    print("done")


asyncio.run(main())

I can't explain async, so here's a POC that explains the concept

short snow
#

yeah i got that, didn't see the apply_infrac function

#

and in the test below that is was just action, but it was a callable of user.kick already, defined two lines about that

olive cloak
#

we can suggest new features for Sir Lancelot right?

#

what if you could train a model for english and general help just with this discord server?

short snow
#

introducing machine learning to sir lancebot is something we frowned upon from doing so.

#

it introduces unnecessary complexicity

#

and getting human help is much understandable than a bot talking to you

vocal wolf
#

Thank you for the idea, though.

olive cloak
#

ah fair enough, yeah i guess since it would pretty weird if the bot started swearing since it learned it before lol

fervent sage
#

i wouldnt mind automatic help messages for d.py kek

#

but i also have enough experience with ML and GPT-2 to realise what a horrific mess it can turn into lol

short snow
#

lol

vocal wolf
#

Even OpenAI can sometimes just die.

olive cloak
#

lmao, really wanted to learn C++ i guess

vocal wolf
#

lol

patent pivot
#

The exclusion from ML from lancebot or most of our projects isn't because it's risky at all, AI/ML is certainly battle tested. The reason is that it comes with several large dependencies, requires a lot of compute to train and is a big thing to maintain in an area which we don't have many folks familiar with

short snow
#

whoops

cold island
#

lol no worries

short snow
#

for some reason whenever i specify co author, the github actions runs twice

dry folio
#

hey, i have a question:
my lack of experience caused me to write some pretty informal commit messages in one of the forks i was supposed to pr to sir lancebot. however, i've decided to abandon that fork and start over since the structure of the program i'm supposed to modify will soon change completely, rendering my code incompatible. when i open a new fork, i don't need to worry about my last fork, right? so i wouldn't have to re-write the 40 commit messages if i open a new fork after the code changes?

#

this is the kind of msgs im talking about lol

cold island
fallen patrol
#

If you delete the fork, you aren't going to have the commits as well.

#

A different solution would just be to create a new branch from upstream:main

#

you don't need to delete it.

cold island
#

If you didn't open a PR yet, you can also force push changes

#

and it'll override your git history

dry folio
sleek steppe
#

Yeah you could just reset (soft) to the first commit and force push it

dry folio
#

ten hours of hard work, poof

sleek steppe
#

If you aren't on main you could delete the branch

dry folio
cold island
#

If someone is restructuring the file, it might be better to merge your changes first

#

Although those commit message are indeed not great

dry folio
# cold island where is that change?

https://github.com/cat-dev-group/sir-lancebot/blob/main/bot/exts/evergreen/trivia_quiz.py here and here https://github.com/cat-dev-group/sir-lancebot/blob/main/bot/resources/evergreen/trivia_quiz.json, but no one's gonna accept that with those commit msgs... should i go rewrite them all? it'll only take like 2 hours and then i can send a pr...

GitHub

A Discord bot started as a community project for Hacktoberfest 2018, later evolved to an introductory project for aspiring new developers starting out with open source development. - cat-dev-group/...

dry folio
green oriole
#

If you really want to rewrite your commit history, using rebase is a way better choice

cold island
#

Yes, someone will have to adapt either way, but I'm not sure that you having to adapt is the better choice here.

green oriole
#

Rebase is basically an interactive tool allowing you to rwrite your git history, like squashing two commits into one and changing the messages

cold island
#

Either way, conflicts like that should be brought forward before deciding to abandon your work.

green oriole
#

It is part of git itself

dry folio
dry folio
cold island
#

Before that, where is the structure change?

dry folio
balmy sparrow
thorny obsidian
#

I think we can actually delete that, we're not really using it

#

cc: @vocal wolf

cold island
dry folio
#

because 40 commits to rewrite is a little... too much lol

cold island
#

Whatever is convenient for you. As long as the changes in each commit tell the same story (described in the commit message) it works.

dry folio
#

:D

cold island
#

Small commits are fine fwiw

dry folio
cold island
#

But I usually opt for several big ones when I'm writing a feature

dry folio
#

anyways, i'll get to work!

dry folio
eager fable
#

@dry folio I liked your previous nickname "Wait... It's all objects?"

#

It was a good one

dry folio
dry folio
sleek steppe
#

You do

#

sir-lancebot#719

dusky shoreBOT
dry folio
#

would this be considered a "valid" commit message?

sleek steppe
#

Sure

dry folio
fallen patrol
#

I mean

fallen patrol
#

That isn't even a commit message

sleek steppe
#

What is it then

dry folio
fallen patrol
dry folio
#

i mean, it's better than "sciency stuff" lmao

sleek steppe
fallen patrol
#

Oh

cold island
sleek steppe
#

This one? It isn't resolved

cold island
#

I unresolved it

sleek steppe
#

Ah ok

balmy sparrow
#

sir-lancebot#716 can be merged btw

dusky shoreBOT
vale ibex
#

grrr j9 beat me to it lol

sleek steppe
#

Was gonna ping you to merge lol

#

missing a not broke the .mosaic command so I'll make a PR to fix it lol

green oriole
#

Well, it isnโ€™t working

balmy sparrow
#

missed a not there that's my bad

green oriole
#

.mosaic 5

dusky shoreBOT
#
That was a mistake.

Your input was invalid: Squares must be a positive number less than or equal to 10,000.

Usage:.avatar_modify mosaic [squares=16]

thorny obsidian
#

!ext unload mosaic

stable mountainBOT
#

:x: Could not find the extension mosaic.

balmy sparrow
#

yeah, the condition got reversed because i missed a not by the looks of it

fallen patrol
#

.mosaic -5

green oriole
#

Aha

vocal prairie
#

.mosaic 20000 works

green oriole
#

can you send a PR in ?

vocal prairie
#

Just not anything below 10,000

balmy sparrow
#

toxic's on it

thorny obsidian
#

Reminder that all commits should be tested in a PR before approval is given.

sleek steppe
#

I tested it but it wasn't broken for me ๐Ÿค”

fallen patrol
balmy sparrow
#

yeah my bad, was careless

fallen patrol
#

huh

#

is it possible to let people upload a file to be mosiaced?

green oriole
#

We want to avoid user image inputs as much as possible

fallen patrol
#

i mean

#

pfp is basically user input

sleek steppe
green oriole
#

Yes but it is moderated discord wide

vale ibex
sleek steppe
#

You guys saw nothing shhhhhh

cold island
#

@sleek steppe those .mosaic subtitles are ๐Ÿ‘Œ

sleek steppe
#

Ikr lol

#

Can't take credit for it though

thorny obsidian
deft patrol
#

great because it starts from one person and then everyone tests it ๐Ÿ˜„

vale ibex
#

heh it's fun trying to spot it in the usage

thorny obsidian
#

@balmy sparrow gooood call on if it isn't a perfect square you get the next nearest, makes the command much more fun to use

balmy sparrow
#

ahh thanks :D

sleek steppe
#

I feel so proud of that math there verycool ||Definitely didn't copy it ||

balmy sparrow
#

although i'm still so embarrassed about that condition

thorny obsidian
#

haha, it's fiiiine

patent pivot
#

lol wait is that gonna trip the resource limits i wonder

vale ibex
#

nah it's quite far from the limits

#

I cropped the top off on the graph

sleek steppe
#

Doesn't the max_workers=1 allow 1 concurrent image command at a time

patent pivot
#

ahh

#

so that's just the requests

#

that's fie

vocal prairie
#

@vale ibex It's that Lance isn't receiving the USER_UPDATE event

vale ibex
#

yea, I thought fetch_member deals with that, since it's an API request

#

rather than going through the cache

fervent sage
#

hmmm

#

hang on

clever wraith
fervent sage
#

member objects !+ user objects

#

as in

vocal prairie
fervent sage
#

discord.py does something it technically shouldnt, which is make people think that members have things like id, avatar, etc

vale ibex
#

ahhh, so the cache is appending the member extras to the fetch_user call?

fervent sage
#

discord doesnt necessarily send you the member's internal user object tho

clever wraith
#

I thought why I was blocked by api discord... But in fact it turned out to be repl.it... Helped kill 1

fervent sage
#

so the member's user field is filling from cache

vale ibex
#

hmmm

sleek steppe
#

It doesn't update it?

fervent sage
#

fetch_user should work

vale ibex
#

lemme see if we use anything attribs of the member obj

#

We use member.display_name

#

but IG we can just change that to use ctx.member

#

rather than the fetched user

#

I'll make the changes and spin up a bot in the test server

fervent sage
sleek steppe
vale ibex
#

ye, that 1

merry ember
#

Hi, if I have an idea for an "experimental" feature that would be "fun to try", do I submit an issue to sir-lancebot or how do I discuss the possibility of a contribution?

fervent sage
#

you can submit an issue yeah, though we can likely tell you here if its the sort of thing that fits lance

stable mountainBOT
#

discord/member.py line 220

self._user = state.store_user(data['user'])```
fervent sage
#

(after which you can create an issue :P)

merry ember
#

:)

#

I thought og lance since I'm a beginner at contributing but it's possible that the feature is more of a utility than "fun".

#

Basically I want a way to keep track of the help channels I've interacted with in the last x minutes/hour. It may only be an issue for me but I've "lost" several discussions because I forgot which channels I participated in.

sleek steppe
#

I could see if fetch_user makes a difference

vale ibex
#

I'm working on it now

#

i've got it implemented on 8bitify if anyone with access wants to play

merry ember
#

That sounds about it!

fallen patrol
fervent sage
thorny obsidian
#

Yeah, having an easier way to narrow down where you've been helping recently is something that's been requested

#

We're discussing it and possible other solutions at our staff meeting this Sunday

merry ember
#

Can I search in just help channels? It would be neat If iI could get a list and a link to my newest post but that may be a nice to have.

#

Oh sweet, so then it's not only me. :)

thorny obsidian
#

Yeah, discord's search isn't really robust enough if you channel hop enough and have longer convos elsewhere

merry ember
#

Could one request a bot to simply at one whenever something is said in the same conversation?

#

Or DM as I guess the issue was about, sorry, haven't looked through it yet.

thorny obsidian
#

so, let me grab some screenshots of some of the other proposals

#

Those are the other 3 suggestions, each with their pros and cons

merry ember
#

Wow, it's indeed not only a "me" problem, good to hear, and some great suggestions.

thorny obsidian
#

yeah, definitely not only a you problem~

fervent sage
# thorny obsidian

without actually reading the content that sounds really funny to intentionally ghost ping people kek

sleek steppe
#

lol it's a definite no

fervent sage
#

i mean

#

id quite like it myself actually

sleek steppe
#

A new helper wouldn't understand the ghost ping

thorny obsidian
#

All of these are still on the table so-to-speak. Will be a topic of discussion this Sunday and following days.

fervent sage
#

tho i'd rather the ping stays until i click a reaction on it to yeet it, on second thoughts

vocal prairie
#

That could be confusing to the claimer

merry ember
#

That's awesome, thank you for the info, happy to see that things are being done. :)

thorny obsidian
merry ember
#

Well, I'll just have to think of some other "fun" feature then. ^^

#

@thorny obsidian Sorry if I'm being slow but what did I do that was good? ๐Ÿ˜ฌ

fervent sage
#

suggesting new things is good, it helps the community evolve and get better for everyone :P

thorny obsidian
#

come to this channel and make a suggestion!

merry ember
#

Aah! Got it, thanks. :)

thorny obsidian
#

It's something I value, if members of the community feel comfortable enough to suggest improvements that's typically a good sign

merry ember
#

I mean, I was nervous about it, because well, new experience. But the contribution guidelines feel very friendly so decided to give it a go.

merry ember
#

It basically says don't hesitate to ask, so then I banked on people actually expecting questions. :)

#

So yeah, good work with those.

vale ibex
sleek steppe
#

I wonder how to test this

#

I'll just use a bot account

fervent sage
#

step 1: get a large guild

vale ibex
#

use a command, change your pfp and then use the same command

short snow
vale ibex
#

make sure you don't have member intent enabled

#

peeps in the test server feel free to use my bot, ill leave it on

fervent sage
#

chriiiiisssss :)

crashfile-detector#1

dusky shoreBOT
fervent sage
#

:P

vale ibex
#

hah it's a bit pointless now though

short snow
#

New project ๐Ÿ‘€

vale ibex
#

since it's been fixed upstream

#

chromium have pushed a fix

short snow
#

I am late, it started 4 days ago lemon_pensive

fervent sage
#

hasnt been fixed downstream yetโ„ข๏ธ

vale ibex
#

and discord will be backporting it soon

#

hah yea

#

was fun to pull together though

short snow
#

We didnโ€™t change the mosaic command ๐Ÿ˜”

balmy sparrow
#

what's this referring to?

short snow
#

My comment on the pr

#

On the main pr adding the command

balmy sparrow
#

about the color?

sleek steppe
#

wait nvm

#

I thought blue was fine

balmy sparrow
#

same, blue looked good

thorny obsidian
#

The color of the embed is not critical and fine. Changes requested should be made with more reasoning than "I don't like the color"

short snow
#

I was saying it to use the same colour as 8bit

#

And yeah it was a very optional one, got no comment, so thought it got skipped

sleek steppe
#

well*

fallen patrol
#

ohh

#

crashfile-detector#1 is the crash discord file detector

dusky shoreBOT
fallen patrol
#

got it

fallen patrol
#

its happened multiple times

vale ibex
#

see my comments after that message

#

the bug that caused it has been fixed in chromium now, and will be backported into Discord soon

fallen patrol
#

I did

vale ibex
#

so we won't need something like this

fallen patrol
#

but it has happened before

#

unless they fixed it an additional time as well

sleek steppe
vale ibex
#

nah, we're still not certain if we want to include it in our infra

#

so it's not really something we're actually working on

fallen patrol
#

another thing about it

vale ibex
#

more of a proof of concept

fallen patrol
#

yeah

#

just that

#

nothing more

#

since it should use head unless that doens't work then it should get

#

because a smart person could skip this by not implementing head requests

vale ibex
#

it's using head as we're only pulling headers

#

to ensure we don't pull large files

fallen patrol
#

idc you can make an endpoint that blocks head requests

#

which means that it wouldn't work

patent pivot
#

again, PoC lol

vale ibex
#

Yea, and exactly what we'd do in that circumstance is unknown

#

like we could block by default

sleek steppe
#

I'm gonna fix some merge conflicts on spring-cleanup now ๐Ÿ˜”

patent pivot
#

this is based on a gist that I wrote recently and we've stuck it in a fastapi app, we're going to talk about how/whether we're going to use it in a staff meeting at some point

sleek steppe
#

Oh I'm surprised there's only one conflict

vale ibex
fervent sage
#

huh nice

patent pivot
fervent sage
#

on the one hand, i have no money

#

on the other hand:

#

i kinda need it ๐Ÿ˜…

patent pivot
#

lmfao

sleek steppe
#

Do we only use """ for multiline docstrings?

thorny obsidian
#

probs not if I had to guess

sleek steppe
dry folio
#

linting is VERY slow... is this normal?

#

lint passed yay

patent pivot
#

hmmmmm

#

how slow?

dry folio
patent pivot
#

interesting

dry folio
patent pivot
#

which PR?

#

sir-lancebot#726?

dry folio
patent pivot
dry folio
# patent pivot

the last one took 2 mins, this one was after i merged the new updates into this branch (sorry i didn't specify that)

patent pivot
#

interesting

vale ibex
#

looks like it refreshed the dep cache

patent pivot
#

yeah

sleek steppe
#
image = next(
    (
        url for url in data["image_list"]
        if url.endswith(self.valid_image_extensions)
    ), emoji
)

Does this look fine lol

vale ibex
#

It shouldn't happen often, since the cache is normally used

dry folio
sleek steppe
#

The ones on bot take longer than that lol because of the tests an generating coverage reports

vale ibex
#
_iter = (
    url
    for url in data["image_list"]
    if url.endswith(self.valid_image_extensions)
)
image = next(_iter, emoji)
#

hmmm

#

not sure which looks better

sleek steppe
#

I'll use that one, thanks

fallen patrol
vale ibex
#

What makes you think it isn't?

patent pivot
#

lol

cold island
vale ibex
#

I'm genuinely curious, since I wrote that in discord's editor, so it could very well be wrong ๐Ÿ˜‚

sleek steppe
#

Yeah I included it in my commit

merry ember
#

Hi, I got Sir Lancebot up and running locally and when I ran the .help command the "navigation" disappeared after a while so I didn't have time to read through all the pages. I just tested on the actual bot and it's the same. Is this the expected/necessary behaviour or is there room for improvement?

sleek steppe
#

It eventually times out and removes the reactions

vocal wolf
#

oh, I see

#

yeah this isn't used at all

#

Closed project, we can always open it back up if need be

merry ember
#

Ah, I figured as much.

vocal wolf
#

although I don't think that will be necessary

patent pivot
#

cheers for the QoL fixes @clever wraith

clever wraith
#

Ay, was hesitant on the extensions one since it was pretty nitpicky although I wonder if i should've iust gone with !raw's approach of adding zero width characters instead of escaping all markdown

fervent sage
#

bot#1571 and bot#1572

clever wraith
#

The first one, yeah

sleek steppe
clever wraith
#

Not really, code blocks were the only problem

#

I'll try the zero width approach

short snow
green oriole
#

Honestly I think I have 20 tests failing locally but not inside the CI, sooooo

cold island
#

I can't see the changes you make locally

short snow
cold island
short snow
#

that's what is followed in all tests of incidents, so i followed the pattern it is not needed, dunno how it got added into mine

cold island
#

I'm genuinely asking, I suck at unittests

cold island
#

@green oriole can you explain to me the downside of using channel.history in your PR? it just seems much simpler and cleaner

#

We have like a max 10 messages in that channel anyway

green oriole
#

Well I just avoid fetching one too many message

#

Manually breaking would just add more code

cold island
#

Add? Not really. You'll ditch the suppress and the multi-line next

green oriole
#

That's almost the same idea as doing it manually

short snow
#

one second, messed up commits, will fix it

cold island
#

It's the same idea, it's just less readable

green oriole
#

Is it less readable? I could add a more in-depth comment

short snow
cold island
# green oriole Is it less readable? I could add a more in-depth comment

I think

async for new_message in message.channel.history(before=message.created_at):
    if messages[-1].created_at - new_message.created_at > timedelta(seconds=2):
        break
    messages.append(new_message)

Looks much clearer than:

with contextlib.suppress(NoMoreItems):
    while True:
        new_message = await message.channel.history(  # noqa: B305 - yes flake8, .next() is a thing here.
            before=messages[-1].created_at,
            after=messages[-1].created_at - timedelta(seconds=2)
        ).next()
        messages.append(new_message)
#

This combination of suppress, infinite loop, and creating an iterator in a loop for a single next just seems like a code smell tbh

#

Especially when an async for is an adequate replacement

green oriole
cold island
green oriole
#

If there is no message I'm pretty sure it, I'll raise NoMoreItems

cold island
#

Shouldn't that just stop the loop? like StopIteration stops a for loop

#

Wait no

#

That's not what history does

#

it'll just return an empty set of messages and the loop will end pretty sure

green oriole
#

Hmmm

#

I'll test later today

cold island
#

tnx

merry ember
#

Hi, I'm setting up my test server to work with bot (already have invited and successfully ran sir-lancebot) and am struggling with the configs. I don't fully understand which channels, categories etc my server needs. Can someone post a screenshot of their working test server or is there some other way I can get "confirmation" that I've got the things set up right?

vocal prairie
merry ember
#

@vocal prairie Python, Lancebot already works. I'm in the middle of setting up Python and find the setup somewhat challenging.

vocal prairie
#

In your config.yml, change these sections

style.emojis
guild.categories
guild.channels
guild.roles
guild.webhooks

sleek steppe
#

Did you use the template?

vocal prairie
#

discord.new/zmHtscpYN9E3 is the template that helps

merry ember
#

I've been trying to get the template but didn't catch the part where it opens in Discord. I've just been forwarded to discord.com/channels/@me in the browser. In my defence I'm on a 14" laptop and everything is a bit of a mess... ๐Ÿ˜ฌ

#

Well then, that worked, thank you!

vocal prairie
#

๐Ÿ‘

merry ember
#

A few more issues; There are two "video" roles (green and grey) in the template, which id do I add to configs and does it matter? I can't find roles for project_leads and domain_leads. Do I create these and are there some specific permissions etc these need?

gritty wind
#

You donโ€™t need to add everything in the config

#

Follow the guide on the website as it has all the sections you need

merry ember
#

Thatโ€™s a relief ๐Ÿ™ƒ

gritty wind
#

If in doubt, guess

merry ember
#

Iโ€™ve been doing that though, and it says to look in config for the sections to set up

#

How do I deal with webhooks? Can I ignore them in config or should I create them and guess the channel they should post in?

gritty wind
#

You donโ€™t need to create anything if you use the template

#

Everything is created for you

#

The only thing you need to manually add is the trash can emoji

merry ember
#

Ok, there are no webhooks in my server using the template so I just ignore those in config?

vale ibex
#

Yea, my dotenv just looks like this ```
BOT_TOKEN=
BOT_GUILD=476190141161930753

USE_FAKEREDIS=true
REDIS_HOST=redis
BOT_DEBUG=true
PREFIX=&

AOC_ROLE_ID=651730380898041862
BOT_ADMIN_ROLE_ID=476190234653229056
LOVEFEST_ROLE_ID=795910065424171028
ROLE_HELPERS=476190429960732672

AOC_CHANNEL_ID=476190141161930755
AOC_COMMANDS_CHANNEL_ID=476196062214750219
CHANNEL_ANNOUNCEMENTS=476196024512413698
CHANNEL_COMMUNITY_BOT_COMMANDS=476196062214750219
CHANNEL_DEVLOG=476196115432210443

gritty wind
#

This is for @stable mountain

vale ibex
#

ohhhh

#

nvm then lul

gritty wind
#

This is strange because my server definitely had the webhooks

#

Anyways, skip them for now, add them later if the bot doesn't start

merry ember
#

Iโ€™m just not very good at this. ๐Ÿ˜ฌ

sleek steppe
#

It can start without it

merry ember
#

But I got Lancebot up and running, yay. ๐Ÿ™ƒ

#

This is indeed a more intermediate levelled challenge.

short snow
merry ember
#

How do I know which channel they post in, or do I just guess?

short snow
#

Post what?

merry ember
#

Webhooks post in a specific channel?

gritty wind
#

The channel doesn't matter, and the bot starts fine without them. You can add the IDs as you need them

merry ember
#

Excellent, thank you!

short snow
#

Are u setting up bot and Lance?

merry ember
#

Yes, thatโ€™s the plan.

short snow
#

Oh ok, running with docker or pipenv?

merry ember
#

Havenโ€™t used Docker yet, just installed it but got Lance running with pipenv.

#

Iโ€™m on Unbutu 20.4 via WSL2

short snow
#

Yeah Lance is pretty simple to run, bot is where the challenge comes ๐Ÿ™ƒ

merry ember
#

Mmhm

short snow
#

That OS doesnโ€™t matter, until u are on windows

merry ember
#

Haha, I mean, I am on Windows but not more than I can help. :)

vocal prairie
#

Docker is easier for bot imo

#

Since bot has a database and stuff, that can be hard to set up

short snow
#

But, slower and more resource taking, in my case

merry ember
#

Thatโ€™s what I started to realise, hence my downloading Docker desktop.

vocal prairie
#

It works well enough on my 4 gig ram computer

merry ember
#

Wow

short snow
#

I run site with pipenv and then run bot with pipenv, so works well

#

Yeah same, 4 gig ram here

merry ember
#

I havenโ€™t started to look at site yet, maybe I should? Do I need it for running the bot? I just updated my hosts file but am still in the config step. Havenโ€™t attempted to run yet.

gritty wind
#

You need it running, but you can use the docker compose for that

short snow
#

Yeah, site contains the api, which is needed for the bot

#

There are plans to separate tho, and it is a work in progress

merry ember
#

Oh, definitely Docker then...

short snow
#

I run it normally without docker, never went through a problem

patent pivot
#

It's no problem to run locally, but docker is certainly simpler considering it provisions postgres

#

Also if you want to be pedantic it's closer to the production environment

merry ember
#

Iโ€™m rather new to Docker so this should be an excellent opportunity to get familiar with it.

patent pivot
#

๐Ÿ’ช

merry ember
#

So technically, if I use Docker, I only need the BOT_TOKEN in .env?

gritty wind
#

Yeah BOT_TOKEN

#

and the site token

#

BOT_API_KEY=badbot13m0n8f570f942013fc818f234916ca531

merry ember
#

But thatโ€™s set by Docker?

vocal prairie
#

No

#

That's in the .env file

gritty wind
#

It is set in the docker-compose

#

But I assumed you are running the site using docker, and the app using pipenv

vocal prairie
gritty wind
#

I do something similar so I can use my IDE's debugger

short snow
#

If u run with or without it, u only need token and bot api key

gritty wind
#

api key is set in the docker-compose, so if you do a full docker-compose setup, you technically only need the token

merry ember
#

That was probably what I meant. :)

dry folio
placid ermine
vocal prairie
#

The forms frontend is really nice.

#

Whoever worked on that, you did a wonderful job!

patent pivot
#

hmmm @vale ibex what does local dev of the metabase cog look like

#

if not configured will this just error out when the DNS lookup fails?

vale ibex
#

I've made it so that it you don't give the username and pass env var, the cog won't load

#

If you give them, but don't change the url, then it'll error out on dns ye

patent pivot
#

ahhh I missed that

patent pivot
#

@vale ibex thonk

vale ibex
#

Oh yea lol

#

That was so that the link wasn't sent in the test server

#

Didn't want to leak anything

#

Probs should have removed / mentioned that lol

patent pivot
#

lmfao

fallen patrol
patent pivot
#

from bot#1573

dusky shoreBOT
clever wraith
#

for .mosaic, i think a cool parameter is to mosaic other peoples avatars

#

.mosaic <number of squares> <optional user tag>

fallen patrol
#

i wish but

#

p r i v a c y

short snow
#

We need to bump license year of bot

brazen charm
#

It was already discussed and deemed unnecessary

short snow
#

because?

brazen charm
short snow
#

ahh okay, thanks

green oriole
#

This is an obscure PR bot#1573 pithink what does it even do? Does it just upload the data from metabase to a pastebin ?

dusky shoreBOT
vale ibex
#

Hah sorry, this was discussed in admins

#

1 sec

short snow
green oriole
#

Done

deft patrol
#

Noice ๐Ÿ˜€

merry ember
#

Hi, Iโ€™m trying to run Python bot with Docker on WSL2 Ubuntu but canโ€™t connect to Redis. Iโ€™ve used both use_fakeredis=true and USE_FAKEREDIS=true in .env with the same result.

bot_1       |     for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
bot_1       | socket.gaierror: [Errno -2] Name or service not known
bot_1       | 2021-05-09 14:01:43 | bot | CRITICAL | Could not connect to Redis. Is it running?```
short snow
#

Yeah, I came across that problem too when I set it up, could u share your config?

merry ember
#

Just a sec

#

So I just changed use_fakeredis to true in config.yml and have a new issue instead, yay.

    redis:
        host:  "redis.default.svc.cluster.local"
        password: !ENV "REDIS_PASSWORD"
        port:  6379
        use_fakeredis: true
``` Or do you need to see the whole config file?
short snow
#

Even the section with site URLs

#

whatโ€™s the new issue?

merry ember
#

Ah, because that's my new issue, now it can't connect to the site API.

short snow
#

what's the schema set to?

merry ember
#
2021-05-09 15:31:29 | bot | CRITICAL | Could not connect to site API. Is it running?```
```yml

urls:
    # PyDis site vars
    connect_max_retries:       3
    connect_cooldown:          5
    site:        &DOMAIN       "pythondiscord.local"
    site_api:    &API          "api.pythondiscord.local"
    site_api_schema:           "http://"
    site_paste:  &PASTE  !JOIN ["paste.", *DOMAIN]
    site_schema: &SCHEMA       "http://"
    site_staff:  &STAFF  !JOIN ["staff.", *DOMAIN]

    paste_service:                      !JOIN [*SCHEMA, *PASTE, "/{key}"]
    site_logs_view:                     !JOIN [*SCHEMA, *STAFF, "/bot/logs"]

    # Snekbox
    snekbox_eval_api: "http://snekbox.default.svc.cluster.local/eval"

    # Discord API URLs
    discord_api:        &DISCORD_API "https://discordapp.com/api/v7/"
    discord_invite_api: !JOIN [*DISCORD_API, "invites"]

    # Misc URLsw
    bot_avatar:      "https://raw.githubusercontent.com/python-discord/branding/main/logos/logo_circle/logo_circle.png"
    github_bot_repo: "https://github.com/python-discord/bot"
short snow
#

It should be web:8000 for docker iirc

#

See the contribution guide on site

merry ember
#

I've been doing nothing but looking at that for two days but I started out without Docker so I guess I forgot to change again once I decided to use it.

short snow
#

Ah ok ๐Ÿ‘

merry ember
#

Thank you for pointing that out, here we go again...

#

OMG thank you!

#

It finally connected, I was so close but had forgotten about changing config for Docker... Really appreciate the help.

short snow
#

No problem lemon_pleased

merry ember
#

Wow I'm silly, it even says to change it in the config file, I guess I went for .env since it's in the environment variables section, just like the guide for Lance.

brazen charm
#

I believe I also had a test failing locally previously, you can just ignore it if it's not related to the code you're wowrking with

merry ember
#

I've yet to get to working on some code, getting it up and running has been an adventure on its own. But that feels comforting, I guess I can try and "do something" and see if I can get a test to pass.

brazen charm
#

I didn't really look into why it didn't work

merry ember
#

@brazen charm Did you too run the bot in Docker?

brazen charm
#

No, I run it directly

merry ember
#

Ah, so then it's not necessarily a Docker issue.

vale ibex
#

Congrats @fervent sage ! ๐Ÿ˜„

fervent sage
vocal prairie
#

Congrats @fervent sage!

sleek steppe
#

Welcome to the green team! shipit

short snow
#

Congrats @sleek steppe @fervent sage

fervent sage
short snow
stable mountainBOT
#

Hey @merry ember!

Uh-oh! It looks like your message got zapped by our spam filter. We currently don't allow .txt attachments, so here are some tips to help you travel safely:

โ€ข If you attempted to send a message longer than 2000 characters, try shortening your message to fit within the character limit or use a pasting service (see below)

โ€ข If you tried to show someone your code, you can use codeblocks
(run !code-blocks in #bot-commands for more information) or use a pasting service like:

https://paste.pythondiscord.com

merry ember
short snow
#

Hmm, remove -v

#

And then run and show the output

merry ember
#

That was just to get the names of the failing tests but I'll run again. ๐Ÿ‘

short snow
#

Yeah, I wanted the details

merry ember
#

Oh, i asked if you wanted the trace backs in the first message but think it got lost since I couldn't post it..

#

Do you want the trace backs for a new run?

short snow
#

Yeah would be good

#

I may leave in 5min, need to catch a bus ๐ŸšŽ

merry ember
#

I'll probably take a break soon anyway, thank you again for your help today.

gritty wind
#

try changing the perms of the log folder

short snow
#

sudo rm -r logs/ && mkdir logs && touch logs/bot.log seems to fix this

#

Stel had the same issue earlier

#

Had used this and it had fixed it

merry ember
#

OMG thank you again, it works!

#

Well, almost anyway..

short snow
#

Lol go on..

merry ember
gritty wind
#

Those are just warning

#

tests passed

short snow
#

You can ignore that

merry ember
#

Woho

#

Wow, I never thought I would get stuff to work.

#

And this is just on the PC, I have a Mac too... ๐Ÿ™ƒ

short snow
#

Lol, it is indeed bumpy, once u get into contributing to bot, I am sure u will switch to pipenv

#

Just do the same steps, will work out

merry ember
#

I think for now this will be my dedicated bot machine..

#

Is it preferable to run with pipenv? I was afraid to use Docker but now I'm more afraid to set it up with pipenv.

vocal prairie
#

Docker is pretty easy

#

Just set up configuration, and run docker-compose up bot

merry ember
#

It works with Docker, finally, I was just wondering whether I should try to get it to work with pipenv too.

vocal prairie
#

Why use pipenv if you can use Docker?

merry ember
#

I don't know, that's my question... I think @short snow hinted that that would be a good thing to do.

fervent sage
#

because docker comes with more overhead and slower restarts

vocal prairie
#

But that's not that bad

merry ember
#

Personally I would prefer to run it locally, feels like I have more control, but given that I don't know what I'm doing, Docker is fine.

gritty wind
#

I run locally because it allows me to run through my IDE, and my debugger

#

But do whatever works for you

short snow
vocal prairie
#

True

#

It's better for prod unless you set it up with a multi-stage dockerfile. Then it's better (at least for my personal projects)

short snow
#

Running two pipenv run start (site and bot) is faster than running docker, imo

gritty wind
#

You may have special circumstances, but most people I've helped set up the bot, and me, have the containers up in seconds

#

You don't have to convince anyone though

#

Ultimately, it comes down to preference

short snow
#

Umm, it is up in seconds, but I still feel pipenv is faster, yeah personal preference

gritty wind
#

As long as your code is fine, no one cares how you run

vocal prairie
#

There's a planned migration to poetry for Lancebot, right?

short snow
#

Yeah

gritty wind
#

There's already a PR opened for it

#

The reason it's pending is it's a 3.9 migration as well

#

that is waiting on one dependency

short snow
#

Joe shipit

gritty wind
#

I've PRed the 3.9 dependency a couple days ago

#

it should be updated on pypi soon

#

Then I've got a PR ready for bot as well

short snow
#

Pr link?

gritty wind
short snow
#

Wonderful

merry ember
gritty wind
#

Nah, you can take any approved issue

#

Just leave a comment

short snow
#

There are many already open

#

Choose the unassigned ones

gritty wind
#

The good first issue are usually issues that are easier for getting started

#

but they aren't required

merry ember
#

I've been "doing" OS before, but not on a "real" project so am a little fuzzy on the procedure.

gritty wind
#

Have a look through this page

#

If you see an issue without the s: planning tag, and want to take it

#

Leave a comment

#

You'll get assigned if there are no problems

merry ember
#

Ah, without the Assignee?

short snow
#

Yep

gritty wind
#

no, the yellow tag that says "assigned"

#

oh, assigned

#

not planning

#

yeah

merry ember
#

I mean an issue that isn't in planning and doesn't have an assignee?

gritty wind
#

If something is assigned, you could ask the author to collab on it, but that's up to them

#

yeah

merry ember
#

Ah

fervent sage
#

i lost my config file for bot

blob_pain

gritty wind
#

We have one on notion for the staff server

fervent sage
#

oh yeah the staff server exists i definitely rememberd that

gritty wind
#

personally don't use it for development

#

don't need everyone seeing how good a programmer I am

fervent sage
merry ember
#

How can I add the proper emojis to my test server?

gritty wind
#

You just need a trashcan

#

it can be any image

merry ember
#

Ok

green oriole
#

Alright, it is working now

def partition_text(string: str, max_chars: int) -> List[str]:
    """Return partitions of string with less than max_chars characters."""
    if len(string) == 0:
        raise ValueError("String cannot be empty")

    partitions = []
    index = 0
    done = False

    while not done:
        partition_start = index

        while not done:
            start_index = index

            while True:
                if index >= len(string):
                    done = True
                    break

                if string[index] in BREAKABLE_CHARACTER:
                    index += 1
                    while string[index] in BREAKABLE_CHARACTER:
                        index += 1

                    break

                index += 1

            if index - start_index > max_chars:
                raise ValueError(f"Word {string[start_index:index]!r} is larger than max_chars ({max_chars})")

            if index - partition_start > max_chars:
                index = start_index
                break

        partitions.append(string[partition_start:index])

    return partitions
#

I guess once commented it shouldn't be that bad? It is probably more readable already

cold island
#

Eeeh, I'd like to try and get the current implementation to work first

#

so give me a bit

whole forge
#

3 nested while loops Sweat

cold island
#

Yeah I'd rather exhaust other options before opting for this

whole forge
#

so whats the goal? just split a long string into a list of strings broken up on a break character?

green oriole
whole forge
#

hm, but what? if its basically that why not use that?

cold island
#

I'm not sure

whole forge
#

im guessing its the BREAKABLE_CHARACTER that makes it incompatible with wrap

green oriole
#

Gotta run

cold island
#

I'll give you an update if I figure something out

fervent sage
#

pain:

yaml.scanner.ScannerError: while scanning for the next token
found character '\t' that cannot start any token
  in "config.yml", line 281, column 1
#

everything was going so well until it wasnt kek

vale ibex
#

oh yea, I had that

#

there's a tab mixed in on that line

fervent sage
#

ive updated it to be spaces on notion

merry ember
#

Hello again... Running bot tests goes splendidly, but it seems like the fix I did to run the tests now has broken running the bot...


ERROR: for bot  Cannot start service bot: OCI runtime create failed: container_linux.go:367: starting container process caused: process_linux.go:495: container init caused: rootfs_linux.go:60: mounting "/run/desktop/mnt/host/wsl/docker-desktop-bind-mounts/Ubuntu-20.04/8925b0b7a1cb21fef2aea7d49c967f40547df4b488732886b5221703b6c28c1e" to rootfs at "/var/lib/docker/overlay2/030f3260f6d15a90093897c6ed603b98fdd514a97664f139cb4aad31f59da22c/merged/bot/logs" caused: no such file or directory: unknown
ERROR: Encountered errors while bringing up the project.```
gritty wind
#

remove the container and rebuild it

merry ember
#

Will do

gritty wind
#

also do a volume prune

merry ember
#

A what?

gritty wind
#

it's a command

#

docker volume prune

#

It'll remove any unused volumes

#

do that after removing the container

merry ember
#

Thank you, both bot and tests run now. ๐Ÿ™

gritty wind
#

Glad to hear that

#

Any issues catch your eye yet?

merry ember
#

I've just started looking, I don't know if I'm ready considering the pain it was just to get the thing working...

#

I just added the trash can, got a bit side tracked and then noticed that the bot wouldn't run, again.

#

Yay, my trash can is working and I'm so happy. ๐Ÿฅฒ

fervent sage
gritty wind
#

Ping doesn't work locally

vocal prairie
#

Nice bot name

gritty wind
#

I have an issue opened for that

fervent sage
#

ah

#

well the main point was to see if the bot was really alive which it thankfully is

gritty wind
#

hmm

#

I'm nor working on anything

#

I could fix that

cold island
merry ember
#

How do I tell Lance the trash can emoji ID? Don't say I've missed this too in the instructions...

gritty wind
#

\:emoji_name: will spit out the ID

merry ember
#

I know, but where do I "set it"?

#

I works for bot, which is awesome, but I suspect Lance also needs to know about it.

gritty wind
#

TRASHCAN_EMOJI