#dev-contrib

1 messages Β· Page 173 of 1

fervent sage
#

*somewhat easily

#

well, as long as I can figure out how to make sphinx work how I want

gritty wind
#

Based on past experiences, good luck

fervent sage
#

As I see it there's no reason for us (Nextcord and Disnake) to be documenting the discord namespace as it's just an alias and doesn't provide any useful additional content to the docs

gritty wind
#

It might be useful for the search, but still seems pretty niche

fervent sage
#

all it really needs is a line that says "You can also use the discord namespace with the same symbols as you see here"

hoary haven
#

could i get 1 more contrib/staff review for bot#2121

dusky shoreBOT
fallen patrol
#

*last

#

I explained a solution that already mostly exists but it must have not been looked at

gritty wind
#

I saw it

#

And it would require quite a bit of work to not hardcode

#

Which as I’ve explained

#

Is not worth it

brazen charm
fallen patrol
#

they aren't

#

its the first ones that are renamed

#

the newer one replaces it iirc

#

!src docs

stable mountainBOT
#
Command: docs

Look up documentation for Python symbols.

Source Code
stable mountainBOT
#

bot/exts/info/doc/__init__.py lines 6 to 8

PRIORITY_PACKAGES = (
    "python",
)```
fallen patrol
#

no, wait

#

it only keeps the existing if it is the python package

brazen charm
fallen patrol
signal forge
#

Is there any particular section of bot that makes good use of the site api? I'm trying to understand how two interact with each other.

molten perch
#

If I were you I'd take a look at reminders.

signal forge
molten perch
#

I totally understand. Although, the documentation was updated and enhanced a few weeks ago, so it should be easier to navigate in the project.
https://github.com/python-discord/site/tree/main/pydis_site See the readme.
If you visit the "api" app, there is a readme there as well, explaining the structure of the project.

#

Also, feel free to ask if you have any questions!

dim pelican
signal forge
#

It was recommended in the issue that was opened and supported by Blue in the PR.

molten perch
#

You mean an endpoint?
If so, you could check out previous PRs.
I have one myself, and Chris has one as well, those are pretty recent so they reflect our current "tech stack" if you will.
site#663
site#689

signal forge
#

I guess my confusion lies in where or even if the scraping code is needed if an API endpoint is implemented.

molten perch
#

I haven't checked out your PR, or the idea regarding this endpoint. Will try to check it out, in the meantime, if you have any questions feel free to ask! πŸ™‚

signal forge
molten perch
cold island
signal forge
cold island
#

Scraping is more for when you only have access to the HTML served, for example when you access a third party website. But here you're the first party

vale ibex
#

Is this part that requires scraping / an API endpoint a requirement of the feature, or is it an enhancement?

#

if it's the former, I'd recommend limiting the first PR to just the core feature, and then opening an enhancement PR after the site PR is merged

#

a small PR now and another small one later is better than 1 big PR at the end

brisk brook
#

@signal forge, to be clear, I saw the comment you made and have noted it. I want to give adequately clear instructions in the issue so I didn't really have time for it today. Same goes for your PR, it's looking great I just have to play around with it myself a bit!

#

If anyone else has some time to write up an issue with some light pointers on where, when and how feel free!

signal forge
hoary haven
#

can a core dev look at bot#2120 and if approved, assign the interested party?

molten perch
thorny spade
molten perch
#

I can, later on today, if someone else won't have already done it by then.

rapid swallow
thorny spade
sturdy jungle
#

the import docs seem to be broken

vale ibex
#

!d import

stable mountainBOT
#

7.11. The import statement


import_stmt     ::=  "import" module ["as" identifier] ("," module ["as" identifier])*
                     | "from" relative_module "import" identifier ["as" identifier]
                     ("," identifier ["as" identifier])*
                     | "from" relative_module "import" "(" identifier ["as" identifier]
                     ("," identifier ["as" identifier])* [","] ")"
                     | "from" relative_module "import" "*"
module          ::=  (identifier ".")* identifier
relative_module ::=  "."* module | "."+
```...
vale ibex
#

ha yea, looks like there's a lot of spaces on the page, causing this to wrap to a new line

#

the embed would need to be about twice as wide for it to fit nicely

#

not much we can do about it though, since we take it directly from the docs shrugR

hoary haven
#

it will get reviewed in due time, don't worry

thorny spade
scarlet osprey
#

heyyy im looking to contribute to something to pydis. is there any open issue that I can have a look at? i’m fairly intermediate with python but might need some time to read the docs if it involves frameworks

dim pelican
#

Sure thing, let me link the contributing info

#

!contribute

stable mountainBOT
#

Contribute to Python Discord's Open Source Projects
Looking to contribute to Open Source Projects for the first time? Want to add a feature or fix a bug on the bots on this server? We have on-going projects that people can contribute to, even if you've never contributed to open source before!

Projects to Contribute to
β€’ Sir Lancebot - our fun, beginner-friendly bot
β€’ Python - our utility & moderation bot
β€’ Site - resources, guides, and more

Where to start

  1. Read our contribution guide
  2. Chat with us in #dev-contrib if you're ready to jump in or have any questions
  3. Open an issue or ask to be assigned to an issue to work on
dim pelican
scarlet osprey
#

Cool stuff

thorny spade
#

id recommend starting with it

#

also nice

surreal veldt
#

In a PR, can I link another PR with a hyperlink?

brisk brook
#

Yes, but it's better to use #

austere hornet
#

Not only better, it's easier! (For me at least)

brisk brook
vale ibex
#

looking into it

#

Looks like it's not a self-hosted service and I don't have access afaik

#

I've messaged joe

fallen patrol
#

cc @dim pelican @daring pelican the docs command has one hard limitation which makes it work very effectively.

The docs command uses sphinx objects.inv files, which have a list of every symbol in the documentation and a link to exactly where the definition of the file is. This means that we have list of everything defined, and don't need to fetch it all at once.

As a user requests a symbol, the bot fetches the page and adds all symbols on the page to a parse queue. These pages are then put through bs4 and markdownify to turn the html into markdown, which is then cached and sent to discord.

#

In essence, the important thing here is the objects.inv file which lists where everything is defined, which turns the entire thing into child's play (in comparison to having to find every definition myself)

#

That does mean that is has the hard limitation of only working on documentation made with sphinx

brisk brook
#

@signal forge I am looking at creating the issue with some helpful steps, and found this now, have you seen it before?

https://github.com/python-discord/site/blob/main/pydis_site/apps/resources/templatetags/to_kebabcase.py

I think you could copy this logic and use it together with the line splitting (essentially extending .lower().replace(" ", "-")).

GitHub

pythondiscord.com - A Django and Bulma web application. - site/to_kebabcase.py at main Β· python-discord/site

thorny spade
#

hi

#

wihtout assignment

rapid swallow
#

what?

#

oh

#

@trail pilot (Shom770) is heading that

thorny spade
#

can i open a pr without assignment

rapid swallow
#

if any of the pin authors don't want to PR their message to the site, but is ok with it being on the site, you can PR it

rapid swallow
thorny spade
rapid swallow
#

then no

thorny spade
#

can i open a pr?

rapid swallow
#

but Fronto can tell you if there's a pin that you can migrate to site

#

which is why i pinged him

#

but currently, we're trying to get the pin authors to PR it to site

thorny spade
#

ah

#

ok

trail pilot
#

which means you'd open a PR to add the markdown content of the pin to the site

trail pilot
#

since it fits into the pin he's migrating

#

i can tell you which pins are currently available

#

(sorry for not updating which pins are taken)

thorny spade
#

kay ill close

trail pilot
#

alright, just updated the list of which are taken

surreal veldt
#

Is there a way to see or can I ask for issues that aren't assigned?

placid ermine
#

go to the issues page of the repo and check the issues where the assignee column is empty

dim pelican
#

Should also be able to filter right?

placid ermine
#

oh, didnt know that existed

fallen patrol
#

lmao what is the purpose of sir robin

dim pelican
#

Its the events bot, its for events and stuff

fallen patrol
#

it says event bot but it seems like pep and zen are being ported to it?

placid ermine
#

perchance

fallen patrol
#

so... peps are events now??

placid ermine
#

perchance

stable mountainBOT
#

bot/exts/pep.py lines 17 to 18

BASE_PEP_URL = "https://peps.pythondiscord.com/pep-"
PEPS_LISTING_API_URL = "https://api.github.com/repos/python-discord/peps/contents?ref=main"```
fallen patrol
dim pelican
#

Doesn't look like anything to me

fallen patrol
#

ah i see you guys are actually deploying your own custom peps page

signal forge
sharp crag
#

Sorry my PR has been idle for a bit, I’ve just been busy. I’ll get all the reviews suggestions in 😊

gritty wind
#

The best place is probably the Sphinx docs, but very ironically they are terrible

#

Still the best place I found (besides SO for specific things you need to learn)

timid sentinel
#

!timeit

[i for i in range(100_000)]
stable mountainBOT
#

@timid sentinel :white_check_mark: Your timeit job has completed with return code 0.

50 loops, best of 5: 7.85 msec per loop
timid sentinel
#

nice. CC @sleek steppe!

dim pelican
#

Oh that got merged? Very nice

fallen patrol
#

have not successfully used them

sleek steppe
signal forge
#

Whoot Whoot! Congrats @sleek steppe

surreal veldt
#

For the timit command, maybe format the error that comes in the codeblock?

#

example:
Above one is the same code from an eval command, bottom is from the timit command
#bot-commands message
#bot-commands message

timid sentinel
surreal veldt
#

In the first command run in the screenshot above it's formatted

timid sentinel
#

That's because with the eval command the code is run directly, so the traceback is normal by default, however with timeit it's run using python -m timeit <code> meaning the traceback includes some stuff in timeit's internals

surreal veldt
#

oh okay

#

What do you think of this suggestion: use the black forntter as a command to format code

#

I have it implemented like this:

formatted_code = subprocess.run(['python', '-m', 'black', '--code', f"""{code}"""], capture_output=True, text=True)```
sleek steppe
#

There's an open issue (bot#1880) that has some discussion around that topic

dusky shoreBOT
surreal veldt
#

Is that assigned?

#

I'll look at it first actually

#

oh that's pretty old huh lol

#

okay so yeah then maybe a format command tag that links black's playground?

timid sentinel
#

It's not assigned, partly because there wasn't a consensus on whether it was necessary. It's something that seems to be brought up quite often and shouldn't be too difficult to implement so tbh I don't really see an issue with doing it. If we were to add it it should be through snekbox rather than just running a subprocess though. I might bring it up to be discussed in the next staff meeting so we can decide whether it's something we want.

thorny spade
sharp crag
#

Cool, just fixed the reviews for site#697 πŸ˜„

dusky shoreBOT
surreal veldt
#

Can I bump site#698 ?

dusky shoreBOT
sharp crag
surreal veldt
#

thank you!

hoary haven
#

@sharp crag sounds good, give me like... 3-4 days to put it all together into an issue

rapid swallow
#

scoff had brought it up in #mod-tools but i dont think an issue was made
never mind

#

I don't think you can have <t:1648747461>-type timestamps in embed footers

surreal veldt
#

Yeah description only

hoary haven
#

ah

surreal veldt
#

Maybe consider
embed = discord.Embed(timestamp=datetime.datetime.utcnow())

#

It can update itself according to time

fallen patrol
thorny spade
#

can a core dev review this and if approve, assign me (@MaskDuck on github)?

fallen patrol
#

that change isn't great imo

austere hornet
# thorny spade can a core dev review this and if approve, assign me (`@MaskDuck` on github)?

Hey! I've noticed you ask about this quite often. I suggest that you give it some time because we are all volunteers here and everyone has lives outside of Discord. Eventually someone will review the issue and if you comment on the issue that you'd like to be assigned, you will be assigned if the issue is approved. I'm not trying to sound rude at all, all I'm saying is you should really give people some time because again, we are all volunteers here.

I understand that as a beginner, you would want to be able to start coding ASAP, bur unfortunately, that can't always happen. I am also a fairly new contributor to PyDis and have always felt that people were simply ignoring me but then came to realize that that's not true, it's simply because people don't have the time. I hope you understand and I apologize if I come out as rude at all. Just thought I'd point it out and hope this might be useful for other new contribs that pop in here in the future.

austere hornet
#

No worries! Now you'll know :) :)

fallen patrol
frozen wren
#

Hello guys. I wonder what is the module name of this function? (!d <variable>) (The function that calls the bot to return the link)

#

!d print

stable mountainBOT
#

print(*objects, sep=' ', end='\n', file=sys.stdout, flush=False)```
Print *objects* to the text stream *file*, separated by *sep* and followed by *end*. *sep*, *end*, *file*, and *flush*, if present, must be given as keyword arguments.

All non-keyword arguments are converted to strings like [`str()`](https://docs.python.org/3/library/stdtypes.html#str "str") does and written to the stream, separated by *sep* and followed by *end*. Both *sep* and *end* must be strings; they can also be `None`, which means to use the default values. If no *objects* are given, [`print()`](https://docs.python.org/3/library/functions.html#print "print") will just write *end*.

The *file* argument must be an object with a `write(string)` method; if it is not present or `None`, [`sys.stdout`](https://docs.python.org/3/library/sys.html#sys.stdout "sys.stdout") will be used. Since printed arguments are converted to text strings, [`print()`](https://docs.python.org/3/library/functions.html#print "print") cannot be used with binary mode file objects. For these, use `file.write(...)` instead.
stable mountainBOT
#
Command: docs

Look up documentation for Python symbols.

Source Code
frozen wren
#

!src close

stable mountainBOT
#
Command: close

Make the current in-use help channel dormant.

Source Code
frozen wren
#

!src src

stable mountainBOT
#
Command: source

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

Source Code
rapid swallow
#

@frozen wren feel free to test the commands in #bot-commands lemon_pleased

hoary haven
#

@covert fog thanks for the issue! sir-robin#30

dusky shoreBOT
austere hornet
signal forge
placid ermine
#

@covert fog i'd prefer if i fixed the boolop error myself, but feel free to pr the fix for the *args **kwargs error

covert fog
placid ermine
#

approved

gritty gate
placid ermine
#

oop

brisk brook
#

@placid ermine did you make any note on where/how to fix this? I just want to know so that it doesn't go untracked and we forget about it!

placid ermine
#

yeah ive found the place

brisk brook
#

Okay, I'll take a look at the PR then when you create it

placid ermine
#

addressed your changes on #34 btw

#

should i fix the slicing in this PR too?

brisk brook
#

Which slicing? Constructing a slice?

brisk brook
placid ermine
brisk brook
#

Oooh

#

Nah create a different PR, it doesn't really depend on that other one

covert fog
#

can i fix that thing where there are no spaces generated or does it not need a pull request

covert fog
#

so it doesn't seem to be deserving of a pull request on its own

brisk brook
covert fog
#

ok i'll just pr

timid sentinel
#

I'm trying to test https://github.com/python-discord/bot/pull/1568, but I can't get it running locally. I get this error from the site side

Not Found: /api/bot/off-topic-channel-names/joejoes-bizarre-adventure

"PATCH /api/bot/off-topic-channel-names/joejoes-bizarre-adventure HTTP/1.1" 404 23

Which I assume just means my site docker image isn't up to date, but my attempts at updating it don't seem to have fixed the issue (maybe because I didn't do it right).

cold island
#

docker-compose pull
docker-compose up --build

Should be it

#

And ofc git pull first

timid sentinel
# cold island How did you do it?

Delete all containers, images, and volumes and then docker-compose up lemon_smile (well that was after I tried what I thought should work). I'm not running the site directly, just through the bots docker-compose, but I assume since the site PR was already merged that should be fine?

cold island
#

Otherwise you're just recreating the container from the old image

timid sentinel
#

Ohhhhh so it turns out the site was on the correct version, but the ot channel's name was not listed in the database, so when it tried to update it it got a 404 because it didn't exist

#

I don't understand why there is a distinction between activated and deactivated ot names. When would we want to deactivate an ot name over deleting it?

cold island
#

shrug we discussed it almost a year ago, I don't remember the reasoning

#

Might be in an org issue

timid sentinel
#

We are storing these to avoid similar names to be added via the add command as the command checks existence of similar names.
That makes sense I guess

signal forge
#

Thanks for the suggestions @timid sentinel on the resources pull request! This is my first time contributing something of substance which requires communication with the more senior people in the repository. It's been so cool thus far. I really appreciate it!

trail pilot
#

Hey @thorny spade, which pin would you like to take out of the remaining 2 for site#695?

dusky shoreBOT
trail pilot
#

alright, awesome!
just let me know which one you choose cause if you only do the ssl issue i might make a PR for the other one

trail pilot
#

awesome, thanks for letting me know!

signal forge
thorny spade
signal forge
#

I forgot

thorny spade
#

dont worry i did the same before

signal forge
#

Go ahead

trail pilot
signal forge
#

Setting different statuses on your bot (Garrus Valkyrin)

trail pilot
#

I se

#

see*

signal forge
#

I didn't finish it though.

trail pilot
#

yeah no worries! thanks for letting me know though!

signal forge
thorny spade
#

@trail pilot so id do the ssl thing

trail pilot
#

yep

thorny spade
#

and eric do the setting different status

#

right

thorny spade
trail pilot
thorny spade
#

also can you (eric) set a nickname so we could call you in your preferred words?

signal forge
#

lol you can literally just call me eric

#

i am eric

thorny spade
#

@trail pilot id make a file into the highlighted directory right

trail pilot
#

yep!

thorny spade
trail pilot
thorny spade
#

done

trail pilot
#

tysm, i'll leave a review in a bit

thorny spade
#

somehow lint didnt pass... nvm it passed

#

somehow it passed omfg

signal forge
#

Nice... working on mine now

signal forge
#
Run export PIP_USER=0; SKIP=flake8 pre-commit run --all-files
Check for merge conflicts................................................Passed
Check Toml...............................................................Passed
Check Yaml...............................................................Passed
Fix End of Files.........................................................Failed
- hook id: end-of-file-fixer
- exit code: 1
- files were modified by this hook

Fixing pydis_site/apps/content/resources/guides/python-guides/setting-different-statuses-on-your-bot.md

Mixed line ending........................................................Passed
Trim Trailing Whitespace.................................................Passed
check blanket noqa.......................................................Passed
Flake8..................................................................Skipped
Error: Process completed with exit code 1.
trail pilot
#

Ahhh, there wasn't an extra line at the end of the fold

#

cile*

#

file*

#

if you commit again it should work

signal forge
placid ermine
#

hah is botcore at v5 already lol

vale ibex
#

hell yea semver

#

no logic changes

vocal prairie
#

yessir

vale ibex
vale ibex
#

This only touched dev-deps, to make dependabot settle down. The fact that CI & netlify has passed seem like it's fine to merge, would appreciate someone giving it a look over

#

bot-core#50

dusky shoreBOT
vale ibex
#

netlify was having issues, so had to retrigger it πŸ˜›

timid sentinel
vale ibex
#

since it failed CI before I disabled it lol

#

having to do the same in bot too

timid sentinel
#

Ah well explicit is better than implicit anyway lemon_sweat

vale ibex
#

true πŸ˜›

vale ibex
#

ah

#

that'll be it

#

so we're overwriting defaults

timid sentinel
#

yeah

covert fog
#

can i still contribute fixes to the blurple formatter

vale ibex
#

Another relatively small change bot-core#54

dusky shoreBOT
vale ibex
#

There's a deprecation warning from aiohttp if you try to many an async resolver outside of an async function, so I moved it to the async setup_hook

covert fog
dusky shoreBOT
molten perch
vale ibex
#

in bot

#

bot-core isn't making a new session

molten perch
#

Yeah, but I'm sure it's fine in setup hook as well?

vale ibex
#

what, creating the aiohttp session?

molten perch
#

Yeah.

vale ibex
#

probably fine yea, the context manager is nice though

#

66 test errors fixed ℒ️

#

my manual testing hasn't come up with anything, so I have marked bot#2118 ready for review

dusky shoreBOT
vale ibex
#

Sorry it's quite large, but there were a bunch of breaking changes

#

going to write up a proper PR description now

covert fog
thorny spade
#

@trail pilot pinging you to beg for a re-review of site#708

dusky shoreBOT
trail pilot
#

im gonna be busy for the rest of the night since I'm watching a movie, sorry

covert fog
brisk brook
timid sentinel
#

!resources data-science

stable mountainBOT
#
Resources

The Resources page on our website contains a list of hand-selected learning resources that we regularly recommend to both beginners and experts.

timid sentinel
#

@signal forge PR has been merged, congrats!

signal forge
austere hornet
#

That's exactly how I felt when my first PR was merged on PyDis - it felt really great.

crude gyro
signal forge
#

!resources data science

stable mountainBOT
#
Resources

The Resources page on our website contains a list of hand-selected learning resources that we regularly recommend to both beginners and experts.

signal forge
#

Yay it works!

#

!resources data science
Check this out @crude gyro!

stable mountainBOT
#
Resources

The Resources page on our website contains a list of hand-selected learning resources that we regularly recommend to both beginners and experts.

signal forge
#

Yay πŸ™‚

crude gyro
#

Excellent! I'm glad to have that feature

signal forge
#

Really interesting to see it actually working in the server like this.

crude gyro
#

yeah, there's something extremely motivating about putting a brick into such a large wall.

#

gets me every time

#

been here since there were a couple hundred people in this community and I still get excited whenever I merge a PR

austere hornet
#

One minor thing though. bot#2079 wasn't linked properly in the PR description of bot#2117, so #2079 wasn't closed upon merging #2117.

rapid swallow
#

it has now been closed

covert fog
thorny spade
fallen patrol
thorny spade
fallen patrol
#

nvm i misread the title

thorny spade
#

wait

wild prism
#

there is active discussion about what we want to do about that, if anything

signal forge
#

Y'all it's very interesting to see how our web API allows for the distribution of data to/from the bot. I stumbled across this interesting video in my search to better understand what API's even are.... https://www.youtube.com/watch?v=BxV14h0kFs0&t=451s

The title of this video should change with the times. But nothing lasts forever: here's the story of how I made it work, why it used to be easier to make that work, and how it all ties in to the White Cliffs of Dover and the end of the universe.

Edited by Michelle Martin: https://twitter.com/mrsmmartin

Includes an accelerated section of "Tradu...

β–Ά Play video
stable mountainBOT
#

bot/bot.py line 60

self.stats = AsyncStatsClient(self.loop, LOCALHOST)```
patent pivot
#

it's easier to say what you are complaining about than just "what even...", is it about the LOCALHOST?

#

oh wait

#

lol

#

looking at this in context is more ocnfusing

#

ohhh wait

#

no yeah I see

#

no yeah that seems fine?

brisk brook
#

self.stats is set as a class variable and an attribute

patent pivot
#

again, that's not really a helpful comment

fallen patrol
#

the first creation of it isn't even used at all

#

which does mean that passing the LOCALHOST doesn't even matter

patent pivot
#

hmm yeah that line can go I guess if connect_statsd initialises it

vale ibex
#

It's already gone

stable mountainBOT
#

botcore/_bot.py line 79

self.stats: Optional[AsyncStatsClient] = None```
vale ibex
#

bot#2118 is implementing it

dusky shoreBOT
timid sentinel
#

hmm

patent pivot
#

hell yeah

#

chirs is so cool

vale ibex
stable mountainBOT
#

botcore/_bot.py line 220

self.stats = AsyncStatsClient(loop, "127.0.0.1")```
vale ibex
#

lmfao

#

code-reviewing my own code after it's merged

stable mountainBOT
#

botcore/_bot.py line 77

self._guild_available = asyncio.Event()```
timid sentinel
#

is it not how it is currently to provide a default LOCALHOST connection that is guaranteed to work? So the bot can still run in prod if it fails 8 times?

#

i.e. with LOCALHOST it's just a dummy connection so usages don't have to handle it possibly being None

vale ibex
#

which is localhost in dev

timid sentinel
#

Yes but in prod if the statsd url is invalid/down the bot wouldn't work at all

#

whereas previously it would just use the dummy localhost connection so still work but just not report stats

vale ibex
#

_connect_statsd has a backoff after 8 attempts

timid sentinel
#

After that self.stats would be None, so that would have to be handled elsewhere

#

if it is that's fine

#

if it's not having the localhost dummy would make sense

#

right?

vale ibex
#

Yea, so the option is after 8 failed attemps should be just leave it none, or create a dummy

#

of course leaving it none would mean any calls to incr or w/e fail

#

so creating a dummy would make sense, after 8 failed attempts, rather than just logging a warning and returning

timid sentinel
#

yeah

#

yeah

#

although I think it makes sense for the dummy to be made first

#

as the backoff is async so some other code attempting to use it could run before it's failed after 8 tries

vale ibex
#

_connect_statsd is called in the setup_hook

#

So we haven't started loading cogs or anything yet

stable mountainBOT
#

bot/bot.py lines 74 to 79

self._statsd_timerhandle = self.loop.call_later(
    retry_after,
    self._connect_statsd,
    statsd_url,
    retry_after * 2,
    attempt + 1```
vale ibex
#

ah

#

yes

#

bot-core#56

dusky shoreBOT
vale ibex
#

forcepush grammar error

#

πŸ˜„

#

will tag the version after merge

#

lol what netlify is still ratelimited

vale ibex
#

oh nice

#

pypi is down

#

major outage

surreal veldt
#

There was a PR about making documentations fuzzy can I work on that?

vale ibex
#

which pr?

surreal veldt
#

Not really sure let me check

#

It was some time ago

surreal veldt
dusky shoreBOT
surreal veldt
#

that was the original issue, though I made bot#1724 which was a repeat

dusky shoreBOT
vale ibex
#

Alright cool, if you comment on it I can assign you

surreal veldt
#

the original one right?

vale ibex
#

yes

surreal veldt
#

done

vale ibex
#

Ahh you're Diabolical5777

#

Assigned

surreal veldt
#

thank you

brazen charm
#

It would probably be best handled through one of the things slash commands provide now, as giving suggestions in a good manner was my main concern there as a paginated embed is horrible UX wise

surreal veldt
timid sentinel
#

That could be really nice

surreal veldt
#

is the bot on dpy master branch?

brazen charm
surreal veldt
#

ah yeah the autocomplete

#

I can try to do that

#

What does this mean?

fatal: not a git repository (or any of the parent directories): .git```
fallen patrol
surreal veldt
fallen patrol
#

i'm using rapidfuzz in the above, although there's quite a few different ones to mess with

surreal veldt
#

And do you store all the names in cache and then match them?

fallen patrol
#

!pypi textdistance def check out this one

stable mountainBOT
fallen patrol
surreal veldt
#

for ```py
dev_guild:
id: &DEV_GUILD_ID οΏ½

In the config file, do I put this ```py
dev_guild:
    id: 12345

or ```py
dev_guild:
id: &DEV_GUILD_ID 1234

vale ibex
#

the latter

#

the &DEV_GUILD_ID marks it as a "variable" that can be referenced later on in the yml doc

surreal veldt
#

sorry I didn't get what it's supposed to be

#

Also when I do git checkout -b some_branch and do git branch it shows both branches, but when I close VSvode and open it again, when I do git branch it says
fatal: not a git repository (or any of the parent directories): .git

vale ibex
vale ibex
surreal veldt
#

yes

#

i did git clone, cd bot then git branch. Have i missed a command?

#

okay so not sure what happened but it works now

austere hornet
dusky shoreBOT
#
Do you mind?

@austere hornet, please enable your DMs to receive the bookmark.

austere hornet
surreal veldt
#

i'm using the server template, and in the cofig yml file that was provided for the template there's

        announcements:  &DEV_ANNOUNCEMENTS  οΏ½
        py_news:        &DEV_PY_NEWS        οΏ½

But these channels don't exist in the server

timid sentinel
#

You can reuse a channel ID for multiple constants so I usually just copy paste a random one for ones that I think are less important for what i'm doing at the moment

#

same with webhooks, rather than creating a load I'd create one and reuse it for everything

surreal veldt
#

ah okay thanks

thorny obsidian
#

There are a few channels that probably need their own channel since they're somewhat automated. The ones that come to mind are incidents, incidents archive, voice verification

surreal veldt
#

for webhooks i paste the webhook link right?

timid sentinel
#

No it should just be the ID I think

surreal veldt
#

Where can I find that?

stable mountainBOT
#

@timid sentinel, looks like you posted a Discord webhook URL. Therefore, your message has been removed, and your webhook has been deleted. You can re-create it if you wish to. If you believe this was a mistake, please let us know.

timid sentinel
#

wow thanks lol

#

copy the webhook url but only use the number bit in it

surreal veldt
#

bot uses dpy master branch right?

thorny obsidian
#

iirc yes, if not it will very soon

surreal veldt
#

Anyone know what this means when installing dpy master branch?

C:\Users\tenuk>py -m pip install -U git+https://github.com/Rapptz/discord.pyy
Collecting git+https://github.com/Rapptz/discord.pyy
  Cloning https://github.com/Rapptz/discord.pyy to c:\users\tenuk\appdata\local\temp\pip-req-build-3uwaqfct
  Running command git clone --filter=blob:none --quiet https://github.com/Rapptz/discord.pyy 'C:\Users\tenuk\AppData\Local\Temp\pip-req-build-3uwaqfct'
  remote: Repository not found.
  fatal: repository 'https://github.com/Rapptz/discord.pyy/' not found
  error: subprocess-exited-with-error

  Γ— git clone --filter=blob:none --quiet https://github.com/Rapptz/discord.pyy 'C:\Users\tenuk\AppData\Local\Temp\pip-req-build-3uwaqfct' did not run successfully.
  β”‚ exit code: 128
  ╰─> See above for output.

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

Γ— git clone --filter=blob:none --quiet https://github.com/Rapptz/discord.pyy 'C:\Users\tenuk\AppData\Local\Temp\pip-req-build-3uwaqfct' did not run successfully.
β”‚ exit code: 128
╰─> See above for output.

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

timid sentinel
#

discord.pyy assume that should be discord.py, not exactly sure what you're trying to do though

surreal veldt
#

for the python bot

rapid swallow
#

although, you should be using poetry

surreal veldt
#

will do, also ```py
File "C:\Users\tenuk\Desktop\Coding\python-forked-bot\bot\bot\constants.py", line 20, in <module>
import yaml
ModuleNotFoundError: No module named 'yaml'

~~i'm not able to find what this is~~ I think I found that it is `pyyaml`
vale ibex
#

You shouldn't install the packages manually

#

Use poetry

#

It ensures you install the correct versions.

#

The setup guide will have something about islnstalling project dependancies

surreal veldt
#

can you tell me what to update here?

The currently activated Python version 3.10.0 is not supported by the project (3.9.*).
Trying to find and use a compatible version. 

  NoCompatiblePythonVersionFound

  Poetry was unable to find a compatible version. If you have one, you can explicitly use it via the "env use" command.

  at ~\AppData\Local\Programs\Python\Python310\lib\site-packages\poetry\utils\env.py:768 in create_venv
       764β”‚                     python_minor = ".".join(python_patch.split(".")[:2])
       765β”‚                     break
       766β”‚
       767β”‚             if not executable:
    β†’  768β”‚                 raise NoCompatiblePythonVersionFound(
       769β”‚                     self._poetry.package.python_versions
       770β”‚                 )
       771β”‚
       772β”‚         if root_venv:
PS C:\Users\tenuk\Desktop\Coding\python-forked-bot\bot> 
brazen charm
#

point poetry to python 3.9 with poetry env use <path to exe>

surreal veldt
# brazen charm point poetry to python 3.9 with `poetry env use <path to exe>`

  RuntimeError

  Poetry could not find a pyproject.toml file in C:\Users\tenuk\Desktop\Coding\python-forked-bot or its parents

  at ~\AppData\Local\Programs\Python\Python310\lib\site-packages\poetry\core\factory.py:369 in locate
      365β”‚             if poetry_file.exists():
      366β”‚                 return poetry_file
      367β”‚
      368β”‚         else:
    β†’ 369β”‚             raise RuntimeError(
      370β”‚                 "Poetry could not find a pyproject.toml file in {} or its parents".format(
      371β”‚                     cwd
      372β”‚                 )
      373β”‚             )
PS C:\Users\tenuk\Desktop\Coding\python-forked-bot> ```
vale ibex
#

can you run ls in that same directory

#

and send output

#

Also, the path you used there is still Python 3.10

#

do you have python 3.9 installed?

surreal veldt
vale ibex
#

then you need to use the Python39 path when you use poetry env use

#

not Python310

#

also, what's the output of ls in that directory?

surreal veldt
#

but i'm using python 310

#
    Directory: C:\Users\tenuk\Desktop\Coding\python-forked-bot\bot


Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
d-----          4/5/2022   8:19 PM                .github
d-----          4/5/2022   9:35 PM                bot
d-----          4/5/2022  10:27 PM                logs
d-----          4/5/2022   8:19 PM                tests
-a----          4/5/2022   8:19 PM            166 .dockerignore
-a----          4/5/2022   9:29 PM            125 .env
-a----          4/5/2022   8:19 PM             13 .gitattributes
-a----          4/5/2022   8:19 PM           1580 .gitignore
-a----          4/5/2022   8:19 PM            748 .pre-commit-config.yaml
-a----          4/5/2022   8:19 PM            111 CODE_OF_CONDUCT.md
-a----          4/5/2022   8:19 PM          20417 config-default.yml
-a----          4/5/2022   9:29 PM          12684 config.yml
-a----          4/5/2022   8:19 PM            152 CONTRIBUTING.md
-a----          4/5/2022   8:19 PM           1881 docker-compose.yml
-a----          4/5/2022   8:19 PM            576 Dockerfile
-a----          4/5/2022   8:19 PM           1092 LICENSE
-a----          4/5/2022   8:19 PM           6704 LICENSE-THIRD-PARTY
-a----          4/5/2022   8:19 PM         118232 poetry.lock
-a----          4/5/2022   8:19 PM           1895 pyproject.toml
-a----          4/5/2022   8:19 PM           1310 README.md
-a----          4/5/2022   8:19 PM            132 SECURITY.md
-a----          4/5/2022   8:19 PM            559 tox.ini


PS C:\Users\tenuk\Desktop\Coding\python-forked-bot\bot> 
#

this is the ls ^

vale ibex
#

you cannot use python 3.10 with our bot.

surreal veldt
#

oh

vale ibex
# surreal veldt this is the `ls` ^

that's the ls within C:\Users\tenuk\Desktop\Coding\python-forked-bot\bot, you were running poetry env use in C:\Users\tenuk\Desktop\Coding\python-forked-bot

#

so that is why you were getting that error

#

but, you still need to download and install Python 3.9 if you haven't got it

surreal veldt
#

i'm now here in ls but same error is raising ``` Directory: C:\Users\tenuk\Desktop\Coding\python-forked-bot

Mode LastWriteTime Length Name


d----- 4/5/2022 9:32 PM .vscode
d----- 4/5/2022 10:27 PM bot

PS C:\Users\tenuk\Desktop\Coding\python-forked-bot>```

vale ibex
vale ibex
surreal veldt
#

For my PR, I was asked to make the docs command into a slash commands. I need to make a issue and wait for reviews before continuing right?

vale ibex
#

There is already an issue for the docs command fuzzy matching. If you are planning to solve that with slash commands, I'd advise you to comment that in the issue with how you plan to implement it, so you can get feedback

#

Of course that doesn't stop you from setting up the bot though

surreal veldt
#

Yeah made the comment and im going to try to continue with the bot thanks for your help

#

I saw the comment to what I suggested, Is there am ETA on when the port to slash commands can be done?

thorny obsidian
#

@gritty wind why not port docs to slash commands?

#

It's not something that needs to be role locked, so we don't need to wait for the permissions rewrite and we're using a version of d.py that supports slash, right?

gritty wind
#

I think it’s going to be difficult for users to know which to use when you’re already used to all these commands being under one prefix

#

It’ll still cause confusion for a while when we do switch, but a full switch means you don’t have to guess what’s prefixed and what’s slash commands

thorny obsidian
#

I don't think we need to be all or nothing on slash commands though. We don't need to switch over everything or nothing.

surreal veldt
#

Oh i thought it was just for docs command

thorny obsidian
#

I've interacted and built bots that have the split functionality and users have been fine.

gritty wind
#

Starting from the ground up, I could see that argument

#

But when we already established habits

#

It’s easy to say β€œsubstitute the exclamation for a slash”

thorny obsidian
#

I mean, even not from the ground up. I've had to port some commands to slash and users have preferred it

gritty wind
#

It’s harder to say β€œsubstitute the exclamation for slash but only some of the time”

#

Meh, I would prefer porting all at once

#

If people feel strongly it’s not a problem, so be it

thorny obsidian
#

I mean, are all core devs on board with switching over every single command to slash?

wind ruin
#

the docs command could probably make great use of the Autocompletion feature slash commands support, but hadn't we decided that some commands will never be ported (or at least not with the current options)?

gritty wind
wind ruin
#

idk how ""stable"" they call it but discord.py v2.0 is still seeing breaking changes every week so there's that

thorny obsidian
gritty wind
#

Then we can discuss it with the core devs, but I don’t see why not if the new system works

wind ruin
#

wait, you're speaking about the library implementation or the permissions v2?

thorny obsidian
wind ruin
#

ah

gritty wind
#

But ultimately that’s intuition, I don’t have proof for it

brazen charm
#

My main point with the slash command suggestion is that the fuzzy docs are horrible UX wise otherwise unless there's some good matching that considers dotted names etc. that can give good results from the tens of thousands of names

thorny obsidian
gritty wind
#

This would be our first slash commands though if we do port it, so we definitely would have the core devs sign off on it

gritty wind
#

When we discussed it previously

#

We discussed not porting anything until the rewrite and seeing how that goes

thorny obsidian
#

That it's either going to be switching everything or nothing and we can't even consider porting over docs, something that doesn't require the perms rework?

gritty wind
#

No

#

We didn’t feel the urgent need to port over anything at that time

#

So we settled on not porting until we see the rewrite

#

If we want to port something before the rewrite, we can bring it up again with core devs

#

And we need to talk about post-rewrite migrations with the core devs

gritty wind
#

But that’s what has the lag problem

#

It’s terribly slow

surreal veldt
#

It's not that slow

#

Considering you cache it, of course

thorny obsidian
#

I guess I'm struggling to see why we can't port something that doesn't need the perms rework because the perms rework isn't live yet. I understand not wanting to port the stuff that would need the perms rework, but this isn't the case

gritty wind
#

Using arl’s implementation on their test server, it takes a few seconds to load suggestions after typing in something, and I’ve got fantastic internet otherwise

#

I also know arl generally has pretty engineered solutions

#

I don’t think it’s an implementation problem

surreal veldt
#

How many seconds does it take for you?

gritty wind
#

2-3

gritty wind
#

It’s not a hard no

#

Just bring it up internally and we can discuss it

surreal veldt
#

Well, I mean I think its better than typing it wrong and then thinking what's wrong and retyping it

gritty wind
#

I pointed that out in my comment

#

It’s not the worst UX, it’s not the best

#

If no one has other implementation ideas, then yeah it’s an improvement (ultimately you can send before suggestions are done)

gritty wind
#

First attempt, took 8 seconds and threw a "failed to load" error

#

Second attempt took about 4 seconds

#

And I used to have really terrible internet, so it could've been just a me problem before, but:

surreal veldt
#

weird, for me I would the average is about two seconds

covert fog
#

sir-robin#41

covert fog
#

anyone still wanna do a review or merge it or close it

keen wind
#

Any kind human can help me with an error I'm getting with pip install error from my own package from test PyPI?

austere hornet
keen wind
#

on it

signal forge
#

So I'm messing around with the API in site locally on a test branch. I'm wondering, I'd be able to implement a new endpoint locally that interacts with the database, right? I guess I'm confused..... if I have a local fork of the repo cloned on my machine, would a new endpoint that generates data for the database be reflected in the production database?

vocal prairie
#

It would not, your local changes would only affect your local database.

signal forge
#

Oh wow.

#

But the database is the same database as the production database, right?

vocal prairie
#

It's the same type of database (PostgreSQL 14), but you're running your own instance.

signal forge
#

agh right makes sense

vocal prairie
signal forge
#

oh so cool

#

docker abstracts so many things... i really need to learn more about it

#

it's so convenient but also kinda is too convenient but OK πŸ™‚

signal forge
vocal prairie
#

The site project uses the psycopg2 adapter alongside the Django ORM.

signal forge
#

I'm using Pychar,

vocal prairie
#

Uhhhh, I know there is a way to interact with it via the terminal with the psql command (I think the whole thing is something like docker-compose exec site_postgres_1 psql but I'm not sure), and there's probably interfaces via a GUI but I'm not sure how to use those.

signal forge
#

agh

#

gotcha

signal forge
#

I got the databae running in docker but am unsure how to actually view the database.

hoary haven
#

i love the idea of slash commands for docs

#

with the current prefix docs command.. you have to get it exactly right? or is there a fuzzy match?

#

one time i was derping big time because i was typing lib.thing instead of lib.Thing

wild prism
signal forge
#

I want to browse the data

thorny obsidian
# signal forge I want to browse the data

I really like using pgAdmin to connect and view the postgres data. I believe you can connect it to the docker container and then browse the data, although I've only ever done it for localhost

clever wraith
#
  RuntimeError

  [BUG]  bot-core (1.2.0) is not satisfied.

  at /opt/homebrew/Cellar/poetry/1.1.13/libexec/lib/python3.10/site-packages/poetry/mixology/partial_solution.py:200 in satisfier
      196β”‚             # As soon as we have enough assignments to satisfy term, return them.
      197β”‚             if assigned_term.satisfies(term):
      198β”‚                 return assignment
      199β”‚ 
    β†’ 200β”‚         raise RuntimeError("[BUG] {} is not satisfied.".format(term))
      201β”‚ 
      202β”‚     def satisfies(self, term):  # type: (Term) -> bool
      203β”‚         return self.relation(term) == SetRelation.SUBSET

Keep getting this error when running poetry install, I'm not sure what I'm doing wrong.

#

I've tried installing it with pip and then running poetry, removing bot-core and running poetry, re-cloning the repo

#

Absolutely lost atm

#

I'm using Python v3.9.10, Poetry v1.1.13, Pip 22.0.3

#

On main branch too

#

Been having this issue since like last month or whenever it was that I tried to set this bot up previously. Gave up because of this perplexing error.

#

Any help would be greatly appreciated.

fallen patrol
#

it's not the fastest thing I could engineer, and it's on my list to refine

tawdry vapor
clever wraith
#

Hm

tawdry vapor
#

Tried re-locking, deleting the venv, and so on but nothing help so I gave up.

#

This was a few weeks ago.

#

IIRC it worked for me on my Windows machine but not my Linux machine.

clever wraith
#

Lol I'm never going to use Windows as a development environment again

#

It's terrible.

tawdry vapor
#

I was not suggesting that.

clever wraith
#

I think I will try removing bot-core from the lock file or something

#

Oh ok

tawdry vapor
#

What would probably work is to remove bot-core from pyproject.toml, re-lock, poetry install, and then pip install bot-core.

#

Though in the long term a better solution is needed

clever wraith
#

I think it's something to do with the Python version

#

Modules like discord can't be imported either, which is odd.

surreal veldt
#

I forked the bot to a folder, and everytime I close vocode, i need to type the cd bot command

#

Any way to change that?

tawdry vapor
#

Why do you need to change the directory after closing VSCode? What if you don't change directories?

surreal veldt
tawdry vapor
#

Is there anything else in the directory besides the bot subdirectory?

#

If not, then bot is the root and that's the directory you need to open in VSCode. If you want python-forked-bot as the root then just move all the files (you'll need to delete and create a new venv if you want to move it).

surreal veldt
#

but the .vscode file is empty

tawdry vapor
#

You need to open bot in VSCode then, cause that's the actual root

hoary haven
#

i get the impression you're trying to have the project dir be called "python-forked-bot" instead of "bot" but is there any particular reason why? seems simpler to just call it "bot"

#

if it conflicts with another project of yours, then keep it in a separate folder like you are, but maybe rename python-forked-bot >>> pydis

#

then open the directory "bot" directly in vscode, not "pydis"

#

the terminal in vscode (or windows terminal) should be on the bot directory for all your git commands to work

and you'll get the vsc terminal to be on bot by opening that directory, not its parent directory

gritty wind
rapid swallow
#

nvm, it can't be 4.0.0

#

yeah...

surreal veldt
#

i'm directly running the bot from terminal and PS C:\Users\tenuk\Desktop\Coding\python-forked-bot\bot> py -m bot Traceback (most recent call last): File "C:\Users\tenuk\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 187, in _run_module_as_main mod_name, mod_spec, code = _get_module_details(mod_name, _Error) File "C:\Users\tenuk\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 146, in _get_module_details return _get_module_details(pkg_main_name, error) File "C:\Users\tenuk\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 110, in _get_module_details __import__(pkg_name) File "C:\Users\tenuk\Desktop\Coding\python-forked-bot\bot\bot\__init__.py", line 6, in <module> from discord.ext import commands File "C:\Users\tenuk\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\__init__.py", line 23, in <module> from .client import * File "C:\Users\tenuk\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\client.py", line 49, in <module> import aiohttp File "C:\Users\tenuk\AppData\Local\Programs\Python\Python310\lib\site-packages\aiohttp\__init__.py", line 6, in <module> from .client import ( File "C:\Users\tenuk\AppData\Local\Programs\Python\Python310\lib\site-packages\aiohttp\client.py", line 35, in <module> from . import hdrs, http, payload File "C:\Users\tenuk\AppData\Local\Programs\Python\Python310\lib\site-packages\aiohttp\http.py", line 7, in <module> from .http_parser import ( File "C:\Users\tenuk\AppData\Local\Programs\Python\Python310\lib\site-packages\aiohttp\http_parser.py", line 15, in <module> from .helpers import NO_EXTENSIONS, BaseTimerContext File "C:\Users\tenuk\AppData\Local\Programs\Python\Python310\lib\site-packages\aiohttp\helpers.py", line 667, in <module> class CeilTimeout(async_timeout.timeout): TypeError: function() argument 'code' must be code, not str PS C:\Users\tenuk\Desktop\Coding\python-forked-bot\bot>

#

okay so I noticed it's still on python 310

hoary haven
#

need to make a virtual env/use poetry like when you first set up site some time back.

im going offline but may be able to help tmrw

surreal veldt
#

I can't remember what I did lol

hoary haven
gritty wind
#

I saw you had py yesterday

#

You can use py -3.9 -m poetry as a shortcut instead of env use

#

If you don’t have poetry installed you can do py -3.9 -m pip install poetry

surreal veldt
#

I'm required to run the site when starting the bot? when i did py -m potry run task start, it said 2022-04-06 11:32:16 | bot | CRITICAL | Could not connect to site API. Is it running?

brazen charm
#

Yes you need the site running

surreal veldt
#

Do I download this even though I'm on windows?

gritty wind
#

Where is this?

#

If it’s installing docker, I think the update is already included with newer installs, but just run it anyways and you’re good

surreal veldt
#

yay it works thank you

surreal veldt
#

How do I get the doc symbols set up?

brazen charm
#

!d setdoc with inventory links

vale ibex
#

Yea, like this

surreal veldt
#

Is that documtented somewhere on setting up the bot?

brazen charm
#

It's in the help for the command

surreal veldt
#

I may be missing somethin

#

I know I got my answer, but I'm just wondering

vale ibex
#

!help docs setdoc

stable mountainBOT
#
Command Help

!docs setdoc <package_name> <inventory> [base_url]
Can also use: docs s

*Adds a new documentation metadata object to the site's database.

The database will update the object, should an existing item with the specified package_name already exist. If the base url is not specified, a default created by removing the last segment of the inventory url is used.

Example: !docs setdoc python https://docs.python.org/3/objects.inv*

surreal veldt
#

It's not in the docs help command?

vale ibex
#

!help docs

stable mountainBOT
#
Command Help

!docs [symbol_name]
Can also use: d, doc

Look up documentation for Python symbols.

Subcommands:

!docs cleardoccache <package_name>
Clear the persistent redis cache for package.
!docs deletedoc <package_name>
Removes the specified package from the database.
!docs getdoc [symbol_name]
Return a documentation embed for a given symbol.
!docs refreshdoc
Refresh inventories and show the difference.
!docs setdoc <package_name> <inventory> [base_url]
Adds a new documentation metadata object to the site's database.

brazen charm
#

do yuo have the permissions?

vale ibex
#

docs is the top level command

surreal veldt
#

oh yeah my bad i didn't have the mod/admin role

#

How can I find the inventory links for dpy?

#

or better is there a list of inventories that is added to the python bot?

vale ibex
#

most of the time, the objects link is the index page of the docs with /objects.inv on the end

#

For example, d.py docs are at https://discordpy.readthedocs.io/en/stable/ and the objects are at https://discordpy.readthedocs.io/en/stable/objects.inv

#

I say most of the time, I haven't come across an example where it isn't like this, but I'm sure they exist

surreal veldt
#

Is there a command to list all the docs added to the python bot? My reason for cloning it was basically just the docs command and I think I'd need many

vale ibex
#

I don't think so, but myself or another admin can get that list for you via metabase

#

I can get it later when I'm at my personal PC, if another admin hasn't gotten it for you first

gritty wind
vale ibex
#

I couldn't find it with a few different search strings

#

since Discord search bundles images under has:file too

vale ibex
#

ah I was searching for a csv dump πŸ˜›

gritty wind
#
gritty wind
#

But I got this from an int e I used to load them all in lol

vale ibex
#

Ah cool

#

Ah yea, it's in redis, not site

#

I think I can actually access that from here

austere hornet
#

Dev-oops πŸ‘€

fallen patrol
#

trying to run a snekbox, wut is this

#
snekbox_dev  | 2022-04-06 12:36:08,008 |    11 |                 gunicorn.error |    DEBUG | Ignored premature client disconnection. No more data after: b"\x16\x03\x01\x02\x00\x01\x00\x01\xfc\x03\x03\x19\x06\x07=:]}\x14h\xc0\x94Y\xedU\x0e\xba\x8a\xcb\x1bx,Q\xf6*\xd8\x03G6@\x90\x81| [\x8blg<1\x00\xbb\x86&\x18\xb7RT\xbc\x01\xa9\xec&\xf8\xa6\xae)\x00\x0c\xd7&X\xda\x05\xa7*\x00>\x13\x02\x13\x03\x13\x01\xc0,\xc00\x00\x9f\xcc\xa9\xcc\xa8\xcc\xaa\xc0+\xc0/\x00\x9e\xc0$\xc0(\x00k\xc0#\xc0'\x00g\xc0\n\xc0\x14\x009\xc0\t\xc0\x13\x003\x00\x9d\x00\x9c\x00=\x00<\x005\x00/\x00\xff\x01\x00\x01u\x00\x0b\x00\x04\x03\x00\x01\x02\x00\n\x00\x0c\x00\n\x00\x1d\x00\x17\x00\x1e\x00\x19\x00\x18\x00#\x00\x00\x00\x16\x00\x00\x00\x17\x00\x00\x00\r\x00*\x00(\x04\x03\x05\x03\x06\x03\x08\x07\x08\x08\x08\t\x08\n\x08\x0b\x08\x04\x08\x05\x08\x06\x04\x01\x05\x01\x06\x01\x03\x03\x03\x01\x03\x02\x04\x02\x05\x02\x06\x02\x00+\x00\x05\x04\x03\x04\x03\x03\x00-\x00\x02\x01\x01\x003\x00&\x00$\x00\x1d\x00 \xa80K\x13\xb7Cx:>v\xabQ$\xf9\x81c$\x7fq\xaa\xc5\xb6q\xef\xc2p\xb7\xc13\xa4\xe2\n\x00\x15\x00\xe6\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00```
#

it does run, but it does not evaluate code

#

*the contaner runs without errors, but no results are returned, nor does the api acknoledge my existance

#

I would like to point out this is what happens when I define https:// and not http:// in configuration variables mmlol oops

patent pivot
#

yeah that's https on a http port

#

big up ClientHello

tawdry vapor
#

I did look for issues on their tracker before but didn't find anything

gritty wind
#

Oh, sorry

tawdry vapor
#

IIRC it also works in Docker so it must be like some very specific set of things that are causing it to happen.

gritty wind
#

Yeah im a bit stumped as to why that’d be lol

vale ibex
#

where I pull from a tag zip, rather than commit hash

#

not sure why that would affect it

tawdry vapor
#

Have not tried.

vale ibex
#

probably good enough to just change the bot-core url to https://github.com/python-discord/bot-core/archive/refs/tags/v5.0.1.zip and try to lock

tawdry vapor
#

I will try shortly

tawdry vapor
# vale ibex ooi, does it work on my latest PR

I get a different error ```
SolverProblemError

The current project's Python requirement (3.10.4) is not compatible with some of the required packages Python requirement:
- bot-core requires Python 3.9.*, so it will not be satisfied for Python 3.10.4

Because bot depends on bot-core (5.0.1) which requires Python 3.9.*, version solving failed.

at /usr/lib/python3.10/site-packages/poetry/puzzle/solver.py:241 in _solve
237β”‚ packages = result.packages
238β”‚ except OverrideNeeded as e:
239β”‚ return self.solve_in_compatibility_mode(e.overrides, use_latest=use_latest)
240β”‚ except SolveFailure as e:
β†’ 241β”‚ raise SolverProblemError(e)
242β”‚
243β”‚ results = dict(
244β”‚ depth_first_search(
245β”‚ PackageNode(self._package, packages), aggregate_package_nodes

β€’ Check your dependencies Python requirement: The Python requirement can be specified via the python or markers properties

For bot-core, a possible solution would be to set the `python` property to "<empty>"

https://python-poetry.org/docs/dependency-specification/#python-restricted-dependencies,
https://python-poetry.org/docs/dependency-specification/#using-environment-markers
gritty wind
#

Try running with 3.9

#

Strange it didn’t pick that up itself tho

tawdry vapor
#

Well...

#
❯ poetry install
The currently activated Python version 3.10.4 is not supported by the project (3.9.*).
Trying to find and use a compatible version. 
Using python3 (3.9.10)
Creating virtualenv bot in /home/mark/repos/python/bot-pydis/.venv
Installing dependencies from lock file
#

That was at the start

#

So it should be using 3.9 already

gritty wind
#

Hm

#

What does poetry run use

tawdry vapor
#
❯ poetry run python --version
Python 3.10.4
vale ibex
#

that's uhh weird

gritty wind
#

That might be the root of the problems

tawdry vapor
#

Yes, it was.

#

The fix is to do poetry env use python3.9 rather than relying on it to autodetect the version (which seems to be fucked)

rapid swallow
#

~/Programs/python/contrib/pydis/bot  @168090be ❯ poetry run python -V  3.9.10
The currently activated Python version 3.10.2 is not supported by the project (3.9.*).
Trying to find and use a compatible version.
Using python3 (3.9.10)
Python 3.10.2
oh yeah wth

vale ibex
#

I've always had to give poetry the full path to my exe

#

auto detection hasn't ever worked for me on win

rapid swallow
#

i did pyenv local 3.9.10 prior to poetry install

tawdry vapor
#

Yeah on Windows I think I use python39 -m poetry ... so it figures it out

tawdry vapor
vale ibex
#

poetry install onnyl ever uses 3.10 for me, since it's the top of my path. 3.9 is on my path, but poetry env use python3.9 and other variations don't work

rapid swallow
vale ibex
#

So I've always done poetry env use C:\Users\chris\AppData\Local\Programs\Python\Python39\python.exe

tawdry vapor
#

You removed the venv first right

#

Also note I am on chris's PR branch. I didn't try with main again

rapid swallow
#

it worked

gritty wind
#

The env detection for me was always broken but I’ve never seen it not error from the start

rapid swallow
trail pilot
#

anyone need a review for any PRs related to site#695?

dusky shoreBOT
signal forge
surreal veldt
#

(For reference, site#703 and site#702 )

dusky shoreBOT
surreal veldt
# signal forge I believe I have one open.

Might I add, I think it would be good if you add this part, if you know what I mean (this is just a draft):

If you want to change the bot status, it is suggested to not do it during the on_ready event, since it would be called many times and making an API call on that event has a chance to disconnect the bot.

Instead, set the desired status using the activity / status kwarg of commands.Bot, for example ```py
bot = commands.Bot(command_prefix="!", activity=..., status=...)

brisk brook
#

Can confirm that information, source:

I wrote a gateway and someone was spamming presence updates on each READY. The bot would disconnect and another READY would be dispatched as it connected. Eventually there were like 10 presence updates sending as soon as they could 😬

#

It can go pretty wrong, definitely set the presence in the bot.

surreal veldt
#

Was there any update on bot#447?

dusky shoreBOT
severe tangle
#

A bug in the help channels system?

#

The bot doesn't give the channel to the person who claimed it first

thorny obsidian
severe tangle
#

Ah, that explains it

surreal veldt
#

Out of curiosity what's the talent pool watch channel?

vale ibex
#

that doesn't exist anymore

#

it used to be a channel that echo'd messages from people who were nominated for helper

#

but we found that it was rarely used, so we stopped it

surreal veldt
#

but the feature for the bot is still there right?

cold island
#

The watching system exists for another reason, but not for the talent pool

mellow hare
#

Thoughts on a name for a dev guild bootstrapping script? For context, I'm creating a script that someone can run which will read a configuration file, read all the categories, channels, and roles and create a guild for that. It will also get the IDs for the channels, etc., and put it into another configuration file. Finally it transfers ownership to the given user.

#

Just not sure on a name so that we can make a repo for it

#

I plan on making it guild agnostic so it just makes a generalized thing

dim pelican
#

Server-server

#

It serves up a server

thorny obsidian
#

Bootstrappy?

#

(Then we can have a cute little bootstrap/boots mascot ala clippy)

mellow hare
#

Oooo

#

Okay I do like that

#

I wonder if that's taken

#

Ah yep

#

Apparently it's a Python web framework to work with Twitter's Bootstrap

thorny obsidian
#

Do we plan to make this for more than just PyDis?

mellow hare
#

That's my goal. It's pretty generic. It's easy enough for me to use our existing config (or at least a section of it)

#

Or it will be

thorny obsidian
#

Do other bots use our kind of config?

#

Ours is pretty involved for Python, looking at the config.yml we provide on our site

mellow hare
#

No, however it's going to be a simple yaml or json config to list them out:

guild:
  categories:
    - admins
    - mods
   
  channels:
    - ham
    - pork
#

It'll just take that, make the server, dump out the corresponding channel and role ids

#

So it doesn't even need to be a crap ton of channels/roles

#

Original reason I wanted to do this was because we've been talking about doing this for like.... 2 years. And it'll make it easier for folks to help work on the bot

#

Making it bot agnostic was/is extra

thorny obsidian
#

I'm all for the bootstrapper, just wondering if it makes sense to try to put it on pypi or if it makes more sense to keep it more tailored for our stuff

mellow hare
#

Fair

#

I'll likely give ours as a default config with the script

#

Probably makes a lot more sense to do it as a json. Although I guess I could configure it to do either or a mix

#

Just spitballing at this point

#

Right now I'm researching the endpoints and the approach

#

Seems straight forward enough that even I can handle it

hoary haven
#

@mellow hare i just remembered, another thing that has to be set up with making a test server is webhooks

#

don't know if that could be covered in this

mellow hare
#

Not as far as I know

gritty wind
#

Though I usually tell people to just create one and reuse it for all the required webhooks

#

Since they don’t actually matter for the most part

mellow hare
#

Just not sure if that's something we would want to or could do automatically

gritty wind
#

If we wanted it done automatically β€œproperly”, you’d probably have to restructure our config to move hooks under channels

#

But ultimately it’s just a matter of filling in one url a few times, we can tell people to do it manually

mellow hare
#

Works for me

rapid swallow
cold island
#

Don't see why this can't be done automatically

outer oasis
#

How does the site get the current GIT_SHA for Sentry?

tawdry vapor
#

IIRC it is an environment variable that is set in the container when it's built by GH Actions

#

And then that gets used to configure sentry in Python

brisk brook
gritty wind
#

Afaik smartconfig was never completed

#

And the discord configuration part was just sort of haphazardly tossed on

hoary haven
#

i think bluenix was proposing a name

#

dunno if he knows abt the previous project we had

#

I like config and auto: autoconfig

brisk brook
hoary haven
#

ah ok so you do know about it already, wasn't sure

hoary haven
#

so a play on words like bootstrap like kat suggested would be better

surreal veldt
#

By the way if it was forgotten have you added the replit and heroku thing to your PR? @sharp crag

surreal veldt
sharp crag
surreal veldt
#

I thought it'd be better together because it's kind of similar yeah

hoary haven
#

fyi we don't necessarily have to combine them

#

there is a way to have related links show up on a sidebar

sharp crag
#

Hm feels kind of lacking, in my opinion. Combining those 2 might alleviate that, not sure though

vocal prairie
#

they're autogenerated for each PR to the site repository

surreal veldt
#

Can i view it too?

hoary haven
#

yup

#

look for this section on any PR on site

#

it's the deploy preview link, which will lead to the pythondiscord.com website but reflecting the changes from that specific PR. so you have to navigate to the page you've edited or created

surreal veldt
hoary haven
sharp crag
#

Exactly right, something like Raven mentioned

Replit or Heroku is not recommended for your hosting needs, see bottom for more information. Rather, use one of these hosts:
hoary haven
#

i think put the "anti" replit/heroku stuff on the bottom of the VPS page. and you can add a table of contents so that we can get an anchor(?) link to it easily

hoary haven
surreal veldt
#

site#703

dusky shoreBOT
surreal veldt
#

Just want to see that preview

#

Can anyone send the preview for site#703 please

dusky shoreBOT
surreal veldt
#

Not sure how to get it

hoary haven
sharp crag
#

I'll come up with a working example soon

surreal veldt
#

For the #discord-bots migration are they going to be merged all together?

hoary haven
#

hMM what is interesting to me though is that in deploy preview 703 i see robin's VPS page? Thinking_chief am i missing something? how does that work

outer oasis
hoary haven
hoary haven
#

yup. i've not had coffee yet today. please excuse me dv_pandaWalkAwayOwO

outer oasis
#

β˜•

hoary haven
#

ty blobcoffee

sharp crag
hoary haven
#

lolol and it was 9 days ago πŸ˜“

surreal veldt
#

also...for bot#447 , was there any update?
What I was thinking would be the top two solutions is the slash command complete or just fuzzy matching in an embed that shows the list of each documentation name with the hyperlink although this has no preview the

#

bot#447 **

dusky shoreBOT
surreal veldt
#

Like RDannys if you know that

gritty gate
surreal veldt
#

Yeah

surreal veldt
#

in the preview, why isn't this codeblock being displayed as full in preview?

vale ibex
#

The first line after back ticks is interpretated as the language for the block

surreal veldt
#

also how does one "request changes" to a PR?

gritty wind
#

If you go to the files changes tab you can click on a changed line and it’ll open a comment box

brisk brook
#

I haven't been requested for reviews in a while (apart from Dorsan's PR I will take a look at); I take it that there's not a lot new PRs? Anything I can help out with?

gritty wind
#

I believe it should unblock 3.10 for us

brisk brook
#

@gritty wind haha you forgot to add the link for step 4.

gritty wind
#

hmm really?

#

it's showing up for me lol

#

migration guide yeah?

brisk brook
#

It's just a trailing colon then nothing πŸ˜…

gritty wind
#

inresting

#

oh do you mean the undocumented changes?

brisk brook
gritty wind
#

That's the bullet points afterwards

brisk brook
#

Oooh, lmao

gritty wind
#

Wanted to nest it

#

Did not work unfortunately

#

Ok figured it out, updated

brisk brook
# gritty wind Ok figured it out, updated

I have submitted my review, couldn't find much issues. Looks like a good PR, I can try it out some other time.

A very good test would be merging this (without releasing; making a pre-release) and testing our bots on that merge commit πŸ‘Œ

gritty wind
fallen patrol
signal forge
#

I think I may have done something bad.

#

I did a force push

#

Trying to clean up my commits and am know learning about how important it is to never do a force push.

gritty wind
#

It's usually best to wait until the PR is in a ready to merge state before cleaning up for this reason (and because you only have to clean up once πŸ˜„)

#

It's alright though, good to learn when the stakes are low

signal forge
#

Good to know @gritty wind

#

Thanks πŸ™‚

surreal veldt
#

How about adding pagination to the docs command for long ones where it ends with ...

hoary haven
#

they still had the cooldown role after that (dark.knight) so i manually removed it

tawdry vapor
#

IDK. For some reason it went from in-use straight to available. it never went dormant ```
2022-04-11 03:13:20
| bot | 2022-04-11 03:13:20 | bot.exts.help_channels._cog | INFO | Making #help-lollipop (696432394974265374) available.

2022-04-11 03:01:49
| bot | 2022-04-11 03:01:49 | bot.exts.help_channels._cog | INFO | Moving #help-lollipop (696432394974265374) to the In Use category.

2022-04-11 03:01:49
| bot | 2022-04-11 03:01:49 | bot.exts.help_channels._cog | INFO | Channel #help-lollipop was claimed by 953888677292015667

eternal jewel
#

hi

surreal veldt
cold island
#

Otherwise you get bulky embeds in the middle of the channel that don't necessarily render well

surreal veldt
cold island
surreal veldt
#

got it

#

also what's the process of getting a PR merged? You just wait?

cold island
#

yeah you wait for reviews and address requested changes if there are any

#

what's your github name?

surreal veldt
surreal veldt
dusky shoreBOT
surreal veldt
#

i did everything requested a while back

cold island
#

ah, you can re-request review when you're ready

surreal veldt
#

on discord?

cold island
#

on github

#

I just did it

surreal veldt
#

Can I also do those?

cold island
#

you should be able to yes

#

(cc @last patio if you're around to re-review)

gritty wind
#

I don’t think you can (re)request reviews if you don’t have write access

#

But you can leave a comment here or on the GitHub issue pinging the reviewer

gritty wind
#

Interesting, you can’t do it on mobile

#

Despite being able to do it when you have write perms

sleek steppe
mellow hare
fallen patrol
#

getting a notification for a removed attribute

vale ibex
#

!d r

stable mountainBOT
#
Inventories refreshed
mellow hare
#

Hmm.. I'm going to have to tweak the structure of the input yml

#

Currently if we look at our config structure, there's no clear (or easy) link between the categories and the channels within them

#

It's mostly listed via comments

#

Wondering if something like this seems suitable:

categories:
  discussion:
    - community-meta
    - python-general
  logs:
    - mod-log
    - message_log
  voice:
    - voice_chat_0
    - voice_chat_1

roles:
  - admins
  - devops
  - helpers
#

Although I'd still have to find an easy way to parse our existing config to make this work

#

But I do plan on making a default template (possibly a group of them) for the Python server

#

Unless anyone else has some suggestion on how to do it cleanly from our existing config

stable mountainBOT
#
Missing required argument

code

#
Command Help

!eval <code>
Can also use: e

*Run Python code and get the results.

This command supports multiple lines of code, including code wrapped inside a formatted code block. Code can be re-evaluated by editing the original message within 10 seconds and clicking the reaction that subsequently appears.

We've done our best to make this sandboxed, but do let us know if you manage to find an issue with it!*

austere hornet
#

#bot-commands

surreal veldt
#

@hoary haven can you tell me how to link another PR on the sidebar (I recall that being said)

#

i'm doing the heroku vs replit thing as you suggested

stable mountainBOT
#

pydis_site/apps/content/resources/guides/pydis-guides/help-channel-guide.md?plain=1 lines 5 to 8

relevant_links:
    Asking Good Questions: ../asking-good-questions
    Role Guide: /pages/server-info/roles
    Helping Others: ../helping-others```
hoary haven
surreal veldt
#

thank you

#

is the relative file path required? or can it be an absolute file path

hoary haven
#

we should do relative

surreal veldt
#

for example then, how do I link this PR into mine? site#697

dusky shoreBOT
surreal veldt
#

yikes, when I do git commit it raises that error. What's the command to change the path it's looking for python at? ```
PS C:\Users\tenuk\site> git commit -m "add article discussing free hosting services"
No Python at 'C:\Users\tenuk\Desktop\python\python.exe'
PS C:\Users\tenuk\site>

austere hornet
surreal veldt
#

are you sure? I think if i do it it will then say not a git repo when i run the git commit

hoary haven
#

what happens when you just run git

#

sry no that won't help, one min

#

do you have your venv activated? maybe it's trying to run it

#

it* being pre-commit

surreal veldt
#

nevermind it said No Python at 'C:\Users\tenuk\Desktop\python\python.exe' so I just moved my py folder to that dir lol

hoary haven
#

that's your global python install?

surreal veldt
#

I commited it, but it's not showing up

#

not sure why it took some time, it appeared now

#

i made the PR, I'll add the related links soon

exotic ember
#

check your .git/hooks directory, you should be able to get rid of them

#

another way to find out if it's precommit hooks that aren't working is to commit with the --no-verify flag

hoary haven
#

site#711 @surreal veldt wasn't the plan to add this to the vps page that robin made?
are you proposing we have it on 2 pages of the site?

dusky shoreBOT
hoary haven
#

we shouldn't duplicate it imo.

sharp crag
hoary haven
#

yeah, i mean added as in.. you can update an existing page

#

what was the plan lol. am i the one OOTL

sharp crag
#

Ahh right, misunderstood. My apologies

hoary haven
#

no worries, idk if i'm the one misunderstanding

surreal veldt