#dev-contrib

1 messages Β· Page 13 of 1

gleaming jay
#

I need to stash that config file somewhere else as a backup smh

sharp crag
#

Yeah the config file is a doozy to set up

gleaming jay
#

Such a doozy that I accidentally swallowed ice thinking about it

#

Oh fuck

#

S h i t

sharp crag
#

What now

gleaming jay
#

I write

#

and compile

sharp crag
#

What, you're re-writing all of PyDis's code in a compiled language now?
it better be Rust

gleaming jay
#

blazingly fast python

#

@sharp crag any way I can get the emojis

sharp crag
gleaming jay
#

The emojis that messages sometimes contain; their IDs and whatnot are contained in the config.yml so they're loaded as a constant

#

Where can I get

#

the actual pngs

#

so I can add them

#

to the server

#

so I can get the emojis in messages working

#

I'm tired of seeing invalid form body :(

sharp crag
#

Oh, you want the PyDis emojis in your own server?

gleaming jay
#

yep yep

sharp crag
#

Hmm that's why we have the staff testing server

gleaming jay
#

I never got a line

cold island
#

And we have a ready config for it

gleaming jay
#

It's hard to explain sorta... not really
I just like having an isolated space

cold island
gleaming jay
#

yep, that much I knew
I just needed all of them in one spot

cold island
gleaming jay
#

ohhhh

#

should've looked through there first

desert imp
#

i wanted to make some contrib to the python bot but the config setup killed me
is there a watered down version of the py bot with auto configs

slim venture
#

you can copy that, there's also a server template i think for testing it

desert imp
#

The guide tells me to copy paste and to just fillout what i have to

desert imp
#

But i gotta edit everything

#

And find everything

tawdry vapor
#

We are aware this is a pain point in the new contributor set up process. We want to automate the configuration, but to my knowledge efforts on that have stalled.

In the mean time, keep in mind the sever config mapping does not have to be one to one. For example, you can re use the same channel for multiple config fields. Furthermore, many config options are only used by a subset of the bot, which may not be relevant to what you're developing.

still comet
#

The test server template on the website (https://discord.new/zmHtscpYN9E3) also has the old help channel system, is there an updated one with forums or does that not matter?

vocal wolf
#

@full fractal thanks m8

#

site PR merged

fading galleon
trim cradle
#

!guild

#

!server

#

what

stable mountainBOT
#
Server Information

Created: <t:1483877013:R>
Roles: 99
Member status: status_online 53,253 status_offline 317,396

Members: 370,649

Helpers: 149
Moderation Team: 36
Admins: 12
Directors: 3
Contributors: 46
Leads: 12

Channels: 254

Category: 30
Forum: 3
News: 10
Staff: 75
Stage_Voice: 1
Text: 128
Voice: 7

trim cradle
#

hmm okay

#

anyway is there a way to add the number of threads that are open?

clever wraith
#

I think there's a way to get a list of active threads via the API, but it's per channel id

#

Guild seems to have a threads attribute

static canyon
#

!d discord.Guild.threads

stable mountainBOT
#

property threads```
A list of threads that you have permission to view.

New in version 2.0.
static canyon
#

Presumably would just be len(ctx.guild.threads)

clever wraith
#

Yeah

trim cradle
#

@vale ibex should my config have site_api: &API !JOIN ["api.", *DOMAIN] or site_api: &API !JOIN [*DOMAIN, "/api"]

trim cradle
trim cradle
desert imp
#

ok i thinkkkkk i got it configured right

#

running locally but it's slow

fallen patrol
#

how is postgres upgraded in the k8s cluster

#

I'm curious

#

mostly I want to upgrade my own in my cluster kek

fallen patrol
#

interesting

#

found a lil typo

desert imp
#

after im done with autoconfig

#

im gonna add a feature in the python bot that responds with just ask a question when somes asks does anyone know xyz

#

also should i make a issue on github to show/tell people that im working on a auto-config/setup thing

#

@clever wraith thoughts? I heard you wanted to make one as well

clever wraith
desert imp
#

maybe a different Luna

clever wraith
#

No it's me, but I'm intrigued to find out how you heard that

desert imp
#

we where talking about it the other day and someone mentioned u want to do it yet i already started (didn't know u where doing it)

#

and probably almost done(me)

clever wraith
#

One thing you should know (It's in our contrib guidelines), is that you shouldn't work on something before there's an issue for it & gets approved by our core devs

#

To not risk working on something, that won't get approved

desert imp
#

ah

#

i was thinking about it

desert imp
timid sentinel
# desert imp thats why i asked this

There's still discussion about how autoconfig should work, so there's no way implementation can start now (although hopefully soon). If you have started, I'd recommend you stop working on it for now and share what you have so far. We can then see if it aligns with any of our ideas and figure if there's a way forwards.

desert imp
#

i haven't fully implemented it

#

but i got the base structure done for the most part

#

Basically they way i want the command setup to work is to pass some parameters like
emojis channels roles prefix
emojis channels and roles are bools while prefix is just a string for example ! or /

#

the bools by default are false and you would need to specify each parameter when calling the function

#

if a bool is true it would auto create any missing information

#

for example :trashcan: exists in the server therefore no need to create a emote but status_idle doesn't exist so it will autocreate it(same thing with the channels and categories as well as roles)

#

now for the actual config.yml

#

i couldn't find any clean way to really do it while keeping the !ENV and !JOIN commands

#

so the idea is to loop through config-default.yml and replace necessary details according to created channels

#

and since some lines would have the same names we can still distinguish them with the var's in the config

#

eg we can check the var name to only replace mod's category by not only searching for 'moderators' but as well as &MODS_CATEGORY
moderators: &MODS_CATEGORY 1073019045227544588
so that it can skip
moderators: &MODS_ROLE 831776746206265384

desert imp
static canyon
desert imp
static canyon
desert imp
#

basically what i sent here

#

i put it on the github issue?

clever wraith
#

Yes

desert imp
#

aite

clever wraith
#

People will look at that issue, not this thread

desert imp
#

anyways I assume you probs had the same issue as me so i just made the parser myself

#
        with open('config-default.yml', 'r') as file:
            config = file.readlines()
        
        config_keys = {}
        parent = ''
        child = ''
        for index, line in enumerate(config):
            if ':' not in line:
                continue
            current = line.split(':')
            if current[1] == '\n':
                if current[0].strip() == current[0]:
                    parent = current[0]
                    child = ''
                    config_keys[parent] = {}
                    continue
                child = current[0].strip()
                config_keys[parent][child] = {}
                continue
            if current[0].strip() == current[0]:
                config_keys[current[0]] = current[1:]
                continue
            if child == '':
                if current[0].strip()[0] == '#':
                    continue
                config_keys[parent][current[0].strip()] = current[1:]
            config_keys[parent][child][current[0].strip()] = current[1:]
    
        print(json.dumps(config_keys, indent=4))
#

you should get something like

"debug": "     !ENV [\"BOT_DEBUG\", \"true\"]\n",
    "file_logs": " !ENV [\"FILE_LOGS\", \"false\"]\n",
    "bot": {
        "prefix": "         \"!\"\n",
        "sentry_dsn": "     !ENV \"BOT_SENTRY_DSN\"\n",
        "token": "          !ENV \"BOT_TOKEN\"\n",
        "trace_loggers": "  !ENV \"BOT_TRACE_LOGGERS\"\n",
        "clean": {
            "message_limit": " 10000\n"
        },
        "cooldowns": {
            "tags": " 60\n"
        },
        "redis": {
            "host": "  \"redis.default.svc.cluster.local\"\n",
            "password": " !ENV \"REDIS_PASSWORD\"\n",
            "port": "  6379\n",
            "use_fakeredis": " false\n"
        }, 
    ...
#

hope this helps @clever wraith

desert imp
#

i tried to use the yaml module but i couldn't manage to get !ENV [\"BOT_DEBUG\", \"true\"] to not change

vale ibex
#

all the parsing logic is at the top

#

if you import that it will handle reading both config-default.yml, config.yml and .env, leaving the values in the classes for ease of access

desert imp
#

the problem here im trying to solve is for creating config.yml accustomed to the user

#

instead of going in and copying channel id's for every channel category and so on

#

can atleast automate most of the things

vale ibex
#

Ah auto config stuff?

desert imp
#

while still keeping !ENV [\"BOT_DEBUG\", \"true\"]

#

yep

vale ibex
#

I believe we had some ideas internally on how to handle this

#

which included changing how we store constants

#

I think it's still being fleshed out as an idea

desert imp
#

ya i just put a issue on it today

#

but i worked on it before i did that

#

i like the idea of using .yml

#

its very nice

vale ibex
#

Hah this is a conversation we've been having a quite a number of months by now :P

#

You can probably find some previous discussions by searching auto-guild or similar in this channel

desert imp
#

i can't really say if i solved most of the issues or not as i have no clue what u guy's have stumbled upon

#

but i have pretty much got it all done atleast with the id's

#

e.g roleids channelids categoryids

#

prefix

#

yada yada

vale ibex
#

I believe at least one of them was knowing which category to create the channel in

#

since the category ids and channel ids are separate and have no link

desert imp
#

actually

#

they do have link

#

or can make them atleast

vale ibex
#

Yea, that's where changing how they're stored came into the discussion

desert imp
#

for example

Category: Off-topic - Channels: [<TextChannel id=1073019045890236422 name='ot2-bar' position=46 nsfw=False news=False category_id=1073019045890236419>, <TextChannel id=1073019045890236420 name='ot0-lol' position=44 nsfw=False news=False category_id=1073019045890236419>, <TextChannel id=1073019045890236421 name='ot1-lmao' position=45 nsfw=False news=False category_id=1073019045890236419>]
#

each textchannel has a category_id

#

and a id

#

i still haven't gotten to creating channels, categories, and emojis

#

but i have done it in a previous bot of mine

vale ibex
#

I was referring to how we have category constants, and channel constants seperate in the config

desert imp
#

oh

vale ibex
#

but the channels need to be created in certain categories

#

Similarly, webhooks need to be created in certain channels

#

and a few other things that need to be linked, but that link isn't represented in the config

desert imp
vale ibex
#

Yes, it is possible, that's what the discussion is I believe

desert imp
#
    categories:
        logs:               &LOGS           1073019045378531479
        moderators:         &MODS_CATEGORY  1073019045227544588
        modmail:            &MODMAIL        714494672835444826
        appeals:            &APPEALS        890331800025563216
        appeals2:           &APPEALS2       895417395261341766
        voice:                              1073019045722472535
        summer_code_jam:                    861692638540857384
vale ibex
#

Once a formal proposal is together I imagine we will raise it in an issue for discussion

desert imp
#

alright sounds good

desert imp
sharp crag
desert imp
desert imp
#

so i can contrib

sharp crag
#

I feel like it's more than just a change to the bot

#

We're generally averse to this sort of thing

desert imp
#

damn

jolly parcel
#

python-discord/snekbox#168 any word on this? just had some initial thoughts but I think it could be a good thing to explore

dusky shoreBOT
cold island
# desert imp so i can contrib

If you're looking for ways to contribute, we have a lot of open issues, and you can also help review open pull requests.

desert imp
#

ah i didn't know i can review open pr

desert imp
cold island
desert imp
cold island
#

Oh, it looks like @dusk sinew also wanted to? πŸ€”

desert imp
#

ya i saw but it's been a month

cold island
#

Yeah no one assigned him for some reason. I'll wait for their reply, and if it's not relevant anymore assign you

sharp crag
#

I mentioned I'd be willing to take it on in my original message but I'll give @desert imp or @dusk sinew first preference

desert imp
#

sounds good 😎

#

if bjokey wants to have it he can since he was first

sharp crag
#

Ah, but I was first first! /s

desert imp
desert imp
#

i skimmed over it and it looks like it's just 3 lines of code thats changed

fading galleon
#

wheres the source of this located

static canyon
desert imp
clever wraith
desert imp
#

so can just remove that

#

need my github green fr πŸ™

static canyon
desert imp
#
msg = f"{ctx.author.mention} {icon} {msg}.\n\n```\n{output}\n```"

can just be

msg = f"{icon} {msg}.\n\n```\n{output}\n```"
#

why is it weird

#

oh yeah

stable mountainBOT
#

pydis_core/utils/interactions.py lines 82 to 85

async def on_timeout(self) -> None:
    """Remove the view from `​`​self.message`​`​ if set."""
    if self.message:
        await _handle_modify_message(self.message, "edit")```
desert imp
#

it is not view

#

the view is untouched

static canyon
desert imp
#
response = await ctx.send(msg, allowed_mentions=allowed_mentions, view=view)

becomes

response = await ctx.reply(msg, view=view)
desert imp
static canyon
#

To prevent it pinging other users

#

Although maybe that's the default in the bot

desert imp
#

huh

#

the whole point for this is to not ping users

#

and to instead reply no?

static canyon
#

You can specify allowed_mentions to forcefully prevent any mentions that may happen due to some exploit in the eval output (which we have had before)

fading galleon
desert imp
#

oh wait i see

#

yeah that makes sense

#

i get it

clever wraith
#

That's not it

stable mountainBOT
clever wraith
stable mountainBOT
#
Command Help

!source [source_item=None]
Can also use: src

Display information and a GitHub link to the source code of a command, tag, or cog.

static canyon
clever wraith
#

Yep

static canyon
stable mountainBOT
#
Cog: Subscribe

Cog to allow user to self-assign & remove the roles present in ASSIGNABLE_ROLES.

Source Code
fading galleon
#

thanks for the help, found it

cold island
cold island
#

Because it's an overwhelming amount of channels that are irrelevant to new members

outer oasis
#

Fair

#

Is it worth an entire role?

#

From what I understand we're just barely scraping by the limits

cold island
#

If we want to still give people a way to access, then yes

outer oasis
#

oh

cold island
#

!server

stable mountainBOT
#
Server Information

Created: <t:1483877013:R>
Roles: 99
Member status: status_online 55,399 status_offline 315,424

Members: 370,823

Helpers: 149
Moderation Team: 35
Admins: 12
Directors: 3
Contributors: 46
Leads: 12

Channels: 253

Category: 29
Forum: 3
News: 10
Staff: 75
Stage_Voice: 1
Text: 128
Voice: 7

outer oasis
#

Well... that was my entire argument

cold island
#

Still have 151 to spare

#

It becomes a bit scary during code jams, but even then we have enough room

outer oasis
#

Yeah
That's what I was thinking of

cold island
#

40-60 + team leads + participants + top 10

#

So still several dozen to spare

outer oasis
#

@cold island why is this new role one digit longer than the rest?

#

Is that correct? I thought they were fixed-length numbers

cold island
#

Because Discord snowflakes passed 99999999999999999

#

The ID of the message above is 1074810992346792006

outer oasis
#

Huh
I just remembered hearing that snowflakes were a specific number of digits

cold island
#

They were, but there's now one more

#

If you check lemon's user ID he has one digit less

clever wraith
#

Why not use Discord's feature ?

#

To only keep the channels/categories you want

cold island
#

Because it's not something that new members should have to care about in the first place

desert imp
#

confused

#

the old help system?

outer oasis
desert imp
outer oasis
desert imp
#

yea

outer oasis
#

So we're talking about hiding the giant list of locked channels by default

desert imp
#

to make it look cleaner

cold island
#

That would be a lot more controversial

desert imp
cold island
desert imp
#

i know

#

but i think the same system should be applied but with preset categories

#

but instead of that for Topical chat

#

wait let me try and write this out

#

so it doesn't sounds confusing

cold island
#

You want topical chats to have forum channels?

desert imp
#

and people can browse through

cold island
desert imp
#

ok

stable mountainBOT
#

config-default.yml lines 144 to 146

modmail:            &MODMAIL        714494672835444826
appeals:            &APPEALS        890331800025563216
appeals2:           &APPEALS2       895417395261341766```
rapid swallow
#

?appeal_category get

slow boneBOT
#

Currently configured appeal categories are: 890331800025563216, 895417395261341766

rapid swallow
#

ooh

#

I've a few questions but I must sleep now

cold island
#

and yes wtf please sleep

fervent sage
#

man it's been a while since I made PRs to pydis

cold island
#

hello

fervent sage
#

helo

#

(context: updated some links to my old domain to the new one for the bot tutorial)

cold island
#

oh nice, thanks

desert imp
#

yo is there a command to stop the bot?

#

ctrl-c do be kinda slow

cold island
#

you can ctrl-c again to kill it, though it might sometimes mess some things up

#

My suggestion would be to run the bot in a local environment and keep the site in docker. Then you only need to restart the bot without all of the other services

fervent sage
#

Re: site#876 the build failure isn't related to me right, that's just the actions runner getting ratelimited by GitHub's API?

dusky shoreBOT
timid sentinel
#

Yeah it's our actions

fervent sage
#

also github my beloved why are you using 403 for ratelimiting

timid sentinel
#

I'll probably just wait for @vale ibex to force merge it or something

fervent sage
#

Aight, well ty for the approvals and good night I'm off to bed :P

timid sentinel
#

Same, night

cold island
#

merged

timid sentinel
#

nice

cold island
#

We should probably figure out what to do about that, I think there was a suggestion some time ago

desert imp
#

i be spammin ctrl c

desert imp
cold island
#

assigned

#

@dusk sinew sorry for not noticing earlier, feel free to drop a message here if you want to take on an issue.

trim cradle
still comet
#

Also, you only need one backslash at the start of triple backticks (\``` is enough)

trim cradle
#

let's see

cold island
still comet
#

There are \n in the string

cold island
#

hmm right, so they'll need to be individually escaped

trim cradle
#

what version of poetry are people using? the latest apparently has a bug.

#

so I can't precommit Sadge

rapid swallow
#

I think

#

Had to uninstall 1.2 and then reinstall because poetry self update kept failing due to dependencies

rapid swallow
rapid swallow
rapid swallow
#

actually, nvm

desert imp
#

lint test failed because expecting ctx.send

vale ibex
#

The error a the bottom lists the 3 tests that need to be updated

desert imp
#

am i meant to do it

rapid swallow
fading galleon
#

@vale ibex I am not sure if you saw my comment on bot#2394 but can I be assigned it?

dusky shoreBOT
gritty wind
#

Just GitHub deciding to rate limit GitHub

desert imp
desert imp
#

put in the same pr ?

vale ibex
#

the lint-test CI just runs our test suite

desert imp
#

the test_snekbox is expecting a ctx.send

vale ibex
#

So you need to find the tests that failed, and update them so that they expect ctx.reply rather than ctx.send

desert imp
#

but i changed it to ctx.reply

vale ibex
vale ibex
#

Cool, if you run poetry run task test you will run the test suite locally

fading galleon
# vale ibex Sure

I have completed it just want to ask some questions, LinePaginator expects ctx, I changed it to accept both ctx and interaction but should I change the argument to something other than ctx like command_callback?

vale ibex
#

The union seems fine there

fading galleon
#

what about the argument name?

vale ibex
#

what does ctx get used for?

fading galleon
#

to send embed

vale ibex
#

is that all it gets used for?

fading galleon
#

and to get the author object

#

also if we change the argument name then if in some other file someone maybe had used it as a keyword argument, so thats also a problem

vale ibex
#

I'm tempted to say that we want to make a new paginator for buttons

#

maybe in bot-core

#

So that we can design the api to be nicer, rather than work around this

fading galleon
#

currently I have changed paginate to like this

fading galleon
desert imp
#

breh

vale ibex
#

tags?

fading galleon
dusky shoreBOT
vale ibex
#

oh right, yea it should justbe paginates

#

!tags

stable mountainBOT
#
Available tags

β€’
Β» args-kwargs
Β» async-await
Β» blocking
Β» botvar
Β» class
Β» classmethod
Β» codeblock
Β» comparison
Β» contribute
Β» customchecks
Β» customcooldown
Β» customhelp
Β» dashmpip
Β» decorators

vale ibex
#

see

vale ibex
# desert imp breh

looks like the test is expecting the mention at the start of the message too

desert imp
#

oh yea truee

vale ibex
#

rather than having to run the whole suite again

fading galleon
vale ibex
#

That doesn't seem right to me, the command isn't to search for tags, it's to output a tag

#

the searching is done as part of the auto complete

fading galleon
stable mountainBOT
#
Here are the tags containing the given keyword:

Β» class
Β» classmethod
Β» customhelp
Β» defaultdict
Β» docstring
Β» dunder-methods
Β» functions-are-objects
Β» global
Β» indent
Β» local-file
Β» mutability
Β» names
Β» repl
Β» scope
Β» self

desert imp
#

nice

#

now what

fading galleon
stable mountainBOT
#
Here are the tags containing the given keywords:

Β» classmethod
Β» defaultdict
Β» docstring
Β» dunder-methods
Β» mutability

vale ibex
desert imp
#

sir yes sir

vale ibex
fading galleon
#

so just remove it?

vale ibex
#

I think just /tag <name> and /tag list is enough

fading galleon
#

ok :)

vale ibex
#

/tag get <name> if slash comamnd don't support the other format

fading galleon
vale ibex
#

Yea, that sends the paginated embed

fading galleon
#

and to output the matching TagIndentifier.name

vale ibex
#

in the past year that command has been used 10 times

#

twice by you just a minute ago

fading galleon
#

actually that would be 3-4 times by me, I also used it in #bot-commands πŸ˜‰

vale ibex
#

Fair enough, in that case I'm fine with it being removed rather than having to maintain it in this migration and anything in the future

fading galleon
#

okay :)

vale ibex
#

alternatively, just leave it alone as a text command

#

and ignore it for this migration

fading galleon
static canyon
desert imp
#

idk why the lint-test changes didnt show up for me

vale ibex
desert imp
#

the test folder on my fork

#

wasn't updated

#

but for u guys it is

vale ibex
#

oh right

fading galleon
#

which one?

desert imp
outer oasis
#

It’s just list and search?
I’d vote for just removing them

vale ibex
#

run poetry run task precommit locally to install the pre commit hooks

#

that way the flake8 stuff will be picked up on your machine so you can fix them

desert imp
#

confused

fading galleon
#

alright I am making a pr with removed search is that good? @vale ibex

fallen patrol
#

that allows a highlighted message but without a notification

desert imp
outer oasis
#

I saw this for the first time this morning, but I haven’t seen how yet

desert imp
#

i just spent the fast 3 minutes trying to figure that out 😭

subtle kraken
outer oasis
desert imp
#

wut

subtle kraken
#

Icon?

#

Ah

desert imp
outer oasis
outer oasis
subtle kraken
fallen patrol
#

nope lol

subtle kraken
#

So only some % of people have it

fallen patrol
#

no lol

#

its fully implemented

subtle kraken
fallen patrol
#

ah, if you can't see the icon you need to update

subtle kraken
fallen patrol
#

it is

subtle kraken
#

I can see it
I cant use it

fallen patrol
#

@silent

#

@tidal wasp @subtle kraken

subtle kraken
fallen patrol
#

put @silent at the beginning of your message

subtle kraken
#

Right

subtle kraken
subtle kraken
#

It just gets removed from the message?

fallen patrol
#

yeah

subtle kraken
#

What a peculiar feature

#

I expected no more of discord

#

Alright then sorry for the confusion!

fallen patrol
desert imp
#

oh wow

subtle kraken
desert imp
#

that is quiet useful

fallen patrol
#

you can just do it on random messages too kek

subtle kraken
fallen patrol
#

i put it in twice to show you how

subtle kraken
#

Ahh

#

Lol fair enough

outer oasis
#

steve

#

y

subtle kraken
outer oasis
outer oasis
subtle kraken
#

another ~secret~ feature

fading galleon
#

bot#2403 the tests need a rewrite

dusky shoreBOT
fading galleon
#

discord.app_commands.Command doesn't has can_run like discord.ext.commands.Command

clever wraith
#

!d discord.app_commands.Command

stable mountainBOT
#

class discord.app_commands.Command(*, name, description, callback, nsfw=False, parent=None, guild_ids=None, auto_locale_strings=True, extras=...)```
A class that implements an application command.

These are usually not created manually, instead they are created using one of the following decorators:

β€’ [`command()`](https://discordpy.readthedocs.io/en/latest/interactions/api.html#discord.app_commands.command "discord.app_commands.command")

β€’ [`Group.command`](https://discordpy.readthedocs.io/en/latest/interactions/api.html#discord.app_commands.Group.command "discord.app_commands.Group.command")

β€’ [`CommandTree.command`](https://discordpy.readthedocs.io/en/latest/interactions/api.html#discord.app_commands.CommandTree.command "discord.app_commands.CommandTree.command")...
fading galleon
fading galleon
#

anyways did a work around to test it and all tests did pass πŸ˜ƒ , will commit
edit: committed

fading galleon
fading galleon
#

discord thing?

clever wraith
#

Ah, I think I know

#

Hold on

#

No, it's not what I thought

#

I'm on it

fading galleon
# dusky shore

also @vale ibex I decided not to keep the search sub-group and made the pr, is that okay?

clever wraith
#

@fading galleon

#

Can you please try merging main into your branch ?

#

I think it's because the lint & test workflow you have is the one being used

#

& it's not passing required data

#

to the status_embed workflow

fading galleon
clever wraith
#

You can't

#

At least, not our main branch

#

You need to undo that

fading galleon
#

yea I merged into my main branch

clever wraith
#

can you checkout to your branch main and do git log --oneline ?

#

Either that, or delete your local main branch

fading galleon
clever wraith
#

Okay

#

You need to sync your fork as well

#

With our repo

#

Pull, then merge main into your dev branch

fading galleon
#

yea did those

clever wraith
#

Only thing left is to push then πŸ™‚

fading galleon
#

also did that

clever wraith
#

Nice, now we wait

outer oasis
#

literally the only thing that changed

fading galleon
#

I mean I am on sync with you guys (my fork repo)

clever wraith
fading galleon
clever wraith
#

No it is there indeed

outer oasis
#

O wait

clever wraith
#

Ah !

#

secrets ?

fading galleon
outer oasis
#

Error: Discord webhook delivery failed! (status: 404; reason: Not Found)
Is the webhook there?

outer oasis
# clever wraith secrets ?

That's my guess
Webhook secret isn't there, so the URL is invalid
I think that's actually Discord's 404

fading galleon
#

so its a discord thingy?

clever wraith
#

But how can it not be there ? It should inherit from the actions secrets

outer oasis
fading galleon
outer oasis
#

O wait wat

#

Oh before merging main, yeah

clever wraith
#

That's an old one

fading galleon
#

yeah on my first commit

#

okay I gtg for now will be back in few hours

desert imp
#

yo im back

#

i updated the lint-test

#

but im not sure what i should do

cold island
desert imp
desert imp
#

i did that before i did my last commit

vale ibex
#

pre commit will only raise issues with the things you're committing after you installed it

#

If you want to run the pre commit hooks against all your code, run poetry run task lint

#

which calls pre-commit run --all-files under the hood

dense kernel
#

Anyone know how to reverse engineer a dll file#

clever wraith
dense kernel
potent garden
#

how can i contribute to making a tag?

#

wanna add !micropython

#
[MicroPython](https://micropython.org/) is a lean and efficient implementation of the Python 3 programming language that includes a small subset of the [Python standard library](https://docs.python.org/3/library/) and is optimised to run on microcontrollers and in constrained environments. MicroPython aims to be as compatible with normal Python as possible to allow you to transfer code with ease from the desktop to a microcontroller or embedded system.

is this fine?

fading galleon
# potent garden wanna add ``!micropython``

if its not already there make an issue explaining why its needed and what will be its description, after that you basically make a md file in bot/resources/tags after the issue is approved

potent garden
gritty wind
#

There’s a template with the required information

#

It’ll probably see some discussion and either get approved or rejected, then you can make a PR

potent garden
#

Alright

#

thanks

potent garden
gritty wind
#

Yeah unfortunately we sometimes don’t get back to things in a time-appropriate manner, especially if there is not interest or force behind the tag

#

What that usually means however though is its not likely to get accepted at any rate since it doesn’t seem like anyone is really interested

potent garden
#

ah okay, well i made the issue so if anyone would like to approve it, pls do πŸ™‚

gritty wind
#

It’ll get the right eyes on it there

desert imp
# vale ibex If you want to run the pre commit hooks against all your code, run `poetry run t...
stderr:
      error: subprocess-exited-with-error

      Preparing metadata (pyproject.toml) did not run successfully.
      exit code: 1

      [14 lines of output]
      Traceback (most recent call last):
        File "C:\Users\\.cache\pre-commit\repo3lagf2rx\py_env-python3\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 351, in <module>
          main()
        File "C:\Users\\.cache\pre-commit\repo3lagf2rx\py_env-python3\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 333, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
        File "C:\Users\\.cache\pre-commit\repo3lagf2rx\py_env-python3\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 152, in prepare_metadata_for_build_wheel
          return hook(metadata_directory, config_settings)
        File "C:\Users\\AppData\Local\Temp\pip-build-env-mz_nja_m\overlay\Lib\site-packages\poetry\core\masonry\api.py", line 40, in prepare_metadata_for_build_wheel
          poetry = Factory().create_poetry(Path(".").resolve(), with_groups=False)
        File "C:\Users\\AppData\Local\Temp\pip-build-env-mz_nja_m\overlay\Lib\site-packages\poetry\core\factory.py", line 57, in create_poetry
          raise RuntimeError("The Poetry configuration is invalid:\n" + message)
      RuntimeError: The Poetry configuration is invalid:
        - [extras.pipfile_deprecated_finder.2] 'pip-shims<=0.3.4' does not match '^[a-zA-Z-_.0-9]+$'

      [end of output]

      note: This error originates from a subprocess, and is likely not a problem with pip.
    error: metadata-generation-failed
clever wraith
#

Shall we bump the isort version in the pre-commit config ?

#

I think that fixed it for me

vale ibex
#

Yea, we should do that

static canyon
stable mountainBOT
#

bot/exts/moderation/infraction/infractions.py lines 162 to 171

@command(aliases=("vban",))
async def voiceban(self, ctx: Context) -> None:
    """
    NOT IMPLEMENTED.

    Permanently ban a user from joining voice channels.

    If duration is specified, it temporarily voice bans that user for the given duration.
    """
    await ctx.send(":x: This command is not yet implemented. Maybe you meant to use `​voicemute`​?")```
clever wraith
desert imp
vale ibex
#

If you rebase into main it should be fixed

desert imp
thorny obsidian
desert imp
thorny obsidian
#

You mean manually running the lint task gave you the above error or the larger actual error message you posted before?

thorny obsidian
#

That wasn't a yes or no question, I was asking which one is happening

desert imp
#

wait

#

fkin vs crashed 1 sec

#

let me run lint again

#
An unexpected error has occurred: CalledProcessError: command: ('C:\\Users\\\\.cache\\pre-commit\\repo3lagf2rx\\py_env-python3\\Scripts\\python.EXE', '-mpip', 'install', '.')
return code: 1
expected return code: 0
stdout:
    Processing c:\users\\.cache\pre-commit\repo3lagf2rx
      Installing build dependencies: started
          poetry = Factory().create_poetry(Path(".").resolve(), with_groups=False)
        File "C:\Users\\AppData\Local\Temp\pip-build-env-oihyfgie\overlay\Lib\site-packages\poetry\core\factory.py", line 57, in create_poetry
          raise RuntimeError("The Poetry configuration is invalid:\n" + message)
      RuntimeError: The Poetry configuration is invalid:
        - [extras.pipfile_deprecated_finder.2] 'pip-shims<=0.3.4' does not match '^[a-zA-Z-_.0-9]+$'

      [end of output]

      note: This error originates from a subprocess, and is likely not a problem with pip.
    error: metadata-generation-failed

    Encountered error while generating package metadata.

    See above for output.

    note: This is an issue with the package mentioned above, not pip.
    hint: See above for details.

Check the log at C:\Users\\.cache\pre-commit\pre-commit.log
#

different error on poetry run task lint

#

but same error on github

thorny obsidian
#

Hmmm, I'd need to boot up my laptop to take a look

vale ibex
#

Did you rebase into main?

desert imp
#

yep

vale ibex
#

What does your pre commit config file look like?

desert imp
#
repos:
  - repo: https://github.com/pre-commit/pre-commit-hooks
    rev: v2.5.0
    hooks:
      - id: check-merge-conflict
      - id: check-toml
      - id: check-yaml
        args: [--unsafe] # Required due to custom constructors (e.g. !ENV)
      - id: end-of-file-fixer
      - id: trailing-whitespace
        args: [--markdown-linebreak-ext=md]
  - repo: https://github.com/pre-commit/pygrep-hooks
    rev: v1.5.1
    hooks:
      - id: python-check-blanket-noqa
  - repo: https://github.com/pycqa/isort
    rev: 5.8.0
    hooks:
      - id: isort
        name: isort (python)
  - repo: local
    hooks:
      - id: flake8
        name: Flake8
        description: This hook runs flake8 within our project's environment.
        entry: poetry run flake8
        language: system
        types: [python]
        require_serial: true
vale ibex
#

The version of isort is still old

desert imp
#

I C it

vale ibex
#

Did you update your fork before rebasing onto main?

desert imp
#

i literally did wtf why didnt it update

#

ok now its updated

#
[INFO] Initializing environment for https://github.com/pycqa/isort.
[INFO] Installing environment for https://github.com/pycqa/isort.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
Check for merge conflicts................................................Passed
Check Toml...............................................................Passed
Check Yaml...............................................................Passed
Fix End of Files.........................................................Passed
Trim Trailing Whitespace.................................................Failed
- hook id: trailing-whitespace
- exit code: 1
- files were modified by this hook

Fixing tests/bot/exts/utils/test_snekbox.py

check blanket noqa.......................................................Passed
isort (python)...........................................................Passed
Flake8...................................................................Failed
- hook id: flake8
- exit code: 1

Executable `poetry` not found
#

is it because i changed the test file for snekbox?

vale ibex
#

No, this will be related to how you installed poetry

#

Did you install via pip, rather than the installer on their website?

desert imp
#

yes

vale ibex
#

That'll be the cause for this imo

desert imp
#

gotta install from there site?

vale ibex
#

Yea, follow their installation steps

#

You may need to remove poetry via pip first

static canyon
#

Can i please be assigned to sir-lancebot#1179?

desert imp
# vale ibex You may need to remove poetry via pip first
Check for merge conflicts................................................Passed
Check Toml...............................................................Passed
Check Yaml...............................................................Passed
Fix End of Files.........................................................Passed
Trim Trailing Whitespace.................................................Passed
check blanket noqa.......................................................Passed
isort (python)...........................................................Passed
Flake8...................................................................Passed
#

lets go 😎

#

now

#

what

vale ibex
#

Nice

vale ibex
desert imp
vale ibex
#

Did it fix the trailing whitespace?

desert imp
#

yep

vale ibex
#

Then yea commit that change and push for it to appear in the PR

desert imp
#

finally

fading galleon
#

bot#2394 is about migrating completely !tags to slash command and removing it as a text command right?

dusky shoreBOT
gritty wind
#

There were some possible issues that might’ve prevented a full migration, but I believe that is the ultimate goal yeah

#

Wait you already know this lol

#

Just skip that sentence and read the β€œI believe yeah” part πŸ‘

fading galleon
#

yea lol, but I think it kinda hurts the helpers like you know someone asks hey how can I detect a pattern in a string, and the helper replies you use regex and like when they do the slash command for the regex it only shows them the message and not the one recieving the help

#

possible work around for this would be that the helper says to them to like run the command themself to know more about what is regex

thorny obsidian
fading galleon
#

yea it isn't
edit: didn't know what ephemeral meant here, but it was set False

gritty wind
#

I understood this issue to just be moving the invocation part of the command, not the behavior afterwards

#

It would indeed hurt usability quite a bit if only you saw it

fading galleon
gritty wind
#

This is a hard question for me since I haven’t basically looked at discord.py since they did the interactions rewrite

#

I mean the API for sending text messages requires nothing more than a channel ID, surely you don’t need to reconstruct everything

fading galleon
fading galleon
gritty wind
#

Maybe, not sure you quite need to go that far

#

Looking at the docs, the interaction object has a .channel property which returns a channel object

#

That implements .send

fading galleon
#

oh, its good then

#

also context class has from_interaction

#

also I think by looking at the code intertaction.followup.send will also work

vale ibex
#

!d discord.InteractionResponse.send_message

stable mountainBOT
#

await send_message(content=None, *, embed=..., embeds=..., file=..., files=..., view=..., tts=False, ephemeral=False, allowed_mentions=..., suppress_embeds=False, silent=False, delete_after=None)```
This function is a [*coroutine*](https://docs.python.org/3/library/asyncio-task.html#coroutine).

Responds to this interaction by sending a message.
vale ibex
#

if you want to respond to an interaction with a message

#

This can be found on the Interaction object under the response attr

#

The followup webhook is only used when you can't respond the the interaction within a resonable amount of time, so you do await interaction.response.defer() and then use the interaction.followup webhook to respond later

fading galleon
vale ibex
#

only if you set ephemeral to true

fading galleon
#

I saw it in the send method of the context, so you know I thought it can be used

rapid swallow
fading galleon
cold island
#

@fossil veldt the only issue I see left with your PR is the matter of txt files. You make a valid point that this could be a common use case for the feature, but at the same time our filtering rules should still apply. I'm wondering if we can create a compromise here, where txt/csv/json files will be uploaded to the pastebin instead, or displayed like the stdout is if it's the only file and there's no stdout.

trim cradle
#

Still having this issue with precommit. I tried solutions involving upgrading isort to 5.12, and that didn't solve it.

C:\Users\17032\development\pydis\bot(swfarnsworth-automated-markdown-messages -> origin)
(bot-py3.10) Ξ» git commit -m "Removed unused vars; add code-only line breaks for long strings; fix escapes for tickmarks."
[INFO] Installing environment for https://github.com/pycqa/isort.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
An unexpected error has occurred: CalledProcessError: command: ('C:\\Users\\17032\\.cache\\pre-commit\\repo3n7_gm9a\\py_env-python3\\Scripts\\python.EXE', '-mpip', 'install'
, '.')
return code: 1
expected return code: 0
stdout:
    Processing c:\users\17032\.cache\pre-commit\repo3n7_gm9a
      Installing build dependencies: started
      Installing build dependencies: finished with status 'done'
      Getting requirements to build wheel: started
      Getting requirements to build wheel: finished with status 'done'
      Preparing metadata (pyproject.toml): started
      Preparing metadata (pyproject.toml): finished with status 'error'

stderr:
      error: subprocess-exited-with-error

      Preparing metadata (pyproject.toml) did not run successfully.
      exit code: 1

      [14 lines of output]
      Traceback (most recent call last):
        File "C:\Users\17032\.cache\pre-commit\repo3n7_gm9a\py_env-python3\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 351, in <module>
          main()
        File "C:\Users\17032\.cache\pre-commit\repo3n7_gm9a\py_env-python3\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 333, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
        File "C:\Users\17032\.cache\pre-commit\repo3n7_gm9a\py_env-python3\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 152, in prepare_metadata_for
_build_wheel
          return hook(metadata_directory, config_settings)
        File "C:\Users\17032\AppData\Local\Temp\pip-build-env-jehxuyvg\overlay\Lib\site-packages\poetry\core\masonry\api.py", line 40, in prepare_metadata_for_build_wheel   
          poetry = Factory().create_poetry(Path(".").resolve(), with_groups=False)
        File "C:\Users\17032\AppData\Local\Temp\pip-build-env-jehxuyvg\overlay\Lib\site-packages\poetry\core\factory.py", line 57, in create_poetry
          raise RuntimeError("The Poetry configuration is invalid:\n" + message)
      RuntimeError: The Poetry configuration is invalid:
        - [extras.pipfile_deprecated_finder.2] 'pip-shims<=0.3.4' does not match '^[a-zA-Z-_.0-9]+$'

      [end of output]

      note: This error originates from a subprocess, and is likely not a problem with pip.
    error: metadata-generation-failed

    Encountered error while generating package metadata.

    See above for output.

    note: This is an issue with the package mentioned above, not pip.
    hint: See above for details.

Check the log at C:\Users\17032\.cache\pre-commit\pre-commit.log
vale ibex
trim cradle
vale ibex
#

not as far as this is concerned

trim cradle
#

do I just git rebase main or what

vale ibex
#

Yea that will update the commits on your branch to instead be based fromt he most recent commit on main

trim cradle
#

my PR was so old that the branches have diverged
so uh
RIP

vale ibex
#

conflicts are fun

trim cradle
#

I'll just redo it in a new branch, I guess

fossil veldt
#

isn't the main reason we disallow txt files that we encourage people to use pastebin instead?

#

but that doesn't seem to apply to the eval bot situation

cold island
fossil veldt
#

well, normally the pastebin is a benefit because people upload large code chunks and it allows you to view them on mobile or something without downloading the file

cold island
fossil veldt
#

I'm assuming most of the text file outputs will be short demos and the discord preview seems to be sufficient in this case

fossil veldt
#

still feels a bit strange to have some file uploads turn into a pastebin link, instead of an actual file

cold island
#

It might not be the solution you envisioned, but it'll at least allow these file types

fossil veldt
#

hm..

#

so like, a new pastebin for each file?

#

we could do a direct code block for text files under a certain character count perhaps?

#

that'll have the benefit of it being visible on mobile as well

#

could be an embed as well I suppose

cold island
fossil veldt
#

it'd probably be more consistent to do it with every text file

#

we'd need to character limit the single output anyways (just like multiple)

fossil veldt
#

like show our own code block for text files when under a character limit

#

even for multiple ones

#

@fossil veldt βœ… Your 3.11 eval job has completed with return code 0.

test.txt

abc

test2.txt

xyz
cold island
#

It'd have to be a shared character/line limit

fossil veldt
#

same as the main snekbox output perhaps?

#

as the total limit

cold island
#

probably, yeah

fossil veldt
#

looks like currently 10 lines or 1000 chars

fossil veldt
cold island
fossil veldt
#

the file gets to us as bytes

#

if displaying inline, we have to decode utf-8

#

it may error

cold island
#

in that case would you be able to open it if it were a file?

#

either way, the decode function has an option for how to handle errors

fossil veldt
#

we could use mode="ignore"

#

or use the default strict and list decode errors

#

currently we have to decode stdout as well but that's done in snekbox

#

!e

import sys

sys.stdout.buffer.write(bytes([240, 40, 140, 40]))
stable mountainBOT
#

@fossil veldt :x: Your 3.11 eval job has failed.

UnicodeDecodeError: invalid Unicode in output pipe
cold island
#

how does snekbox handle errors?

fossil veldt
#

just shows that in stdout instead ^

cold island
#

'replace' or 'backslashreplace' would probably work here I think

#

to not completely omit the character

fossil veldt
#

think it uses the replace mode for preview

cold island
#

we can go with that then

fossil veldt
#

!e

print(bytes([240, 40, 140, 40]).decode("utf-8", "ignore"))

print(bytes([240, 40, 140, 40]).decode("utf-8", "replace"))
stable mountainBOT
#

@fossil veldt :white_check_mark: Your 3.11 eval job has completed with return code 0.

001 | ((
002 | οΏ½(οΏ½(
fossil veldt
#

yeah replace adds those οΏ½

#

seems reasonable

fossil veldt
cold island
# fossil veldt

maybe something like "the file is too big. The full contents of the file can be found here:" before the link

#

but also, the limit here seems to be for xyz.txt specifically, and not across all files

#

If I have 10 txt files with 9 lines each, that's a lot of lines

fossil veldt
#

it's currently 10 lines / 1000 chars shared for all files

#

except files with 1 line and less than 50 chars which always get displayed inline

#

because that's literally less than the URL

cold island
#

lol

#

fair enough

fossil veldt
#

hm

#

what to show for empty files

#

we could add a space to show the block

cold island
#

or (Empty)

#

or [Empty] to match with [No Content]

fossil veldt
royal prawn
#
with open('output/b.txt', 'w') as f:
    f.write('[Empty]')
slim venture
#

what does python discord use for formatting?

#

i'm assuming black?

#

or wait flake8

tawdry vapor
#

Mostly flake8. Some repositories are using black

desert imp
cursive relic
#

Would it be possible to remove/disable the button or change it's colour (to grey or something) after it is not possible to receive a bookmark anymore?

clever wraith
#

But i might be mistaken

static canyon
#

Or changing it to the greyed out button

vale ibex
#

I'm thinking of removing that entirely

#

once sir-lancebot#1176 is merged it will be a context menu command, we can remove the text based command and have it not fill up the text channel at all

dusky shoreBOT
vale ibex
#

Speaking of @clever wraith could you rebase this branch onto main when you get a chance?

clever wraith
#

However, am I supposed to see all those commits ?

vale ibex
#

Yea that doesn't look right πŸ˜…

clever wraith
#

xD

vale ibex
#

looks like your fork's main doesn't match the main repo's main

clever wraith
#

Humm, I did sync then pull before I rebased

#

Shall I reset ?

vale ibex
clever wraith
#

& when I pull

#

Did I commit to main by mistake ?

vale ibex
#

could you run git remote -v

clever wraith
#

I wouldn't be surprised

#

They both point to my fork's

vale ibex
#

on your fork repo

#

ah nvm

#

this is good

clever wraith
#

I think I know

#

One sec

vale ibex
#

can you run git remote add upstream git@github.com:python-discord/sir-lancebot.git

#

this will add the main repo as an upstream, then you can reset your main to upstream main

clever wraith
vale ibex
#
git remote add upstream git@github.com:python-discord/sir-lancebot.git
git fetch -a
git checkout main
git reset --hard upstream/main
git push -f
clever wraith
#

You see how there's the same commit twice ?

vale ibex
#

Yea

clever wraith
#

With different hashes, ofc

#

I think that when I was bumping isort

#

I did commit to main by mistake

#

Then i forgot about it

#

I remember doing such a mistake

vale ibex
#

hah no worries

#

you can use the above commands to reset your fork's main to upstream's main

#

then you can checkout your branch and do git rebase main

clever wraith
#

fatal: ambiguous argument 'upstream/main': unknown revision or path not in the working tree.

It seems it doesn't recon what upstream/main is.
I tried fetching from upstream using git fetch upstream, but it says I can't read from remote repo

vale ibex
#

do you use ssh auth or https?

#

My command above used ssh, if you use https instead, you can run git remote set-url upstream https://github.com/python-discord/sir-lancebot.git

#

then git fetch -a

clever wraith
#

It's the one that PyCharm uses by default, not sure what it is

#

That didn't do it either

vale ibex
#

what does git remote -v say?

clever wraith
#

upstream for pydis, origin for my fork

vale ibex
#

what urls?

clever wraith
#

I was screenshooting them :B

vale ibex
#

kk cool, does git fetch -a give an error?

clever wraith
#

Nope

vale ibex
#

what does git branch -a output?

clever wraith
#

None

#

It doesn't output anything

vale ibex
#

huh

clever wraith
vale ibex
#

what about -r?

clever wraith
#

xD, it doesn't recognize that option
Is it the "refetch" one ?

vale ibex
#

git branch -a

#

not git fetch

clever wraith
#

ah shit

#

I misread, sorry sorry πŸ˜…

vale ibex
#

no worries

clever wraith
#

It's not listing the other remotes' branches

vale ibex
#

try git fetch upstream instead

#

see if it errors

clever wraith
#

Aha !

#

That worked

#

let me try resetting

#

yes !

vale ibex
#

oh

#

I know why

#

-a on git fetch isn't an alias to --all

clever wraith
#

Oh

#

Ok, now it's not letting me push. But ig because it's trying to push to upstream ?

#

So i'll need to change it back to origin

vale ibex
#

what's the error and what are you trying to push?

clever wraith
#

I rebased my branch onto main

vale ibex
#

did you do git push -f?

#

if you rebase you need to add -f for force

#

since the things you're pushing won't match the remote branch, you need to tell git you know what you're doing and push it anyway

clever wraith
#

ah yeah, to rewrite the history ?

vale ibex
#

yea

#

cool, that PR looks better now

#

just 1 file changed

clever wraith
#

there we go

#

Thanks for the support ! :B

cursive relic
vale ibex
#

it would mean when someone bookmarks something, it won't post anything in chat, since it isn't needed anymore

cursive relic
#

I see

clever wraith
#

You can try it now if you'd like, it's just been deployed

cursive relic
#

Nice, it works nicely. Just that to not be able to bookmark content someone else might have just bookmarked can't be done anymore

clever wraith
#

I bookmarked a msg here, but only I can see it

dusky shoreBOT
vale ibex
#

Was able to delete quite a lot of stuff

fading galleon
#

@timid sentinel bot#2403, I resolved your reviews and added mine can you check those?

dusky shoreBOT
timid sentinel
fading galleon
#

by "added mine" I meant I added my reviews

gritty wind
#

That allows you to submit your comments, an overall comment, and an overall decision (approve, request changes, or just add comments)

#

Till then your comments are only visible to you (hence the "pending")

fading galleon
desert imp
#

should i change all ping on commands to reply?

desert imp
fallen patrol
#

@vale ibex I made lancebot#1212 b4 you fixed it but if you want to merge just the typo fix that might be etter

vale ibex
#

clearly you're too slow

#

I'll merge your's though, so it's not blocked

full fractal
#

I forgot that all of our projects are Python 3.10+. I have a functional 3.10 build in my downloads folder but it's still not installed. I should probably go change that soon...

full fractal
#

overengineered solution almost good to go

outer oasis
#

You wrote a parser for the existing HTML?

full fractal
#

yes

bleak temple
outer oasis
#

firT
Are you going to be able to use it again after you change it?

full fractal
#

although I don't intend to

outer oasis
#

Oh that's way shorter than I would have assumed

full fractal
#
print("\n\n".join(reversed(entry_html_pieces)))

and boom, the timeline is reversed without needing to do it manually which is tedious and boring

full fractal
#

did docker change their default output formatting? this looks new (and great!)

tawdry vapor
#

By the way, you should docker compose without a dash so it uses the new version (2.x), but could be that the dashed command is an alias for the new version now

vale ibex
#

Please don't advertise here

fading galleon
#

wheres the source of the lancebot command that reacts to messages lile bot#1234 with an embed containing the link?

dusky shoreBOT
fading galleon
#

I thought the bot will ignore it because its enclosed in backticks :/, could be added as a feature though?

rapid swallow
#

bot#2372 site#824

rapid swallow
#

Will accept reviews in exchange for "joe_salute "

#

@timid sentinel joe_salute

here's yours, got lost in the mail

fading galleon
bleak temple
#

@vocal prairie Do you still need changes done for bot#2388

dusky shoreBOT
full fractal
brazen charm
#

I think docker-compose always came with docker? But compose is now built into docker and its subcommand

rapid swallow
rapid swallow
#

docker-compose was written in python

vale ibex
#

Depending on how, when, and what host ypi are running, when you installed docker it may come bundled, if not you can install following this https://docs.docker.com/compose/install/

Docker Documentation

Learn how to install Docker Compose. Compose is available natively on Docker Desktop, as a Docker Engine plugin, and as a standalone tool.

fallen patrol
#

depending on your distro there should be a way to get the docker-compose shim for docker compose

#

if there's any issues you have with docker compose not working how docker-compose used to work, be sure to report them

#

its supposed to be a drop-in replacement

#

and so far I can vouch for that

#

well.... its not actually a drop in replacement, its actually less buggy

fading galleon
#

hehe I am gonna give two joe_salute for reviewing my pr, although I have lost count for wookie, heres for you @clever wraith joe_salute joe_salute

#

also Bella, I didn't push the fixes because I was waiting for wookie to reply to my reviews as they were related to his reviews, so it kinda made sense to push it after the discussion

clever wraith
#

So better mark them as resolved once we see the concrete changes.
In any case, no worries πŸ˜„

clever wraith
#

How do i setup @stable mountain bot i keep getting a error

clever wraith
#

@dim pelican

fading galleon
clever wraith
#

Do i need make like

#

import discord
from discord.ext import commands

#

?

fading galleon
#

after setting up docker and poetry do poetry run task start instead of running main.py

vale ibex
#

The bot will not work in repl.it, as it has dependencies on a few other projects too, such as having our site api runinng, postgres & redis

clever wraith
#

...

#

What can i use then

#

Like normal python?

vale ibex
#

that's currently the only method of running that we support.

clever wraith
#

Will bot be on 24/7?

vale ibex
#

is your computer on 24/7?

clever wraith
#

Sometimes

vale ibex
#

if you are running the bot on your computer, then it will be live for as long as it's running on your computer

clever wraith
#

Alr thx for your support

fading galleon
#

bot#2394 I am asking again as of wookie's comment is it a full migration or are we keeping the command being invoked when using the tags directly i.e !code and just removing its invocation by !tags get code

dusky shoreBOT
cold island
#

@fossil veldt maybe I'm missing something, doesn't one \n mean two lines?

#

I'll just add the comments to the PR

fossil veldt
cold island
fossil veldt
#

I don't think 5 lines from stdout + 5 lines from text is too crazy, but then again I don't think it's common at all to use both stdout and text output

cold island
#

Well 5+5 is still within the limit

fossil veldt
#

ah yeah it's 10

#

I guess it's just this then?

budget_lines = MAX_OUTPUT_BLOCK_LINES - (output.count("\n") + 1)
budget_chars = MAX_OUTPUT_BLOCK_CHARS - len(output)
cold island
#

Yeah seems right

fossil veldt
#

Alright all the changes in the comments should have been pushed now

#

and thanks for the reviews πŸ‘ spotted a lot of stuff I wouldn't have

cold island
#

I'll do some final testing before approving, and then I'll let Mark decide whether he wants to take a final look since there were some changes since his approval

fossil veldt
#

sure sounds good

#

I should maybe have added some tests for these text format stuff but

#

that just feels like more work down the road changing tests with format changes

#

don't really feel like those kind of hard coded tests with string formats do much

stable mountainBOT
#

tests/bot/exts/utils/snekbox/test_io.py lines 12 to 13

@skipIf(platform.system() == "Windows", "File names normalizer tests requires Unix-like OS.")
def test_normalize_file_name(self):```
fossil veldt
#

looks like it'll forever have to be skipped on windows

#

both os and pathlib operate in special windows mode and strips illegal path chars for windows (that we need to account for since both bot and snekbox are unix)

#

!e

from pathlib import Path

print(Path("\\n"))
stable mountainBOT
#

@fossil veldt :white_check_mark: Your 3.11 eval job has completed with return code 0.

\n
fossil veldt
#

this becomes /n on windows πŸ₯΄

outer oasis
fossil veldt
#

pathlib should really have UnixPath and WindowsPath available on both OS

outer oasis
#

IKR

#

Hecking hecks me off

#

Is there any real reason not to?

cold island
#

You can use a PosixPath on Windows as far as I know if you import it directly

fossil veldt
#

!e

from pathlib import WindowsPath

print(WindowsPath("hi"))
stable mountainBOT
#

@fossil veldt :x: Your 3.11 eval job has completed with return code 1.

001 | Traceback (most recent call last):
002 |   File "<string>", line 3, in <module>
003 |   File "/usr/local/lib/python3.11/pathlib.py", line 873, in __new__
004 |     raise NotImplementedError("cannot instantiate %r on your system"
005 | NotImplementedError: cannot instantiate 'WindowsPath' on your system
fossil veldt
#

same thing on windows for PosixPath

cold island
#

Oh yeah I was thinking of pure paths

fossil veldt
#

hm

outer oasis
#

hm

#

!eval

from pathlib import PureWindowsPath

print(PureWindowsPath("hi"))
stable mountainBOT
#

@outer oasis :white_check_mark: Your 3.11 eval job has completed with return code 0.

hi
outer oasis
#

checks out

fossil veldt
#

what is different in a purepath firT

outer oasis
#

Absolutely no idea

outer oasis
cold island
#

You can't actually interact with the os I'm guessing

#

With a method

#

Like .rename

#

!eval

from pathlib import PureWindowsPath

print(PureWindowsPath("hi").rename)
stable mountainBOT
#

@cold island :x: Your 3.11 eval job has completed with return code 1.

001 | Traceback (most recent call last):
002 |   File "<string>", line 3, in <module>
003 | AttributeError: 'PureWindowsPath' object has no attribute 'rename'. Did you mean: 'name'?
cold island
#

Yeah

fossil veldt
#

I guess that's what we should use instead firT

cold island
#

I guess so

fossil veldt
fading galleon
#

@clever wraith I updated the pr, re-reivew please github only lets me request re-review from one person

clever wraith
cold island
#

Hmm I tried to run the bot with a custom snekbox image and it's giving me

ClientConnectorError: Cannot connect to host snekbox:8065 ssl:default [Temporary failure in name resolution]

πŸ€”

sharp crag
#

I remember running into this issue at one point with snekbox

cold island
#

oh right. I just didn't read the guide correctly

cold island