#dev-contrib
1 messages Β· Page 173 of 1
Based on past experiences, good luck
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
It might be useful for the search, but still seems pretty niche
all it really needs is a line that says "You can also use the discord namespace with the same symbols as you see here"
could i get 1 more contrib/staff review for bot#2121
*last
I explained a solution that already mostly exists but it must have not been looked at
I saw it
And it would require quite a bit of work to not hardcode
Which as Iβve explained
Is not worth it
the ones loaded after the first one are renamed
they aren't
its the first ones that are renamed
the newer one replaces it iirc
!src docs
Look up documentation for Python symbols.
bot/exts/info/doc/__init__.py lines 6 to 8
PRIORITY_PACKAGES = (
"python",
)```
wouldn't adding it to the constant linked above work? though I'm not sure if conflicts on that level are handled
conflicts on that level would favor one or the other, but it would always be either the first or last loaded, although as established above i can't tell which is which
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.
Ok cool..... honestly the APIs are intimidating to a beginner.
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!
.bm for learning about the API
Cool - yea I want to create a new API feature to handle the scraping portion of my code captured here https://github.com/python-discord/bot/pull/2117
It was recommended in the issue that was opened and supported by Blue in the PR.
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
Darn it, yes endpoint.... and thanks for telling me I can check previous PRs... wow cannot believe i didn't dive into that or think or that until now.
I guess my confusion lies in where or even if the scraping code is needed if an API endpoint is implemented.
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! π
Really neat... reminders is helping a great deal in demonstrating the interplay between bot and site via the API and the database.
I'm glad.
That's the interface that is used to interact with the API, nothing fancy, I just figured it's still nice to be aware of:
https://github.com/python-discord/bot/blob/main/bot/api.py
If the goal of the scraping was to get information which can be fetched from the database, then it'll be likely made obsolete by an API endpoint
Yea that's what I was thinking, so I'll have to figure out how to get that information from the site into the database.
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
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
@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!
Thanks so much! Weβre all doing this volunteering so apologies for appearing to be of any rushβ¦ no rush at all! And thank you so much for putting up with me π
can a core dev look at bot#2120 and if approved, assign the interested party?
I can't approve it on GH. right now, but you can consider it approved.
question, i have already register interest, can you assign me (@MaskDuck on gh)?
I can, later on today, if someone else won't have already done it by then.
I've assigned you to the issue on dorsan's behalf
thanks
here to beg for a review for https://github.com/python-discord/bot/pull/2122
the import docs seem to be broken
!d import
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 | "."+
```...
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 
hello?
it will get reviewed in due time, don't worry
π
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
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
- Read our contribution guide
- Chat with us in #dev-contrib if you're ready to jump in or have any questions
- Open an issue or ask to be assigned to an issue to work on
Issues for sir-lancebot: https://github.com/python-discord/sir-lancebot/issues
Cool stuff
sir lancebot is pretty easy to contribute
id recommend starting with it
also nice
In a PR, can I link another PR with a hyperlink?
Yes, but it's better to use #
Not only better, it's easier! (For me at least)
Is this still going? https://status.pythondiscord.com/incident/164799
looking into it
Looks like it's not a self-hosted service and I don't have access afaik
I've messaged joe
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
@signal forge I am looking at creating the issue with some helpful steps, and found this now, have you seen it before?
I think you could copy this logic and use it together with the line splitting (essentially extending .lower().replace(" ", "-")).
pythondiscord.com - A Django and Bulma web application. - site/to_kebabcase.py at main Β· python-discord/site
hi
can i work on https://github.com/python-discord/site/issues/695
wihtout assignment
yeah
can i open a pr without assignment
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
what do you mean?
i am not assigned to the issue
then no
can i open a pr?
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
you can migrate one of the pins if you want! (like the one that isn't ticked off for Garrus Valkyrin's pin)
which means you'd open a PR to add the markdown content of the pin to the site
thanks!
wait me a bit
Err, I think that pin was going to be merged my Robin π
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)
kay ill close
alright, just updated the list of which are taken
Is there a way to see or can I ask for issues that aren't assigned?
go to the issues page of the repo and check the issues where the assignee column is empty
oh, didnt know that existed
lmao what is the purpose of sir robin
Its the events bot, its for events and stuff
it says event bot but it seems like pep and zen are being ported to it?
perchance
so... peps are events now??
perchance
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"```
Doesn't look like anything to me
Oh this is great! Didn't see it but will certainly add this.
Sorry my PR has been idle for a bit, Iβve just been busy. Iβll get all the reviews suggestions in π
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)
!timeit
[i for i in range(100_000)]
@timid sentinel :white_check_mark: Your timeit job has completed with return code 0.
50 loops, best of 5: 7.85 msec per loop
nice. CC @sleek steppe!
Oh that got merged? Very nice
can confirm
have not successfully used them
Thanks! Glad that old PR was finally merged π
Whoot Whoot! Congrats @sleek steppe
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
That could be nice but I can't think of a great way of doing it. Would probably just have to split on compile(stmtprefix + stmt, dummy_src_name, "exec"), which feels a bit fragile, but I guess it could work.
But it's there for the eval command already, right?
In the first command run in the screenshot above it's formatted
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
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)```
There's an open issue (bot#1880) that has some discussion around that topic
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?
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.
https://github.com/python-discord/bot/pull/2122
can anyone review and give your opinion on this
close #2120.
this issue have been approved by a core dev but since they can't add the approve label, they said on discord that feel free to treat it as approved. click me for more info.
due to ...
okay thank you
Cool, just fixed the reviews for site#697 π
will review now
Can I bump site#698 ?
Yup. Working on a review now
thank you!
@sharp crag sounds good, give me like... 3-4 days to put it all together into an issue
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
Yeah description only
ah
Maybe consider
embed = discord.Embed(timestamp=datetime.datetime.utcnow())
It can update itself according to time
For sure, take your time
i personally implemented it using the playground 
can a core dev review this and if approve, assign me (@MaskDuck on github)?
that change isn't great imo
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.
ah, sorry
No worries! Now you'll know :) :)
its fine to ask it, pydis can move a bit slow and not notice things for quite some time unless they're brought up regularly
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
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.
the docs command?
!src d
Look up documentation for Python symbols.
!src close
Make the current in-use help channel dormant.
!src src
Display information and a GitHub link to the source code of a command, tag, or cog.
@frozen wren feel free to test the commands in #bot-commands 
@covert fog thanks for the issue! sir-robin#30
I'm not saying it's not fine to ask at all, just with a little less frequency, yk what I'm saying?
All set... just pushed the update to the repo for your review.
@covert fog i'd prefer if i fixed the boolop error myself, but feel free to pr the fix for the *args **kwargs error
approved
#sir-lancebot-playground message bug with @humble leaf? It returned an object's memory location
oop
@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!
yeah ive found the place
Okay, I'll take a look at the PR then when you create it
Which slicing? Constructing a slice?
Yup I saw! Can't test it or approve it on my phone at the moment sadly. I'll rake a look when I get home
yeah in x[a:b:c] i forgot to call unparse on a b and c
can i fix that thing where there are no spaces generated or does it not need a pull request
it only needs 1 character change
so it doesn't seem to be deserving of a pull request on its own
If it doesn't need a pull request on its own, what do you propose doing? You can't commit directly to the branch.
ok i'll just pr
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).
How did you do it?
docker-compose pull
docker-compose up --build
Should be it
And ofc git pull first
Delete all containers, images, and volumes and then docker-compose up
(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?
you need to pull to apply any changes to the image
Otherwise you're just recreating the container from the old image
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?
we discussed it almost a year ago, I don't remember the reasoning
Might be in an org issue
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
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!
Hey @thorny spade, which pin would you like to take out of the remaining 2 for site#695?
ssl issue
or maybe both
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
okay ill do both
awesome, thanks for letting me know!
I was actually working on one myself just now π¦
why didnt you tell sooner... π¦
I forgot
dont worry i did the same before
Go ahead
which one? so i can tick it off from the list
Setting different statuses on your bot (Garrus Valkyrin)
I didn't finish it though.
yeah no worries! thanks for letting me know though!
Can I do Setting different statuses on your bot (Garrus Valkyrin)?
@trail pilot so id do the ssl thing
yep
just setting different statuses on your bot
mhm
also can you (eric) set a nickname so we could call you in your preferred words?
ah ok
@trail pilot id make a file into the highlighted directory right
yep!
also do i have to keep the original message markdown highlight?
you could change it up a bit
done
tysm, i'll leave a review in a bit
Nice... working on mine now
I just pushed, but am not entirely sure why the lint failed, but seems like it corrected it?
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.
Ahhh, there wasn't an extra line at the end of the fold
cile*
file*
if you commit again it should work
Of course! Just pushed.
hah is botcore at v5 already lol
hell yea semver
Can someone give this a quick grammar check and approve? https://github.com/python-discord/bot-core/pull/49/files
no logic changes
yessir
thanks π
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
netlify was having issues, so had to retrigger it π
flake8-annotations docs seem to suggest ANN401 is disabled by default. Unless I'm missing something. Fine anyway tho, will approve
the version bump seemed to enable it 
since it failed CI before I disabled it lol
having to do the same in bot too
Ah well explicit is better than implicit anyway 
true π
Aha this is probably why https://github.com/sco1/flake8-annotations/issues/134#issuecomment-1083501242
yeah
can i still contribute fixes to the blurple formatter
I'd recommend opening issues first
Another relatively small change bot-core#54
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
sir-robin#30 is already open and most of it done
I also saw that you could set up aiohttp sessions like that:
https://gist.github.com/Rapptz/6706e1c8f23ac27c98cee4dd985c8120#interaction-with-aiohttp
The one you implemented is more explicit though.
this is how I do it
in bot
bot-core isn't making a new session
Yeah, but I'm sure it's fine in setup hook as well?
what, creating the aiohttp session?
Yeah.
probably fine yea, the context manager is nice though
nice
66 test errors fixed β’οΈ
my manual testing hasn't come up with anything, so I have marked bot#2118 ready for review
Sorry it's quite large, but there were a bunch of breaking changes
going to write up a proper PR description now
sir-robin#41 implements the other things still left in #30
@trail pilot pinging you to beg for a re-review of site#708
im gonna be busy for the rest of the night since I'm watching a movie, sorry
someone wanna review or something?
I took a look just now, nice work!
!resources data-science
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 PR has been merged, congrats!
OMG IM SO GRATEFUL FOR ALL THE HELP - My first merged PR that includes code!
That's exactly how I felt when my first PR was merged on PyDis - it felt really great.
congrats! 
great work, Eric! thanks for the contribution
Thanks so much, Lemon!
!resources data science
The Resources page on our website contains a list of hand-selected learning resources that we regularly recommend to both beginners and experts.
The Resources page on our website contains a list of hand-selected learning resources that we regularly recommend to both beginners and experts.
Yay π
Excellent! I'm glad to have that feature
Really interesting to see it actually working in the server like this.
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
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.
it has now been closed
would anyone still want to review or merge
https://github.com/python-discord/bot/issues/2116
can a core dev approve this
do you have an idea on how to implement that?
isnt a way to detect it
nvm i misread the title
wait
there is active discussion about what we want to do about that, if anything
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...
bot/bot.py line 60
self.stats = AsyncStatsClient(self.loop, LOCALHOST)```
?
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?
self.stats is set as a class variable and an attribute
its quite a few things
again, that's not really a helpful comment
the first creation of it isn't even used at all
which does mean that passing the LOCALHOST doesn't even matter
hmm yeah that line can go I guess if connect_statsd initialises it
botcore/_bot.py line 79
self.stats: Optional[AsyncStatsClient] = None```
bot#2118 is implementing it
hmm
https://github.com/python-discord/bot-core/blob/main/botcore/_bot.py#L220 this should not be here
botcore/_bot.py line 220
self.stats = AsyncStatsClient(loop, "127.0.0.1")```
lmfao
code-reviewing my own code after it's merged
https://github.com/python-discord/bot-core/blob/main/botcore/_bot.py#L77 should probably be an optional and created in the setup hook too
botcore/_bot.py line 77
self._guild_available = asyncio.Event()```
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
yea, that's dealt with on init, you pass a statsd url
which is localhost in dev
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
_connect_statsd has a backoff after 8 attempts
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?
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
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
_connect_statsd is called in the setup_hook
So we haven't started loading cogs or anything yet
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```
forcepush grammar error
π
will tag the version after merge
lol what netlify is still ratelimited
oh nice
pypi is down
major outage
Welcome to Python Infrastructure's home for real-time and historical data on system performance.
There was a PR about making documentations fuzzy can I work on that?
which pr?
bot#447
that was the original issue, though I made bot#1724 which was a repeat
Alright cool, if you comment on it I can assign you
the original one right?
yes
done
thank you
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
the docs command to be made into a slash command?
That could be really nice
is the bot on dpy master branch?
Yes, as giving good suggestions is fairly hard and there's just no good way of spewing out 100 results at the user through plain messages to provide the available options
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```

which module for the matching?
i'm using rapidfuzz in the above, although there's quite a few different ones to mess with
And do you store all the names in cache and then match them?
!pypi textdistance def check out this one
yep, its surprisingly fast
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
the latter
the &DEV_GUILD_ID marks it as a "variable" that can be referenced later on in the yml doc
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
It's supposed to be the guild id of the guild you're using for testing
are you in the correct folder in vscode terminal?
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
.bm
@austere hornet, please enable your DMs to receive the bookmark.
.bm
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
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
ah okay thanks
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
for webhooks i paste the webhook link right?
No it should just be the ID I think
Where can I find that?
@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.
bot uses dpy master branch right?
iirc yes, if not it will very soon
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.
discord.pyy assume that should be discord.py, not exactly sure what you're trying to do though
i'm trying to install dpy master branch
for the python bot
as wookie said, you've misspelled discord.py
although, you should be using poetry
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`
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
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>
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> ```
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?
i believe so
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?
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 ^
you cannot use python 3.10 with our bot.
oh
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
when typing C:\Users\tenuk\AppData\Local\Programs\Python\, I get this. The python 39 folders are empty though not sure if this is exptected
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>```
It's not, looks like you don't have python 3.9 installed then. You will need to download and install it from python.org
You need to be inside the bot folder, since that is where the project is.
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?
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
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?
@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?
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
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.
Oh i thought it was just for docs command
I've interacted and built bots that have the split functionality and users have been fine.
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β
I mean, even not from the ground up. I've had to port some commands to slash and users have preferred it
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
I mean, are all core devs on board with switching over every single command to slash?
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)?
In the current implementation, thatβs a definite no. We havenβt discussed it with the new implementation (is the way thatβll work even public yet?)
idk how ""stable"" they call it but discord.py v2.0 is still seeing breaking changes every week so there's that
Yeah, they went over what it could look like and a rough release date in the discord dev server a bit ago
Then we can discuss it with the core devs, but I donβt see why not if the new system works
wait, you're speaking about the library implementation or the permissions v2?
So why do you think we'll have to switch over either everything or nothing to slash?
Permissions
ah
I pointed out why I think a partial switch would be more confusing above
But ultimately thatβs intuition, I donβt have proof for it
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
The way you phrased it on the issue made it seem like an official position of core devs
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
Yeah I believe it is
When we discussed it previously
We discussed not porting anything until the rewrite and seeing how that goes
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?
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
One way to do it is to send the suggestions based on what input youβve entered so far
But thatβs what has the lag problem
Itβs terribly slow
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
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
How many seconds does it take for you?
2-3
When we discussed it, we didnβt have a pressing need to migrate anything, so we settled on not doing anything and seeing how that environment develops
Itβs not a hard no
Just bring it up internally and we can discuss it
Well, I mean I think its better than typing it wrong and then thinking what's wrong and retyping it
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)
just tested it now
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:
weird, for me I would the average is about two seconds
sir-robin#41
anyone still wanna do a review or merge it or close it
Any kind human can help me with an error I'm getting with pip install error from my own package from test PyPI?
This is not the right channel for that, you could open a help channel (see #βο½how-to-get-help)
on it
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?
It would not, your local changes would only affect your local database.
It's the same type of database (PostgreSQL 14), but you're running your own instance.
agh right makes sense
https://github.com/python-discord/site/blob/main/docker-compose.yml#L13-L27 it's automatically set up for you if you're using docker-compose, as can be seen here
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 π
What tools do you use to access the data in the database?
The site project uses the psycopg2 adapter alongside the Django ORM.
Do you open the database from within your IDE or via terminal?
I'm using Pychar,
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.
I got the databae running in docker but am unsure how to actually view the database.
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
the bot can just access the database on it's own, if you the human want to browse the data in it, you could connect any of various GUI tools to it
Yea that's where I'm struggling
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
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.
it's partially how it's engineered 
it's not the fastest thing I could engineer, and it's on my list to refine
I actually got the same error and couldn't find a fix for it either.
Hm
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.
Lol I'm never going to use Windows as a development environment again
It's terrible.
I was not suggesting that.
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
I think it's something to do with the Python version
Modules like discord can't be imported either, which is odd.
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?
Why do you need to change the directory after closing VSCode? What if you don't change directories?
Without doing the cd, when i do for example git branch this comes PS C:\Users\tenuk\Desktop\Coding\python-forked-bot> git branch fatal: not a git repository (or any of the parent directories): .git
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).
okay so I checked and I have this
but the .vscode file is empty
You need to open bot in VSCode then, cause that's the actual root
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
If thatβs the case, and it works when you relock, perhaps itβs a poetry bug
i got this error on linux but it was [BUG] bot-core (4.0.0) is not satisfied. not satisfied iirc, not sure now.
ig i ended up running it in docker
nvm, it can't be 4.0.0
yeah...
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
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
I can't remember what I did lol
A guide to setting up and configuring Bot.
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
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?
Yes you need the site running
Do I download this even though I'm on windows?
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
yay it works thank you
!d setdoc with inventory links
Yea, like this
Is that documtented somewhere on setting up the bot?
It's in the help for the command
!help docs setdoc
!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*
It's not in the docs help command?
!help docs
!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.
do yuo have the permissions?
docs is the top level command
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?
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
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
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
I couldn't find it with a few different search strings
since Discord search bundles images under has:file too
discordpy | https://discordpy.readthedocs.io/en/stable/ | https://discordpy.readthedocs.io/en/stable/objects.inv
numpy | https://docs.scipy.org/doc/numpy/ | https://docs.scipy.org/doc/numpy/objects.inv
matplotlib | https://matplotlib.org/3.1.1/ | https://matplotlib.org/3.1.1/objects.inv
scipy | http://docs.scipy.org/doc/scipy/reference/ | http://docs.scipy.org/doc/scipy/reference/objects.inv
aiohttp | https://aiohttp.readthedocs.io/en/stable/ | https://aiohttp.readthedocs.io/en/stable/objects.inv
networkx | https://networkx.github.io/documentation/stable/ | https://networkx.github.io/documentation/stable/objects.inv
kivy | https://kivy.org/doc/stable/ | https://kivy.org/doc/stable/objects.inv
ah I was searching for a csv dump π
Pillow | https://pillow.readthedocs.io/en/stable/ | https://pillow.readthedocs.io/en/stable/objects.inv
urllib3 | https://urllib3.readthedocs.io/en/stable/ | https://urllib3.readthedocs.io/en/stable/objects.inv
dateutil | https://dateutil.readthedocs.io/en/stable/ | https://dateutil.readthedocs.io/en/stable/objects.inv
pyside2 | https://doc.qt.io/qtforpython/ | https://doc.qt.io/qtforpython/objects.inv
pandas | https://pandas.pydata.org/pandas-docs/stable/ | https://pandas.pydata.org/pandas-docs/stable/objects.inv
more_itertools | https://more-itertools.readthedocs.io/en/stable/ | https://more-itertools.readthedocs.io/en/stable/objects.inv
flask | https://flask.palletsprojects.com/ | https://flask.palletsprojects.com/en/1.1.x/objects.inv
python | https://docs.python.org/3/ | https://docs.python.org/3/objects.inv
arcade | https://arcade.academy/ | https://arcade.academy/objects.inv
pytest | https://docs.pytest.org/en/stable | https://docs.pytest.org/en/stable/objects.inv
django | https://docs.djangoproject.com/en/stable/ | https://docs.djangoproject.com/en/stable/_objects/
requests | https://requests.readthedocs.io/en/stable/ | https://requests.readthedocs.io/en/stable/objects.inv
asyncpg | https://magicstack.github.io/asyncpg/current/ | https://magicstack.github.io/asyncpg/current/objects.inv
I think it was
But I got this from an int e I used to load them all in lol
Ah cool
Ah yea, it's in redis, not site
I think I can actually access that from here
Dev-oops π
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
oops
No I said it does not work when I re-lock.
I did look for issues on their tracker before but didn't find anything
Oh, sorry
IIRC it also works in Docker so it must be like some very specific set of things that are causing it to happen.
Yeah im a bit stumped as to why thatβd be lol
ooi, does it work on my latest PR
where I pull from a tag zip, rather than commit hash
not sure why that would affect it
Have not tried.
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
I will try shortly
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
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
β― poetry run python --version
Python 3.10.4
that's uhh weird
That might be the root of the problems
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)
~/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
I've always had to give poetry the full path to my exe
auto detection hasn't ever worked for me on win
i did pyenv local 3.9.10 prior to poetry install
Yeah on Windows I think I use python39 -m poetry ... so it figures it out
Yup me too but it seems to not be able to figure it out
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
I still get the same error
[BUG] bot-core (1.2.0) is not satisfied.
So I've always done poetry env use C:\Users\chris\AppData\Local\Programs\Python\Python39\python.exe
You removed the venv first right
Also note I am on chris's PR branch. I didn't try with main again
The env detection for me was always broken but Iβve never seen it not error from the start
anyone need a review for any PRs related to site#695?
I believe I have one open.
The subclassing bot and subclassing context aren't there? And (not very important) I believe there's a typo it says custom help channel
(For reference, site#703 and site#702 )
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=...)
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.
Was there any update on bot#447?
A bug in the help channels system?
The bot doesn't give the channel to the person who claimed it first
Our hosting provider is having some issues and that's affecting our bot
Ah, that explains it
Out of curiosity what's the talent pool watch channel?
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
but the feature for the bot is still there right?
The watching system exists for another reason, but not for the talent pool
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
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
Do we plan to make this for more than just PyDis?
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
Do other bots use our kind of config?
Ours is pretty involved for Python, looking at the config.yml we provide on our site
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
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
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
that'd be very helpful
@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
Not as far as I know
You can create a webhook via the API https://discord.com/developers/docs/resources/webhook#create-webhook
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
Just not sure if that's something we would want to or could do automatically
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
Works for me
Don't see why this can't be done automatically
How does the site get the current GIT_SHA for Sentry?
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
Damm I love this 
Smart config? This has that exact purpose anyway π
Afaik smartconfig was never completed
And the discord configuration part was just sort of haphazardly tossed on
How's Auto-Guild ? 
i think bluenix was proposing a name
dunno if he knows abt the previous project we had
I like config and auto: autoconfig
Not exactly. There was a development project that Akarys was the lead of I think, which had a similar use to what Hemlock is drescribing
ah ok so you do know about it already, wasn't sure
though this proposed idea is going to do more than just making a config file
so a play on words like bootstrap like kat suggested would be better
By the way if it was forgotten have you added the replit and heroku thing to your PR? @sharp crag
Wdym?
Ah, my bad. Wasn't aware we were doing that. I'll get it pushed asap
I thought it'd be better together because it's kind of similar yeah
fyi we don't necessarily have to combine them
there is a way to have related links show up on a sidebar
here's an example of that: https://www.pythondiscord.com/pages/guides/pydis-guides/helping-others/
The staff's take on how to help others in our community.
link for others curious; this is how the VPS page looks as of now: https://deploy-preview-697--pydis-static.netlify.app/pages/guides/python-guides/vps-services/
On different VPS services
Hm feels kind of lacking, in my opinion. Combining those 2 might alleviate that, not sure though
How do we get a preview?
they're autogenerated for each PR to the site repository
Can i view it too?
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
I was thinking something like
#reasons why not to use them
Instead you can consider a VPS
#list of VPS
or self host it
yeah i think adding the heroku/replit there at the bottom might be good
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:
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
but the VPS options are the primary focus and name of the page, so i think the replit/heroku stuff should go at the bottom, no?
site#703
https://raw.githubusercontent.com/python-discord/site/main/pydis_site/apps/content/resources/guides/pydis-guides/helping-others.md btw here is how to add a table of contents and also relevant links to your sidebar, if you wish
Not sure how to get it
https://deploy-preview-703--pydis-static.netlify.app this is the site preview
We're a large, friendly community focused around the Python programming language. Our community is open to those who wish to learn the language, as well as those looking to help others.
in order to get to your page, it's here: https://deploy-preview-703--pydis-static.netlify.app/pages/guides/python-guides/subclassing_context/
Subclassing the default commands.Context to add more functionability and customisability.
Yeah, that's what I meant
I'll come up with a working example soon
For the #discord-bots migration are they going to be merged all together?
hMM what is interesting to me though is that in deploy preview 703 i see robin's VPS page?
am i missing something? how does that work
For future reference, Netlify comments on PRs with a link to the preview site for that PR
i mean here: https://deploy-preview-703--pydis-static.netlify.app/pages/guides/python-guides/ this shows the VPS services page, which i thought is a new file that robin created on his fork/branch/PR
Guides related to the Python Programming Language.
It's already been merged
yup. i've not had coffee yet today. please excuse me 
β
ty 
you had me confused for a second there then I realized it was merged too π
This?
lolol and it was 9 days ago π
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 **
Like RDannys if you know that
this?
Yeah
in the preview, why isn't this codeblock being displayed as full in preview?
Add a new line after the 3 back ticks
The first line after back ticks is interpretated as the language for the block
also how does one "request changes" to a PR?
If you go to the files changes tab you can click on a changed line and itβll open a comment box
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?
If you have time, feel free to look at https://github.com/SebastiaanZ/async-rediscache/pull/18
I believe it should unblock 3.10 for us
@gritty wind haha you forgot to add the link for step 4.
It's just a trailing colon then nothing π
That's the bullet points afterwards
Oooh, lmao
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 π
Thanks for the review, itβs great π
oh good i thought that package was abandoned
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.
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
How about adding pagination to the docs command for long ones where it ends with ...
what happened here? #help-lollipop message 
they still had the cooldown role after that (dark.knight) so i manually removed it
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
hi
also can anyone give the line of code where it sends the cocodeblock in the docs command
I think that if the description is long it's best to view it in the native website.
Otherwise you get bulky embeds in the middle of the channel that don't necessarily render well
Even though they're split in multiple embeds navigated by buttons or reactions?
yeah at that point just open the page and read the text as designed by the maintainers and not broken up into segments
yeah you wait for reviews and address requested changes if there are any
what's your github name?
My discord username
so, there's site#703
i did everything requested a while back
ah, you can re-request review when you're ready
on discord?
Can I also do those?
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
Interesting, you canβt do it on mobile
Despite being able to do it when you have write perms
iirc you are only allowed to a rerequest a review for someone with write access whoβs already reviewed
Ohhhhhhhhhhhh I like that
!d r
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
code
!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!*
#bot-commands
@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
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```
How do help channels work in the Python Discord community?
we should do relative
for example then, how do I link this PR into mine? site#697
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>
If I understand your question correctly, just cd <paste the path to wherever Python is located>?
are you sure? I think if i do it it will then say not a git repo when i run the git commit
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
nevermind it said No Python at 'C:\Users\tenuk\Desktop\python\python.exe' so I just moved my py folder to that dir lol
that's your global python install?
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
likely your precommit hook isn't working
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
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?
we shouldn't duplicate it imo.
i thought it was already merged?
yeah, i mean added as in.. you can update an existing page
what was the plan lol. am i the one OOTL
Ahh right, misunderstood. My apologies
no worries, idk if i'm the one misunderstanding
You mean add the contents to robin's one?
