#dev-contrib

1 messages · Page 81 of 1

gritty wind
#

lol too slow 😛

short snow
#

!remind 13h Debug sir-lancebot issue 564

stable mountainBOT
#
No problem.

Your reminder will arrive in 13 hours!

short snow
gritty wind
#

Yeah its a cache thing

short snow
#

or intents

gritty wind
#

Yes, cache is failing because of intents

#

Just remove the features

timid sentinel
#

Can't we just require a user id to be entered

short snow
#

so jsut making sure it takes a user, can fix it right?

gritty wind
#

Yes, that's what I'm asking for in the issue if it isn't clear

#

Yes

short snow
#

i didn't read it yet

#

ok, then it is a quick fix

#

i will do it now

stable mountainBOT
#
Bad argument

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

short snow
#

!remind edit time 1398 1h

stable mountainBOT
#
Aye aye, cap'n!

That reminder has been edited successfully!

gritty wind
#

can't you also edit it without the time

short snow
#

dunno, lemme see

gritty wind
#

nah

short snow
#

nope

#

@gritty wind should i reduce the cooldown?

gritty wind
#

What cool down?

short snow
#

the bemyvalentine command cooldown

#

and should i add lemon_hearteyes to emojis?

gritty wind
#

Uhh, keep it to what the issue is asking for atm, I'll check in with other coredevs

short snow
#

ok, but of them are just small changes so thought could include them with this

gritty wind
#

If you want to do that, you'll have to wait for those things to be discussed

short snow
#

ok

gritty wind
#

I'd prefer you close this issue now, so we don't keep spamming people

#

We can open another issue for the other suggestions afterwards

short snow
#

ok

green oriole
#

No member intends I think

short snow
#

hmm, then we would need to remove that, lemme enable them and test

short snow
#

i had intents on when it failed

gritty wind
#

Did you add them to the bot init?

short snow
#

add what?

gritty wind
#

You have to tell d.py you want to use the members intents

#

Also, if you are going through function-by-function to find the ones that break, well... it might be quicker to do a search through the valentines folder for the things that are listed in the docs

short snow
#

i went function-by-function

gritty wind
#

The thing with that approach is

#

Some things only break sometimes

short snow
#

ok so in the secret, the problem is with intents, so what should i do?

gritty wind
#

Remove the feature

#

Remove anything that requires the member intents to work

short snow
#

ok

gritty wind
#

If something can be restructured to not use them, such as taking a user, do that

short snow
#

tata bye bye secret 😭

#

it can be done on the channels but not dms

#

should i do that?

gritty wind
#

Wdym?

short snow
gritty wind
#

I don't see how that has to do with DMs 🤔

#

Also, looking through the secret code, it should work even without the intents

short snow
#

the member is not found on dms with member.intents= false

#

i will try again

gritty wind
#

Right, I see

#

Can IDs be found

short snow
#

nope doesn't

gritty wind
#

Then just disable them in DMs

short snow
#

ok

gritty wind
#

One thing you can do to maintain the whole secret vibe

#

Is to delete the invocation command

short snow
#

nice, will do that

#

done! 🎉 , time for linting and improving

#

i found another unknown issue while working with this now

gritty wind
#

Yeah?

short snow
#

yeah, on issue map

#
    message.channel.category.id in WHITELISTED_CATEGORIES
AttributeError: 'DMChannel' object has no attribute 'category'
stable mountainBOT
#

@short snow

It has arrived!

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

gritty wind
#

Hmm we probably should've gotten you assigned

short snow
#

oh shit

gritty wind
#

Hey @vale ibex, @short snow was already working on a fix, we just didn't get him assigned

short snow
#

my bad, next time will comment on the pr

vale ibex
gritty wind
#

Sorry for the confusion, but I'd still appreciate you reviewing it if you're interested

#

From coredev discussions, the general consensuses was if a feature needed the intents, remove it

#

If it could be modified to work without them (such as taking a user), that's preferred

short snow
gritty wind
#

Fwiw, the reasoning header in PRs is usually not why the issue happens, or why it is being fixed (that all goes on the actual issue), but why you chose the specific solution

#

Not just in our repos, but in general

#

Hey it seems you've gotten the be_my_valentine file, but not the rest of the valentine cog

vale ibex
#

AH right, so is this PR just removing the features?

gritty wind
#

Did you have an alternate suggestion?

short snow
#

It doesn’t remove

#

it implements it differntly

vale ibex
#

Yea, that's what I was going to look into yea, rather than remove it 🙂

#

Nice job @short snow

short snow
#

Without iceman couldn’t do it, for getting 100 of dms and pings 🙂

#

in the other cogs if u find any issues let me know (of valentine)

#

ik of .love command

gritty wind
#

Love calculator tries to get staff

vale ibex
#

I think it just picks 1 staff at random on startup and always uses them

short snow
#

Ok love calc has, yeah

vale ibex
#

which is why @ashen isle was getting a lot of love yesterday

ashen isle
#

❤️

short snow
#

Only those three have issues

vale ibex
#

I'm planning on looking through lancebot tonight to see if there are any other cogs that rely on the intent

short snow
#

Alright, awesome!

vale ibex
#

I think AoC might

#

I'll be raising issues anyway

gritty wind
#

Lets keep it to valentine for now so we can get it fixed

#

Please do

short snow
#

Yeah, am keeping it those three

vale ibex
#

Yea agreed. limit the scope of now, I'll raise seperate issues

short snow
#

(love calc, love, bemy...)

#

Is vester still working on lemon beardify and wiki fuess game?

#

since i think they were complete

gritty wind
#

Complete as in awaiting review, or already reviewed?

green oriole
short snow
#

thanks chris! will have a look at your pr and mention the changes

obsidian patio
#

@short snow as for the wiki game, I’ve been too busy and I’m opening that up to anyone else who’s interested in working on it

#

I have a working solution for the beardify command, but the command isn’t pythonic enough and isn’t optimized to something that I’d like to add to a bot. Hopefully, I’ll be able to finish that some day in the coming months, but I am planning to write a library with some features that would make the process much smoother. Hopefully, I’ll find the time for that

short snow
#

Ah ok

#

Congo @gritty wind

#

🎉 🎉

gritty wind
#

Ah, thank you :)

short snow
#

ok fixed all valentine cogs.

short snow
#

@eternal owl why are u assigned to sir-lancebot#575 ?

dusky shoreBOT
eternal owl
short snow
#

oh, then shouldn't that be request a review?

eternal owl
#

I think, yes

short snow
#

@surreal venture Mentioned the requested changes 🙂

surreal venture
#

Error: Error: error: You must be logged in to the server (the server has asked for the client to provide credentials)

short snow
#

weeehooooo, cht.sh is merged!!! 🎉

#

hmmm, lemme see

#

it is regarding the build and push, so probably the devops or coredevs know what is happening

#

@vocal wolf , if u are not aware of it.

vocal wolf
#

ty, will alert people

short snow
#

is the issue caused since it is missing some credentials or the they are expired? (the github secrett)

surreal venture
#

I think it might be because some authentication expired :/

short snow
#

Did they figure it out?

subtle kraken
#

our devops team will look into it soon-ish

short snow
#

ok, np

subtle kraken
#

fixed @short snow

short snow
subtle kraken
#

joe fixed it not me

green oriole
#

Joe did it i believe

#

Well

subtle kraken
#

any person with write perm to repo can restart bot fwiw

#

any commit to master makes bot redeploy

#

though I doubt its needed

short snow
#

it is for working of .cht

green oriole
#

Pushing empty commits is pretty eh

short snow
#

maybe

green oriole
#

An admin can run !int e 0;exit() to reboot too

short snow
#

joe and eivl seems to be here

subtle kraken
#

whats .cht

green oriole
#

Cheatsheet?

#

maybe

#

.help cht

dusky shoreBOT
#
Query "cht" not found.
subtle kraken
green oriole
#

At least it doesn’t stay anywhere haha

subtle kraken
#

I dont even mean empty commit just merge some pr and bot will restart

short snow
#

sir-lancebot#572

hardy gorge
#

anyone in the devops team can redeploy the bot as well

#

with a simple command

green oriole
#

Merging a PR to reboot seems pretty inefficient lol

subtle kraken
#

efficient if you think that we get rid of a pr

short snow
#

sebs is here, do it

green oriole
#

Like, you have to go through the whole review process just for that

subtle kraken
#

would be nice to give coredev command to do so too lemon_pensive

hardy gorge
#

Is there something we should redeploy the bot for atm?

#

If so, what is it and why is it in that state?

short snow
green oriole
#

the last deploy failed I believe

short snow
green oriole
#

A core dev can request a deploy actually

#

So that will reboot

short snow
hardy gorge
#

Ah

#

That's something we should just solve first instead of patching it

#

We refreshed some credentials

short snow
#

joe did it

hardy gorge
#

Are the credentials now okay?

green oriole
#

Re-requested

#

They should be

subtle kraken
hardy gorge
#

rerunning the workflow

green oriole
#

Yep

subtle kraken
#

okay

hardy gorge
#

I can't redeploy from here

#

Work PC does not have my personal keys

#

Neither do I want to add them there

green oriole
#

It should be redeploying

subtle kraken
#

how would clicking fork redeploy the bot

green oriole
short snow
short snow
green oriole
#

Niiice

vocal wolf
#

bois and lads and bois and lads

#

A review is needed

green oriole
#

I wonder if you can rollback by redeploying using an older run

vocal wolf
#

bot#1396

dusky shoreBOT
patent pivot
#

you can technically yes

green oriole
#

I guess it will always check out the latest code

patent pivot
#

nah

green oriole
#

Oh really

patent pivot
#

we override the image in the deploy stage

#

to use the commit SHA

green oriole
#

Ah cool

short snow
patent pivot
#

we can also rollback at the kubernetes end

#

we keep like

#

at least 2 previous deployments

subtle kraken
short snow
#

lmme open a test channel

#

weird

green oriole
short snow
#

it worked on mine

short snow
#

didn't u guys test it?

vocal wolf
#

I did

green oriole
subtle kraken
#

.help cht

dusky shoreBOT
#
Command Help

.cheat [search_terms...]
Can also use: cht.sh, cheatsheet, cheat-sheet, cht

*Search cheat.sh.

Gets a post from https://cheat.sh/python/ by default.
Usage:
--> .cht read json*

subtle kraken
#

huh okay

vocal wolf
#

at least I think I did?

short snow
#

then why does it fail on help channels

subtle kraken
#

.src cht

short snow
#

it should over-ride with the everyone role

dusky shoreBOT
subtle kraken
#

that takes surprisingly long

short snow
#

yeah

green oriole
short snow
#

he was talking to me ig

green oriole
#

Yeah

#

the job of the contributor is to test

short snow
#

i did

green oriole
#

the job of the reviewer is to break

short snow
#

and it worked

cold island
#

@vocal wolf is your bot still on in the test server?

short snow
#

or i did something wrong...

vocal wolf
cold island
#

I want to test rate limits

green oriole
#

Spam++ incoming

vocal wolf
#

@cold island go ahead and break it, I'll be doing calculus.

subtle kraken
#

well

vocal wolf
#

@short snow we need to do more testing next time

short snow
#

yep, can i have the server template?

vocal wolf
#

I do not know how to do that. @cold island Do you?

cold island
short snow
#

ok thanks

cold island
#

It should have all the core channels, but some channels were merged into one

green oriole
#

Is it up to date

cold island
#

Seems to be

green oriole
#

Sweet

#

Also that's totally a leak haha

cold island
#

Is it?

#

I guess a bit yeah

#

lol

patent pivot
#

hahahahahaha

late wolf
#

oh it changed

#

the server template

subtle kraken
#

I closed your channel fwiw @short snow

short snow
#

yep i had seen that

#

time to debug

cold island
#

@vocal wolf what's the bot prefix?

vocal wolf
#

!!!

cold island
#

tnx

vocal wolf
#

np

#

wtf are you doing to help-candy

#

lol

#

the console is just spammed with it

subtle kraken
#

its bot abuse obv

vocal wolf
green oriole
#

Haha

short snow
#

if i wnat to move a channel to help-in-se do i do sync perms or keep perms

#

and those anyone have a script to generate the ids?

cold island
#

What's help-in-se

short snow
#

what should i do

cold island
#

Sync

short snow
#

ok ty

cold island
#

If you gave yourself admin perms it doesn't matter

#

But for other people they won't be able to write in the dormant channel if you don't sync the perms

subtle kraken
#

ah yes undocumented

#
def time_snowflake(datetime_obj, high=False):
    """Returns a numeric snowflake pretending to be created at the given date.

    When using as the lower end of a range, use ``time_snowflake(high=False) - 1`` to be inclusive, ``high=True`` to be exclusive
    When using as the higher end of a range, use ``time_snowflake(high=True)`` + 1 to be inclusive, ``high=False`` to be exclusive

    Parameters
    -----------
    datetime_obj: :class:`datetime.datetime`
        A timezone-naive datetime object representing UTC time.
    high: :class:`bool`
        Whether or not to set the lower 22 bit to high or low.
    """
    unix_seconds = (datetime_obj - type(datetime_obj)(1970, 1, 1)).total_seconds()
    discord_millis = int(unix_seconds * 1000 - DISCORD_EPOCH)

    return (discord_millis << 22) + (2**22-1 if high else 0)```
short snow
#

ok, on my server, it works in the help in use category

#

should i invite someone to test/show it>

#

is the everyone role id correct in the pr i did?

gritty wind
#

It should just be the server ID

short snow
#

it is correct

#

well

#

what's wrong then, it works on my server, but not here thinkmon

cold island
#

What happens when you run the command?

short snow
#

get the result

#

@cold island

cold island
#

I mean here

#

You said it's broken

short snow
#

this ^

#

Sorry, but you may only use this command...

gritty wind
#

what's the pr number again?

cold island
#

Did you make a change to the env vars?

#

Also why would it work here?

short snow
#

i did over-ride using the everyone role

short snow
gritty wind
#

@with_role(Roles.everyone_role)
Could you try the override instead

#

adming role surpasses it

#

so do all staff roles

cold island
#

Yes, you can't test it with admin

short snow
#

ok doesn't work with admins removed

#

is there a way to use override_in_channel for all channels

gritty wind
#

You can pass it a role

#

or is that only a bot thing

short snow
#

currently am doing for a role

gritty wind
#

No that doesn't bypass the override I don't think

short snow
#

it doesn't

#

i need to get a way to write a category override deco or get all channels of the bot

#

i could do thattt

#

by making a task

gritty wind
#

You can copy it from one of the other cogs

short snow
#

which one?

gritty wind
#

There was one when I last checked, but I have to look for it

#

Hmm maybe not

#

You could extend the override to handle roles as well

short snow
#

make a new deco?

gritty wind
#

No just the same one

#

but make it accept roles

short snow
#
def override_in_channel(channels: t.Tuple[int] = None) -> t.Callable:
    def inner(func: t.Callable) -> t.Callable:
        func.in_channel_override = channels
        return func

    return inner
``` ths?
gritty wind
#

Yeah, you'd add an argument there

#

and logic above

short snow
#

ok

cold island
#

What are you trying to do, add all help channels?

gritty wind
#

They were trying to make it work on all channels from what I gathered

cold island
#

Do we want it in all channels? 🤔

gritty wind
#

No probably not

#

At least not like chat channels

green oriole
#

Are you looking for in_channel_check?

gritty wind
#

I remember now

gritty wind
#

They wanted to check a category

#

So they overrode the main check

#

and added one in the code

green oriole
#

Hmm

gritty wind
#

can't you just pass the category ID

green oriole
#

Doesn’t seem like the right way of doing it

cold island
#

@short snow The cht results seem very bulky. I would rather users were referenced to a result in #sir-lancebot-playground

short snow
#

only the whitelisted ones and help channels

green oriole
#

Right, you want in_whitelist_check

short snow
gritty wind
#

not a category deco

green oriole
#

You can give it categories and channels, and more importantly have the helper role override it

gritty wind
#

just the regular override

short snow
green oriole
#

Oh well, just port it over then

gritty wind
green oriole
gritty wind
#

It's ported already

short snow
#

i was always looking at the deoc file

green oriole
#

Yep

short snow
#

my bad

cold island
short snow
#

ok.

green oriole
#

Are we going to allow it outside of the command channels? It doesn’t sound like a good idea

cold island
#

The idea seems to be to allow it in help channels

green oriole
#

We should restrict it to at least help channels

#

welp

short snow
#

my class is starting , will back later

green oriole
#

Cya!

short snow
gritty wind
#

Fwiw, that's already what they are doing

green oriole
#

We are allowing evals in help channels, maybe that would be worth allowing

gritty wind
#

But they just needed something to check the category ID

short snow
#

the help in use channels + whitelisted channels

cold island
#

I know, I'm questioning it

green oriole
#

although they (the cheatsheets) are user generated tags hmm

gritty wind
#

in_channel_check does that

green oriole
#

Is the website moderated?

gritty wind
#

The evals are usually shorter than the cht

short snow
#

(fyi i am a he)

cold island
#

I don't mind running a trial

#

but if it's too spammy we should restrict it to the bot channel

short snow
#

they are got from a repo

green oriole
#

I’m afraid that it will end up like d.py tags

#

Okay, cool

short snow
#

just ping me with the final idea

#

got to go

green oriole
#

Sure thing, have fun

short snow
#

class is not fun

cold island
green oriole
#

Users are just creating pretty bad and not always true tags and dumping it in the face of users asking for help

gritty wind
cold island
#

Oh you mean the server

green oriole
#

Yeah

cold island
#

Well, we'll see

short snow
#

so what is decided?

#

listed channels

#

right?

green oriole
#

Uhh we didn’t make any progress haha

short snow
#

😛 .

green oriole
#

But I’d say that we can go with our new permissions system of “experiment and deny if abused” here and allow it in help channels (Cc @gritty wind and @cold island)

late wolf
#

allow what in what help channels?

green oriole
late wolf
#

😮

gritty wind
#

Hey @vale ibex, @short snow what's the status on sir-lancebot#575

dusky shoreBOT
gritty wind
#

Is it being discussed, or worked on?

short snow
#

i have fixed all the bugs, then i did what chris said and i ageed

green oriole
#

Hmmm why is iceman assigned

short snow
#

for which i didn't, i commented

gritty wind
#

🤷‍♂️

short snow
#

why am i here 😠, i shld be in class

gritty wind
#

he can assign himself as a reviewer lol

green oriole
#

There, review request

gritty wind
#

Are you still busy?

short snow
#

our teacher got late as usual

gritty wind
#

Ah, no worries

#

Go focus on your studies

green oriole
#

lol they are reaaally late

gritty wind
#

Anyways, I'd like to get that merged soon, so perhaps you two could clear up some things in here? I find that discord conversations usually move quicker

short snow
#

class starts at 6:30, 11 minutes late

gritty wind
#

Whenever you're both online that is

balmy sparrow
#

do we have any tags on key errors and how to fix them?

green oriole
#

I don’t think so, but that could be good to have

balmy sparrow
#

yeah, i've been seeing people with the issue a lot lately

balmy sparrow
#

commented

green oriole
#

Thank you lemon_pleased

#

If you feel like it, you can even open a PR, or simply leave it to someone else

balmy sparrow
green oriole
balmy sparrow
#

oh right

balmy sparrow
#

what's the longest tag we have? i began writing and may have gotten carried away haha

gritty wind
#

Hmm that may be a tad long

#

The intention of the tags is to be an easy way to quickly explain or demonstrate something

balmy sparrow
#

I could write the try: ... except: ... method in a single line

#

what more can i cut out?

gritty wind
#

Honestly, I think I would be fine with only having one or two of these solutions written out, and listing the rest with the urls

balmy sparrow
#

so, dict.get explained, and leaving URLs for setdefault and defaultdict?

gritty wind
#

Yeah pretty much

#

The try except may not have a link but

#

You can try a quick mention like

You can also add a try-except to catch `KeyError`

#

Wording can be changed obviously, but I think that's better than not adding it at all

balmy sparrow
#

sounds good

#

i'll send an updated version in sometime, i've got some other stuff to do now

gritty wind
#

No rush, get to it when you have time

short snow
#

can anyone even review the c4 pr, by tomorrow, since after tomorrow, i would rarely be able to spend time due to exams

#

scaleios has already approved

#

one more is needed

#

i would finish everything tomorrow then

#

sir-lancebot#560

dusky shoreBOT
balmy sparrow
green oriole
#

Hmm

#

Yeah, that could work

balmy sparrow
#

bot#1398 i've made a PR for the keyerror tag

dusky shoreBOT
balmy sparrow
green oriole
#

@balmy sparrow left you a review

short snow
#

you took 3 of my comments lemon_sweat

timid sentinel
#

I think you could probably do with less examples, I think just

>>> my_dict = {"foo": 1, "bar": 2}
>>> my_dict.get("foobar")
None
>>> my_dict.get("foobar", 3)  # set 3 as the default value
3

would be enough

balmy sparrow
short snow
timid sentinel
#

I don't think a keyerror example is needed

#

That's the error the user is getting already, and it explains that you get that when the value isn't in the dictionary

#

these are just my opinions though

balmy sparrow
#

@green oriole i see you've "suggested changes" - and this comes with a commit suggestion button, will i be able to make all requested changes in a single commit with that? I haven't used this before lemon_sweat

short snow
#

if u are working on a clone

green oriole
#

If you go to the file tab, you can press the “add to batch” button in order to commit all of them at once, or you can apply them one by one

#

Well, you can also apply them manually

balmy sparrow
short snow
#

ok, then u can do that

#

cuz with clone, u need to pull it, and then u get a commit message of merge (which is kinda useless)

balmy sparrow
green oriole
#

I think so

balmy sparrow
#

should i make a tag on defaultdicts on this same branch and PR it at once (while also adding a reference in the dict-get about the existence of a defaultdict tag)?

green oriole
#

Yeah, that can work

balmy sparrow
#

oh snap i totally forgot this and made a new PR

green oriole
#

That’s alright

short snow
#

that's how you learn

#

i had once reset my branch (on local) for one project with 50 commits

balmy sparrow
short snow
#

and then i never did that project again

green oriole
#

Heh, that will be more work for @vocal wolf, which is just perfect

#

Open PRs while he is asleep

#

It usually doesn’t last long

short snow
#

lol

balmy sparrow
#

huh, it failed linting (the PR on defaultdict)

short snow
#

you opened your hidden thoughts on zxith

balmy sparrow
#

trailing whitespaces lemon_pensive my bane

#

i seem to be adding spaces for no apparent reason today

mossy wolf
#

so compacting up my empty-json tag now since it was just too long. What would you say?

#

When using JSON you might run into the following error:

JSONDecodeError: Expecting value: line 1 column 1 (char 0)

This error could have appeared because you just created the JSON file and there is nothing in it at the moment.
Whilst having the data empty is no problem, the file itself may never be completely empty. You most likely want one of the following in your json

object
array

This issue can be resolved by creating one of these data types. An object is the most common of the 2, and is created by editing your file to read {}.
Different data types are also supported. If you wish to read more on these, please reffer to the following article: https://www.tutorialspoint.com/json/json_data_types.htm

#

shall i remove the whitelines around the codeblock?

#

so the above, or the below, what you think?

When using JSON you might run into the following error:

JSONDecodeError: Expecting value: line 1 column 1 (char 0)

This error could have appeared because you just created the JSON file and there is nothing in it at the moment.
Whilst having the data empty is no problem, the file itself may never be completely empty. You most likely want one of the following in your json

object
array

This issue can be resolved by creating one of these data types. An object is the most common of the 2, and is created by editing your file to read {}.
Different data types are also supported. If you wish to read more on these, please reffer to the following article: https://www.tutorialspoint.com/json/json_data_types.htm

gritty wind
#

Less of a styling review at the moment, but IDK about calling maps objects while we use arrays for arrays

#

Esp if we consider it in the context of python where pretty much everything is an array object

mossy wolf
#

almost every online source i find calls them Objects

gritty wind
#

Yeah, it is after all object-notation

mossy wolf
gritty wind
#

But I think we'll do more good than harm if we ground it in python terminology

gritty wind
#

the last word was supposed to say object lol

#

brainfart

mossy wolf
#

right lol

#

also since the linked resource at the end also uses arrays and objects i'd say it's best to not be conflicting

#

!or

stable mountainBOT
#

When checking if something is equal to one thing or another, you might think that this is possible:

if favorite_fruit == 'grapefruit' or 'lemon':
    print("That's a weird favorite fruit to have.")

While this makes sense in English, it may not behave the way you would expect. In Python, you should have complete instructions on both sides of the logical operator.

So, if you want to check if something is equal to one thing or another, there are two common ways:

# Like this...
if favorite_fruit == 'grapefruit' or favorite_fruit == 'lemon':
    print("That's a weird favorite fruit to have.")

# ...or like this.
if favorite_fruit in ('grapefruit', 'lemon'):
    print("That's a weird favorite fruit to have.")
mossy wolf
#

also it seems like already existing tags don't have the extra whitelines

#

so i guess imma just stick with removed on mine too

#

maybe it's an idea for the pre commit hook to also check this

gritty wind
#

The other tag does have a break between paragraphs

mossy wolf
#

ah yes i see

#

but not after code blocks

gritty wind
#

Discord adds those ones in automatically

mossy wolf
mossy wolf
#

i might just upload it and leave the reviewers to make comments on github

#

there it goes

#

@gritty wind maybe one last thing

the line This issue can be resolved by creating one of these data types.

#

i'm not sure if that one fits

#

shall i just remove it?

#

what is the problem?

#

you're a bit in the wrong area

#

this is about contributing to the discord and bots here

gritty wind
#

Hey, we don't allow for recruitment on this server. If you want general guidance learning programming, check out #❓|how-to-get-help

mossy wolf
gritty wind
mossy wolf
gritty wind
# mossy wolf

Are we looking at the same thing haha. Is it the Different data types are also supported

mossy wolf
#

oh in that pic i already nuked that line lol

#

that explains

#

ah well it's ready for official review now so let me quickly request that

mossy wolf
#

@gritty wind i completely misunderstood you ealier (as i also point out in the github comment). I improved it to be even more simplified

#

hopefully it's not too much text now to just read

gritty wind
#

Lol I could've explained it better

#

Mentioning array/list would probably work too, but I'll leave that up to whoever reviews it at this point

mossy wolf
#

this is what it will look like now

#

ofc without my name at the top lol

vale ibex
#

.pr 554

dusky shoreBOT
vale ibex
#

What' are people's thoughts on this?

#

This makes it so that the docker-compose on lancebot pulls from a .env file in the root dir, rather than pulling the vars listed in the docker-compose from the host env

#

Currently the docker workflow requires you to manually edit the docker-compose file with the env vars that you want to pull, so you need to remember not to commit the change accidentally

#

So with this change it should make it easier for us to explain in the wiki how to use docker (As it doesn't currently)

gritty wind
#

I don't have a problem with the idea

#

iirc correctly we discussed dotenv as a future improvement, didn't we?

vale ibex
#

I think we discussed it as an alternative yea

gritty wind
#

And do you have any interest in updating the guide? If so can you write a draft for what you have in mind

vale ibex
#

I could give it a go, sure

#

Where would be the best place to draft it?

gritty wind
#

Well if you ask in a few months, I would say the repo

#

For now uhh

#

can you get it on a gist?

vale ibex
#

I can probably figure it out

#

What would be preferable, this solution, or dotenv? As dotenv would be simple to implement

gritty wind
#

Let me ask in the core dev channel

vale ibex
#

👍

#

fwiw a dotenv solution would require copying the .env file into the container, whereas this solution doesn't, as the env vars are pulled in by compose.

gritty wind
#

It's already copied in by default

#

because it's in the home path

patent pivot
#

hmmm

gritty wind
#

It just

#

does nothing with it

patent pivot
#

downside is those not using docker get shafted by the docker-only approach

#

(I don't use Docker lul)

vale ibex
#

The docker ignore is set to ignore anything that's not in the bot/ path

gritty wind
#

This wouldn't affect people running through things like pipenv which loads .env

#

Or people that load in .env in some alt way

#

(For example through IDE)

vale ibex
#

Yea, this setup would be the same for a pipenv approach, since both would require the .env to be in the root

patent pivot
#

all we should have to do is add !.env to .dockerignore and that problem solves itself

vale ibex
#

For the pipenv approach, is the .env in the root dir or the bot/ dir?

gritty wind
#

root dir

#

It's where the piplock is

vale ibex
#

yea, so doing the diff in the pr would mean its the exact same

#

so won't impact people using pipenv

#

So, at least from what I can tell, this change is free

gritty wind
#

No special changes, and my folder is called sir-lancebot locally, not bot

vale ibex
#

Do you have a .env file in your bot/ folder?

gritty wind
#

Nope

#

It's right in the root folder

#

It copied everything from the root folder too

vale ibex
#

Interesting

#

it didn't pull in the .dockerignore for some reason though

#

I'm blind

gritty wind
#

Let me try a rebuild I guess, though I had just built this image right now

#

I'll also try renaming the bot/ folder

vale ibex
#

huh alright, so mine pulls in everything too

#

but without the changes in the PR, the env vars don't get populated in the docker context

gritty wind
#

Right, but it would make using dotenv easier

vale ibex
#

yea

#

I'm curious as to why the docker ignore isn't working as intended though

#

It's only used during docker build

gritty wind
#

meh

#

I personally don't think that's really a big issue

#

it's fine if we just have it loaded, esp since this is mostly for dev environments

vale ibex
#

yea, well if the .env is already in the docker image, then might as well just use dotenv and load it

gritty wind
#

ehh

#

I wouldn't be comfortable with using a workaround like that either. If we want to go with dotenv, we should add it to the dockerignore just in case that issue gets fixed

#

But either way, I'll have a look at your PR right now

#

and we can consider alternatives later

vale ibex
#

Yea, I think there's a bunch of ways to approach this

#

What has stumped me now, is if the .env is already in the docker image, why don't the env vars get found the same way as if its running under pipenv

#

ohhh, pipenv run auto loads .env files into the env for you

gritty wind
#

Yup, but we don't use it in docker

vale ibex
#

yea

short snow
#

Good job chris, is your pr ready for review?

vale ibex
#

Which one?

short snow
#

so @gritty wind , the in_whitelist_check is just a check, and cannot be used to override, like allow it every channel or every channel of our need.
so how should i do that

gritty wind
#

I don't understand why we have so many checks that do pretty overlapping things lol

#

Anyways

#

Can you add a general_override right below override_in_channel

#

It can take kwargs, and pass them straight to in_whitelist_check

short snow
#

ok

#

and it would jsut return true or false?

gritty wind
#

Alright, no

#

The actual calling is done inside the method

#

Instead

#

Set the kwargs to an attribute, much like the channel override does

#

and add an elif under the if in line 214

#

call the whitelist function in that

#

this is getting a bit complicated hmm

#

Do you want to give it a shot, or should I take over it?

short snow
#

your choice

gritty wind
#

You can change your mind later if it doesn't work out

#

honestly, just do what you want, but I know you're busy

short snow
#

you can just take it

#

i would mess it up

gritty wind
#

I really do trust you lol

#

I'll get a PR for it open now so we can get it merged in asap

#

and you can get to work on features

short snow
#

ok, till then i will finish up with the valentine

#

like, i understood you, but uk ....
i would just try making my own for practice

gritty wind
#

Yeah go ahead

short snow
#

can someone join my tst server so i can test the valentine commands?

#

ping me, if anyone can

cold island
#

I just make alts for that

short snow
#

i tried making one, but it always goes to my jasonterror account

cold island
#

you can use different accounts on different platforms

#

anyway, if you just need another user to be present you can DM me the link

short snow
#

ok, thanks

short snow
#

@vale ibex @green oriole mentioned changes in sir-lancebot#575

dusky shoreBOT
balmy sparrow
#

@dusky shore seems to trigger cooldowns incorrectly for the bemyvalentine command - I think you need to reset_cooldown for the case where the user tries the command before doing the lovefest sub command

balmy sparrow
#

Also made requested changes on bot#1398 , and also PRed bot#1400

late wolf
dusky shoreBOT
cold moon
#

Or this should be in footer instead?

short snow
#

@gritty wind ping me when u pr the general_override pls.

#

also, the connect4 pr is looking for one more approval (scaleious was the first approval).
sir-lancebot#560

dusky shoreBOT
cold moon
#

I will look into it later

short snow
#

ok thanks.

short snow
cold moon
#

I mean reason

short snow
#

can it be like:
**Link Triggered: ** <link>

cold moon
#

No, reason is comment what is in DB about entry of domain/invite etc.

short snow
#

ohk

short snow
keen valley
#

What to do here

#

In this chennal

short snow
cold moon
short snow
cold moon
#

Time isn't footer. This is timestamp field

short snow
#

yes that's what i meant

cold moon
cold moon
short snow
#

probably

vocal wolf
#

that's not right lol

short snow
#

your test server?

vocal wolf
#

where the template comes from

#

I don't want to talk about what was causing that error lol

#

either way

#

Ready for reviews.

short snow
#

done

vocal wolf
short snow
#

coool

#

lemme see

#

👌 approved

vocal wolf
#

tyvm

cold moon
short snow
vocal wolf
short snow
#

the import tag is longer

#

!import

#

lol, covers the whole page

#

but we can improve the file tag.

#

somethings can merged to one codeblock, and some text can be rmeoved

cold moon
#

I don't think having 1 big codeblock is good idea. Current version explains this well part-by-part.

balmy sparrow
#

and also, discord.abc.Messageable

short snow
#

@vocal wolf sir-lancebot#462, user hasn't replied from 13 days, probably someone can take over

dusky shoreBOT
vocal wolf
#

Thanks. I'll give them 1 more day.

short snow
#

Same for #482 and 485

short snow
#

@vocal wolf incase, u didn't see it.

surreal venture
#

sir-lancebot#482, sir-lancebot#485

short snow
#

ah yes thanks

gritty wind
#

Hey @eternal owl, do you still have plans to work on sir-lancebot#214

eternal owl
#

prolly next week or so

#

my uni started recently so haven't had much time

gritty wind
#

Alright, it isn't very important rn, I was just thinking of bumping its status to good-first-issue

short snow
gritty wind
#

I got the go ahead this morning, working on it now

eternal owl
#

I think that should be a good first issue

#

looks fairly straight forward

gritty wind
#

There are still plenty of issues that could work, so if you're doing it, you should keep it

short snow
#

not a problem, (i seem to have got a basic idea of the implementation, but you can do it)

eternal owl
#

I don't think I will be working on the pride event calendar tho, someone else can take it

gritty wind
#

If you'd like, share your implementation. It would still probably be helpful

short snow
#

ok, i will ping you with it, once i reach home

gritty wind
#

Take your time

short snow
#

it just what u said to me above

gritty wind
#

That's what I'm planning to do pretty much

eternal owl
#

I will see what I can do next week, sorry

gritty wind
#

I might also rip out the other override so we only have one

gritty wind
short snow
#

that's what i did,

#

i merged them, like the whitelisted check

gritty wind
#

alright, cool

surreal venture
#

Is there a stackoverflow command in the bot?

#

like !stackoverflow <stackoverflow query>?

cold moon
#

When we add this, then this would fit better to @dusky shore

surreal venture
#

Hmm... so would it be apt using @dusky shore in help-channels?

gritty wind
#

Yeah it usually gets all the fun features

surreal venture
#

but this isn't a fun command, is it?

gritty wind
#

It certainly isn't mod

#

Which is sort of what I see python as

#

general mod and utility

surreal venture
#

Yes but it would come under utility right?

#

like the !e command?

gritty wind
#

Not really, I think more utility for running the server

#

And personally I do think some of the things under @stable mountain should be migrated

#

but we have enough work as is

patent pivot
#

didn't we add something this week to @dusky shore for the help channels

#

the cheat sheet thing

gritty wind
#

yeah cheat sheet

#

Xith moved that one from bot too

surreal venture
#

hmm, okay, so is there an issue for this in sir-lancebot?

#

Because I can't see any

patent pivot
#

there isn't

#

I'm not sure there should be

#

well hm

#

there is no use for such a command in the help channels

surreal venture
#

A lot of people keep linking SO questions in the channels anyways

patent pivot
#

Ideally, they shouldn't just be dumping an SO link as a response

surreal venture
#

🤷‍♂️

patent pivot
#

We'll discuss it internally and get a decision back here within the hour.

green oriole
#

Damn, we are fast

short snow
#

i have it ready on my another bot rn

patent pivot
#

we're polling internally now 👍

#

will post back here in a little bit

obsidian patio
#

I need to install Docker CE on an external SSD (MacOS), but I simply moving it there and opening it doesn't work. Do you have any idea how this could be done?

short snow
sullen phoenix
#

either my phone is broken or i’m really out of it since i cannot find the poll, but i’m not in support of an so command

patent pivot
sullen phoenix
#

i saw the ping somewhere

#

oh lol

short snow
patent pivot
obsidian patio
short snow
#

by so command, do mean:

  1. links and tags
    or
    2.links, tags, and top answer
obsidian patio
#

@patent pivot do you have any idea how to solve this? (or someone else who knows a lot and uses Mac) #dev-contrib message

sullen phoenix
#

i think docker has to be on your root partition

#

for linux, at least

obsidian patio
#

Ugh, that's annoying

#

Thanks

sullen phoenix
#

you can probably store images in an external drive though

obsidian patio
#

That would seem logical. Otherwise I'll be screwed

patent pivot
#

hmmm

#

that's not a docker error though

#

that's a macos thing

#

you get the M1 version or smth???

obsidian patio
#

Nope

#

I assume it has something to do with the fact that Docker isn't really meant to exist in a place like that

cold moon
#

I never installed any app to external drive

obsidian patio
#

On my main system, it works flawlessly (to open it)

patent pivot
balmy sparrow
#

any reviews for bot#1400 ?

dusky shoreBOT
green oriole
balmy sparrow
#

Oh yeah I meant to ask, the action seemed to say something along the lines of this hook has modified files:, does it mean I have to commit again after fixing it myself?

#

Or has that hook fixed it for me

gritty wind
#

You have to commit again

#

Though if you run it locally, it will fix it for you

balmy sparrow
gritty wind
#

(It technically fixed on github's action servers, but it didn't save that change to the repo or anything)

balmy sparrow
#

that makes sense, on it

#

the file shouldn't end in a newline?

gritty wind
#

It should have exactly one new line at the end

#

uhh let me check the error

#

You have extra spaces after a couple lines

#

such as
>>> print(my_dict)

#

That space at the end shouldn't be there

#

If you run pre-commit, it should fix it for you

balmy sparrow
#

I was using github's UI, I'll try going through them line by line now

gritty wind
#

That could take a sec by hand haha

obsidian patio
gritty wind
#

Does mac have a sudo/admin console?

obsidian patio
#

Not a dedicated one, I believe

gritty wind
#

Right, could you try running the command with sudo then?

obsidian patio
#

Sure

#

Hmm, I wonder if this has something to do with a lack of storage

balmy sparrow
#

Do you have any suggestions about the content?

#

I wasn't completely satisfied with what I wrote for the default factory but I couldn't think of a better way to explain it

obsidian patio
#

I cleared some space on my disk (rip motion) and got past that issue, for some reason

#
ERROR: for postgres  Cannot create container for service postgres: open /var/lib/docker/overlay2/30c7979627fe9bea57ba3a149a7fc01088216bdcaa48dba997643428a844385a/committed: structure needs cleaning

Any idea how this could be solved?

sullen phoenix
#

odd

#

seems like some sort of corruption from what i could find

gritty wind
#

You can try dumping the pg container and rebuilding, but I've never seen any of those issues before lol

trim cradle
#

@balmy sparrow I assume it's your PR that I've commented on? Ping me here if you'd like to get my attention.

balmy sparrow
#

Yep, that's my PR, going through the comments

#

thanks for the feedback :D

#

I passed in the dictionary as I wanted to keep the tag short (didn't want to add more lines for adding items to the dictionary)

#

@trim cradle do you want me to re-write the line where I say that the defaultdict creates the key?

balmy sparrow
#

Perhaps change it to "insert"?

...but if you try to access or modify a missing key, the `defaultdict` will insert the key and generate a default value for it. ```
balmy sparrow
#

Committed :D

obsidian patio
gritty wind
#

Let's see

#

Do you have docker desktop, or are you restricted to cli

obsidian patio
#

I have Docker CE (mac)

gritty wind
#

Right, okay

obsidian patio
#

Which means a GUI application as well in this case

gritty wind
#

Does it allow you to manage/delete containers?

#

If so, try deleting the PG container, then remove the volume

obsidian patio
#

This is what I have

gritty wind
#

Ah perfect

#

Well it looks like postgres isn't there, so proceed directly to the volumes

patent pivot
#

oooooo

#

docker errorss

obsidian patio
#

Do you mean clicking the delete button for the bot container? Hmmm

gritty wind
#

There should be a seperate window on the left for volumes, though I don't use mac 🤷‍♂️

patent pivot
#

I don't think there is

#

let me open up

obsidian patio
#

If I click on "Images," I'm presented with this (which includes some pg thing?)

patent pivot
#

docker desktop is warming up

obsidian patio
#

Lovely, some nice heat in the winter

#

That's just like PS and AI

gritty wind
#

I think desktop may actually merge container and volume, so I think you should be good

gritty wind
#

And good lord docker can be a pain sometimes lol

obsidian patio
#

The postgres image?

patent pivot
#

yeah mac doesnt't have volumes

gritty wind
#

how... how do you do persistence?

patent pivot
#

through docker

#

it's just the monkeybrain GUI doesn't show them

obsidian patio
#

I think that might've worked

#

For some strange reason

obsidian patio
patent pivot
#

it is SO bad

obsidian patio
#

Oof

#

The only question now is why the bot is still dead, though things are running

gritty wind
#

can you detach from the log viewer

obsidian patio
gritty wind
#

I think you can do that using ctrl + C/D/X/Z/something without taking the whole thing down

obsidian patio
#

Seems like this might be the issue

gritty wind
#

Cool, now you need to attach to the bot itself

#

because that's where the error would be

#

actually

#

It might be easier to do that in the GUI

#

just click it in there lol

obsidian patio
#

Do you mean clicking the start button on the container?

gritty wind
#

no click the name itself

patent pivot
obsidian patio
#

Ohh

#

Well, this is confusing. I already clicked the start button and the bot now seems to be online (??)

gritty wind
#

Could it have tried to start up before building site

obsidian patio
#

Possibly

gritty wind
#

Isn't it web:8000 on docker

#

oh yeah that's what you got

#

nvm

obsidian patio
#

It seems like migrations were running while the bot was starting

patent pivot
#

ah

#

that could be it

#

try restart the whole sshow

obsidian patio
#

Dude, you can't imagine how good it feels to finally have this bot set up. There have been so many issues when trying to make it work

patent pivot
#

site just wasn't running and we don't have readiness checks

obsidian patio
#

Yeahh, it seems like that's the case

#

Maybe that would be worth having a look at

patent pivot
#

not sure we can really

#

other than having bot wait for site reachable I guess

#

but not through docker

#

kubernetes totally can do this though

gritty wind
#

More meaningful startup errors 👀

#

We can add that to the issue lol

#

bot#1385

dusky shoreBOT
obsidian patio
#

@patent pivot seems like I got the same issue on restart, for the record

patent pivot
sullen phoenix
#

yeah, i have to start site first before bot

vale ibex
#

Could we wrap the compose start command in a basic script that waits until the site is up then spawns the bot process?

gritty wind
#

I think it would be simpler to do it at the bot level instead

#

Won't require we fiddle with any extra scripts, or getting the URL

vale ibex
#

Makes sense

short snow
short snow
#

can sir-lancebot#574 be assigned to me?

short snow
#

and any updates on sir-lancebot#561 and sir-lancebot#565

gritty wind
short snow
#

i have already opened a pr on it

#

ok

#

github webhook is weird

#

i have changed my avatar

#

but it still shows the old one

gritty wind
#

You have to have a comment or be part of the org to be assigned

#

its an anti-spam thing

#

as for the pfp, I think that may be a caching thing

short snow
#

okhh

#

and i commented on your pr for general_override

gritty wind
#

I saw it

#

I didn't change it because

#

It's not an override lol

#

I'll add it in

short snow
#

lol, ok

#

(not code probllem, but something with their code)

eternal owl
#

sir-lancebot does not have members intents enabled?

short snow
#

lemme open a issue on their repo

eternal owl
#

why is that

#

🤔

gritty wind
#

Because mem and cpu usage

#

what's the reverse of stonks?

short snow
#

cpu goes brrr

eternal owl
#

ah

short snow
#

@vale ibex it seems, using that if we add curl headers it works

#

but with aiohttp pr u put, it doesn't

#

i tried locally

#

and put curl user headers, and worked

#

but without that it didn't

#

so on the safe side, we should put it ig

eternal owl
#

how come the lovefest command is restrict to the month of February and not the other cogs/other seasonal cogs?

gritty wind
#

Some are restricted where it makes sense

#

Like Halloween is fully restricted

#

AoC is too for most of the commands