#dev-contrib
1 messages Β· Page 128 of 1
I don't see how adding an attribute to an object like that is better than just making a module with globals. A global variable is all around more explicit.
Right, which is the FastAPI way to get something like that. But I still set my conn object under app.
is it not possible to have conn in module namespace?
wouldn't it be better to have your editor tell you what you're dealing with, and whether it'll be there?
I'm back. I have the GitHub Desktop app open as well
anyway, what I'm trying to say primarily is that when writing tags aimed at beginners, I think extra care should be taken to ensure they're not incentivised towards what would normally be considered bad practice
I think Bluenix is arguing that it isn't a bad practice
That's just arguments to be made in favor of static type checkers
hey, my brain is implementing a static type checker too
when i write code
or worse, when i have to read it π
when I write a function that takes an arg bot: Bot, what I'm saying is that it'll work as long as you pass a Bot instance
the annotation loses a lot of value when that's no longer the case
Yeah like FIX ERROR; said, I really don't think it is. It's a very common pattern in Python code, but of course it doesn't fit your needs when you want static types.
But for someone new, this tag is simply getting them started on attributes. Of course as the needs grow, and they perhaps want their code completely typed after learning much more about typing systems, inheritence, subclassing, self.. this tag isn't meant to trump their values, because it obviously doesn't fit their needs.
This tag simply isn't directed towards you π
If the audience of the tag is people who don't know about classes, why not recommend setting a global variable in a module?
We can teach people about attributes on a separate example.
Like, when creating an embed.
@brisk brook , so I am on my usual setup (different PC than what I pushed from). How can I remove the changed .gitignore from the commits?
If you go to the History tab in GitHub Desktop, you should be able to drag the commit that removes the changes OVER the one that added them.
This will squash the commits into one, and make those changes cancel out. Then you can force push after checking that the history and files look good
@vocal wolf a wa
The intended audience is the ones who already do that, but who's bots are evolving and getting more complicated. It's the next step
a wa
A qwa
But how is it better?
Also should we squash the commits
It's less explicit, and you lose editor support.
You know linguistics, get in there, and also very much yes
I'm officially a computational linguist now.
C o m p u t a t i o n a l
well you know how words work better than I do
I guess yeah, I was about to say that I could continue for another 5 minutes and then had to go

Hey, I'm not even a core developer, I don't bear responsibility for tag-induced damage 
No, we should stop arguing! You're wrong!!!
- you
- are
- wrong
- q e d
No!!!!!!!!!
Yes.
@trim cradle waits faster
the context is just me saying "just put it in module namespace" which retrospectively seems to be everything I even say anymore
you guys should stop spamming or I'll ban you both
What, you need me to review it right now?
fineee
if you're able to, please do
await asyncio.gather(asyncio.sleep(1), asyncio.sleep(1), asyncio.sleep(1), asyncio.sleep(1))
but if you aren't, I have it on auto squash merge
hmmm
wait a second
literally
Huh that's a thing?
auto merge or auto squash merge?
Auto squash merge
Regarding the bot global tag, I'd be interested to see an actual case where setting an attribute on bot as was described is necessary, I think I'm with kwzrd on this one in that in general it isn't a pattern I'd consider particularly good practice, although I'm not sure of the actual usage of it
Yeah I think I'm losing my mind a little bit
What's going wrong?
The only valid use case I can think of is when the class needs to manage the lifetime of the object (e.g. cleaning up an aiohttp session). In such case, dynamically appending the attribute wouldn't be adequate anyway. In other cases, I agree that a global variable makes more sense
I don't think I'd ever speak the words "a global variable is better" but yeah...
lol
I have set one attribute on a bot I'm writing, even though currently its only used by one cog and probably will continue to be, but I didn't want it to be cleared when I reloaded that extension
This is what I can see from the desktop History app
How do I un-do the changes where I somehow force-pushed the change to the Pull Request for my local .gitignore (that was then added to my forked repo)
in accordance with the discussion above, is this a bad thing?
Oh, I've never run into this myself. Umm-
Couldn't you just define it as a global in the Cog's file, not in the actual cog class?
Yay I broke something real good
No because a reload of an extension just reloads the whole module (file)
That's fine, you have something you want to exist during the entire lifetime of the bot. Adding it to the bot makes sense
but if I run a reload cmd, wouldn't that reset it?
Ah I didn't realise that
yeah, even if the extension is reloaded, I want those to stay since they're resource intensive to collect and require multiple database calls
@dim pelican which of those commits added that line, the one you have selected?
If your bot has some lifetime logic like cleaning up, you should probably create a proper class to manage that (like in @stable mountain)
@vocal wolf I have completed my review
Hey! Any news about sir-lancebot#778 ? It's blocking two of my issues :/
very nice
The author is currently going through exam season as far as I know
I want a green ribbon.
so you might need to wait a little while π
Oh, exams are important indeed. Not even a code suggestion could help on this?
Feel free to review it if you see anything that needs changed
but from the first glance, there's currently only 1 thing outstanding
Have already done, I meant pushing a code suggestion to the one thing that outstands and maybe somehow accept it. But on second thought, that's not possible π
My phone didn't open this specific commit correctly. But I found the one you presumably linked.
Umm, I am not sure what to do here. It's a bit late here for me to try rebasing and amending.
I changed my local .gitignore to the original, added it and then committed. Since there are no changes, the changed file was removed
I think that's enough for me today...losing my mind
Also got drafted for now π₯²
Just a precaution to make sure it doesn't get merged before we have written confirmation
#dev-announcements message
so uh, did something happen on the test server?
since I brought this up previously iirc and was told something like don't add people you don't trust
no, nothing happened
yes, people are trusted, we just decided to implement it
it's primarily staff in there
well, ok
I know you may have proposed it at some point, I mean we do change our feelings on things, staff team is growing and while not malicious if people's bots are using the same prefix in the server and w/e it doesn't scale as well, we do revisit things.
one fuckup later...
I mean, yeah, I get it. Just feels like it happens a lot (it probably doesn't and I'm overthinking everything)
like what happens?
was a reply to this, as in that specific scenario
i'm still not sure which bit you are referencing, if it's to staff revisiting things then yeah we do revise
I know you may have proposed it at some point, I mean we do change our feelings on things,
but also note this part here, about it not happening and overthinking it π
I'm not actually sure what prompted this re-evaluation, I just know that it wasn't caused by an incident, possible that it was your original comment, not sure
aha
yeah I can't find the context that spawned https://github.com/python-discord/bot/issues/1683
Β―_(γ)_/Β―
I can't even find where I said it initially so
probably a channel that has since served its purpose I guess? idk
Never saw anyone bring this up and if it was then I wasn't part of it
I just started using my actual machine rather than a VM and realised I'm not comfortable with allowing eval on it for everyone
How can I see all issue and PR I opened? Closed and open
Not cool lol, bot#1784 was noticed and merged yet my issue bot#113 which was mainly bot#1707 wasn't answered
Which was opened 24 days ago...
Itβs basically entirely based on who sees your work, and how actionable it is
If you think an issue is stale or forgotten, feel free to bump it
Lol it appears we have had an issue for bot-var
But I never made an issue 
Purely coincidental 
I need help setting up config.yml file
A guide to setting up and configuring Bot.
I never used yml files, and don't understand how to set it up exactly? style.emojis? I am confused
Can anyone send their example?
Yes
Oh
But what should I put under style.emojis?
I mean like:
style.emojis: smily: some_face
Yea but under what names?
Ohhh
I created a file
Not a copy of config-default
silly me
Thank you!
Yeah sure lol
How am I supposed to do all emojis?
What are the required stuff?
Yeah but I kinda need to create the emojis
Whst is CDN?
You can set them to be any emoji you like
as long as your bot has access to them it's fine
IE the trashcan emoji doesn't need to be
it can be βοΈ for all the bot cares
as long as it's in the config
you also don't need to fill in all the emojis, just the ones you'll need for whatever you're doing
e.g. the bin is pretty useful because the paginator uses it, and you might want to test the help command for example
Oh yeah it can raise Not Found
you can usually get away with not filling in that much tbh
Yeah that other ones will just look like !yert
guilds.categories, what is moderators category name? Just STAFF?
https://github.com/python-discord/bot/blob/main/bot/exts/utils/snekbox.py#L30 Why is this used the FORMATTED_CODE_REGEX? What do this help in parsing codeblock? 
bot/exts/utils/snekbox.py line 30
re.DOTALL | re.IGNORECASE # "." also matches newlines, case insensitive```
And what about modmail and summer_code_jam category? shouldn't it be removed?
Shouldn't the template be changed of the server?
!e it means you can do stuff like this ```py
x = "This is from the first code block"
and it stills only evaluates the code blocks ```py
print(f"{x}, and this is from the second code block")
So that you can add mutliple code blocks to a single message and explain what you're doing in each step to whoever you're helping
@vale ibex :white_check_mark: Your eval job has completed with return code 0.
This is from the first code block, and this is from the second code block
Oh wow, never knew this is also possible. Thanks π
π
I'll just create my own server exactly like this one, just I donno about staff categories
We have a template on the contributing docs I believe
It's what we used for our test server
I used the template
There are categories or channels not there
there's no need to have a separate category for everything
to avoid as many channels as what's in this guild, we merged many of them
IE the staff category in the template covers the staff, mod and admin categories here
Oh wait
and modmail I believe
The goal is to facilitate testing of the bots, not to exactly mirror our actual server. There are many channels the bots don't need at all and others which can be merged together.
Yeah it is very confusing
It's like the config file does not match the template
I mean there are some categories that do match
two config items can have the same ID.
IE in the config you many have many categories lines that point to the same category in your test server
Yeah but the template doesn't have these channels:
announcements, change_log, mailing_lists, python_events, python_news, reddit,
And this is just the announcements part
A significant proportion of the channels in the configuration file are only there for the sake of whitelisting or blacklisting some features. These kinds of channels are the ones that we felt could be merged together for the sake of testing. For example, the admin, admin-spam, mod, and mod-spam channels we merged into admins-mods.
Why not create a template from this server?
those can all be pointed to the all-logs channel
or whatever channel you want them to be pushed to
Oh ok
Hey @vocal wolf (sorry for the ping), but i needed some help with that PR of mine. So what has happened, is, I had deleted the fork I created (and the branch as well), so now I don't have access to that Fork. So I should fork the repo again and make a new PR or is there any other way? (Sorry, but I ain't that good with GitHub)
Since fork was deleted, you must create new fork via forking by fork on GitHub.
TLDR; You must fork again.
Yup, and I will have to make another PR (for those changes) or what?
Another PR will have to be created.
Ah
Just make sure that you link to the context in the previous one
since the main branch already has the changes, you cannot re-open a PR after it is merged
Ah, sure. Can i name it as Continued PR of #old-pr?
Which one? Sorry for being a bother π
Ah cool. Thanks for the help!
np m8, thanks for fixing my mistake lol
Which one 
the one where I merged the PR too early
Ah
Ah so Bluenix isn't a core dev?
Sorry, I mean staff
no they're staff
Bluenix is staff, but not a core-dev
just not a core dev
Ah
Staff = helpers, mods, admins, owners
Thanks for the information. I'mma make a new PR as soon as I get free!
veri nais
Since fork was deleted, you must create new fork via forking by fork on GitHub.
Why am I laughing soo much, after reading this message? 
Why are these lines needed, given that the result will go in a codeblock anyway
https://github.com/python-discord/bot/blob/db26aac77714c5a06b74db8cc8e9d6be7ff0aac0/bot/exts/utils/snekbox.py#L153-L157
bot/exts/utils/snekbox.py lines 153 to 157
if "<@" in output:
output = output.replace("<@", "<@\u200B") # Zero-width space
if "<!@" in output:
output = output.replace("<!@", "<!@\u200B") # Zero-width space```
Or why not just do replace right away?
It's there to protect against escape attempts
I guess protection in case someone figured out how to make it not in a codeblock?
Of which we've had a few
Yeah
Wait, it's possible to make an eval result show without the codeblock?
shouldn't allowed mentions mean it would be impossible to ping somebody even if the codeblock was escaped though?
Yeah, but it's annoying to figure out
This has been here for over two years
@gritty wind k I merged that site PR I hope I didn't break production
maybe
Did allowed mentions even exist back then
no, I don't think so
It's probably redundant now, but there is no harm in keeping it
Especially since allowed mentions can break if discord fucks up
Thanks xith :D
Allowed mentions was only added in like 1.4/1.5
lol that isn't the lounge
lol
In config.yml, what are webhooks for? I mean why is it a number and not a link? What should I put instead?
It's the ID of the webhook, the bot has webhook perms, so it can get the webhook secret directly
Can I get it myself?
Ohh ok, thank you!
Is it helpful for people without approval rights to review PRs?
absolutely it is yeah
Not as much as ones with permission
I would say it does, actually
of course it needs someone with approval right to do the final sign off before merging, but a thorough review from anyone is always greatly appreciated and useful, you don't need permissions in the repo to find bugs in a PR
I mean, to comment about an error or something wrong with the code, that's the best there is, but to approve the changes, not as much
still matters β when we see a good review from a non-core member it means we can accelerate our review a bit
Also, for someone consistently doing great reviews we'll definitely consider them for the contributor role and someone with the contributor role counte iirc
Oh contributor role counts? I thought it is only staff or project leads
contributors count as staff as far as policy bot is concerned
And reviewing is probably the best way to familiarise yourself with the codebase
Sweet, thanks for the quick feedback!
If I have errors with starting @stable mountain bot my own, where can I ask about them?
!paste
Pasting large amounts of code
If your code is too long to fit in a codeblock in discord, you can paste your code here:
https://paste.pydis.com/
After pasting your code, save it by clicking the floppy disk icon in the top right, or by typing ctrl + S. After doing that, the URL should change. Copy the URL and post it here so others can see it.
Have you got docker desktop running?
Right now? No
you need it running to use docker compose
I think it's running on background tho
Do you have this icon on your task bar?
Inside the ^ yeah
I don't now how to read this error really, so ask me even the stupidest thing there is and most basic, maybe that's the issue
The error is saying that docker-compose can't connect to the docker agent
this is before touching anything in the bot
I know that snekbox worked for me
If you open docker desktop what shows up under the container/apps section?
I don't think that's a docker running issue, NIR does docker work for other applications?
try docker run hello-world
Docker engine starting
if that works, there is some problem in docker compsoe installation
Yea, looks like the engine wasn't actually running
The error literally says that it cannot connect to the docker engine
try quitting and restarting it, if it isn't starting
hmm i can see, docker.errors.DockerException: Error while fetching server API version: (2, 'CreateFile', 'The system cannot find the file specified.')
It's like that a few inutes, Benefit of laptop programming
Me?
that create file is when it's trying to open the transport connection
ye
While docker is trying to start since it's being called early on in the docker-compose connection
everything in linux is a file 
Done I think
now see if docker engine can start
then retry docker-compose
I always got a connection aborted, sorrry ^^
I should now try the command again?
yea, give it a go
And everytime I want to start it I should do the same command and it'll be faster?
yea
And I am using a school laptop -_-
hah, impressive they even have docker installed on there
I mean I installed it
I wonder how it can actually take so many files and programs
yea you can safely ignore that, we use that to speed up development
otherwise you'd need to rebuild the image everytime you make a change to code
Ah right, we didn't get admin access on school laptops when I was in school π¦
you'll need to change the redis url
likely the same for the web too
urls:
# PyDis site vars
connect_max_retries: 3
connect_cooldown: 5
site: &DOMAIN "web:8000"
site_api: &API !JOIN ["api.", *DOMAIN]
site_api_schema: "http://"
site_paste: &PASTE !JOIN ["paste.", "pythondiscord.com"]
site_schema: &SCHEMA "http://"
site_staff: &STAFF !JOIN ["staff.", *DOMAIN]
paste_service: !JOIN ["https://", *PASTE, "/{key}"]
site_logs_view: !JOIN [*SCHEMA, *STAFF, "/bot/logs"]
# Snekbox
snekbox_eval_api: "http://snekbox:8060/eval"
# Discord API URLs
discord_api: &DISCORD_API "https://discordapp.com/api/v7/"
discord_invite_api: !JOIN [*DISCORD_API, "invites"]
# Misc URLsw
bot_avatar: "https://raw.githubusercontent.com/python-discord/branding/main/logos/logo_circle/logo_circle.png"
github_bot_repo: "https://github.com/python-discord/bot"
this is what I have for my urls section to work with docker
to setup redis, at the top of your config.yml file, set the redis section to this ```yaml
redis:
host: "redis"
password: null
port: 6379
use_fakeredis: false
urls:
# PyDis site vars
connect_max_retries: 3
connect_cooldown: 5
site: &DOMAIN "web:8000"
site_api: &API "api.web:8000"
site_api_schema: "http://"
site_paste: &PASTE !JOIN ["paste.", *DOMAIN]
site_schema: &SCHEMA "https://"
site_staff: &STAFF !JOIN ["staff.", *DOMAIN]
paste_service: !JOIN [*SCHEMA, *PASTE, "/{key}"]
site_logs_view: !JOIN [*SCHEMA, *STAFF, "/bot/logs"]
# Snekbox
snekbox_eval_api: "http://localhost:8060/eval"
# Discord API URLs
discord_api: &DISCORD_API "https://discordapp.com/api/v7/"
discord_invite_api: !JOIN [*DISCORD_API, "invites"]
# Misc URLsw
bot_avatar: "https://raw.githubusercontent.com/python-discord/branding/main/logos/logo_circle/logo_circle.png"
github_bot_repo: "https://github.com/python-discord/bot"```
Ok
yea, you'll need to change site_paste and snekbox_eval_api if you want to use either of those things
ah alright
But site_paste I didn't change
the bot docker-comopse starts up snekbox for you, no need to run it seperatly
did you add, or replace?
probably best to disable the snekbox in the bot's compose then
Added in the top
you should remove the part that's already there then, since there's already a section for redis
Yeah updated, so I should disable the snekbox in the bot' compose like Numerlor said?
Because I have no idea how π
You can copy the docker-compose file into a new file called docker-compose.override.yml, and remove/comment it out. Alternatively, you could use docker compose start postgres redis web bot. You can also remove the snekbox container from the docker desktop UI.
There are quite a few ways to do it, but I don't think any are worth it tbh. It's easier to just have it up and running, even if you already have another one
I'm not actually sure how docker will handle merging of a removed service in an override
I've never tried it
Oh ok
Anyways it doesn't work
I changed it to:
redis:
host: "redis"
password: null
port: 6379
use_fakeredis: false``` But it spams the could not connext to Redis error, what is even redis why should I use it?
You can use an ignore profile in the override; I use this to disable the bot
services:
bot:
profiles:
- ignore
Do I need to run some Redis server or someting?
I'm confused by this line: https://github.com/python-discord/bot/blob/main/bot/exts/utils/clean.py#L168
It doesn't upload in chronological order, last message appears at the top.
the bot's compose should start redis along with the other containers
You don't need to, that's the magic of docker
So what should I do
Are you trying to start the bot?
Yeah
And you entered docker-compose up?
docker-compose up --no-deps bot
Why --no-deps?
Because I don't think I set up the site
It sets up the site for you
Oh so what should I type than?
Just without that flag
docker-compose up bot?
yes
Ok
To clarify what happened, --no-deps says to not do the preliminary steps before starting the bot, one of which is to start redis, but you entered in the config use_fakeredis: false
So you told it to use redis, but also not to start it
What are the errors?
Again could not connect to Redis, but than it loaded the cogs
There is another error but I know how to handle, privileged intents
Intents should be handled in the code already
Yeah not it is ok I know I forgot to enable intemt via developers portal
ah
But the error still spammed
Ok, what is the specific error you get with redis
Now it spams like a million times the redis error, discord.Forbidden error and cogs loaded
Hey @viscid coral!
Uh-oh! It looks like your message got zapped by our spam filter. We currently don't allow .txt attachments, so here are some tips to help you travel safely:
β’ If you attempted to send a message longer than 2000 characters, try shortening your message to fit within the character limit or use a pasting service (see below)
β’ If you tried to show someone your code, you can use codeblocks
(run !code-blocks in #bot-commands for more information) or use a pasting service like:
Yeah I'll use paste
Redis error: https://paste.pythondiscord.com/iyojiyavow.sql
Forbidden error even tho it has permissions=8(administrator): https://paste.pythondiscord.com/voqiregira.apache
Sorry for pastebin abuse
I didn't update all webhooks, just one
But I think it should raise naother error
But the bot is running
Whatβs the output of this:
docker container ls
PS C:\Users\Student> docker container ls
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
cc0d7041b770 ghcr.io/python-discord/site:latest "python manage.py ruβ¦" 10 minutes ago Up 10 minutes 127.0.0.1:8000->8000/tcp bot-1_web_1
c271dcf50c6b redis:5.0.9 "docker-entrypoint.sβ¦" 10 minutes ago Up 10 minutes 127.0.0.1:6379->6379/tcp bot-1_redis_1
4464f58a2851 postgres:13-alpine "docker-entrypoint.sβ¦" 10 minutes ago Up 10 minutes 5432/tcp bot-1_postgres_1
4d9891bcbb1d ghcr.io/python-discord/snekbox:latest "gunicorn -c config/β¦" 10 minutes ago Up 10 minutes 127.0.0.1:8060->8060/tcp bot-1_snekbox_1
0e28b9deb169 bot-1_bot "python3 -m bot" 52 minutes ago Up 7 minutes bot-1_bot_1
PS C:\Users\Student>```
I'm gonna guess the channel ids are mis-configured?
As for the webhook urls, can you set all the other ones as well? You can use the same ID for all of them
Some of tem yeah, it's just that they don't match the template server
Yea, they cant, since when you create a server from the template, they get all new IDs
the config-default.yml values are the IDs of the channel in this server
So there's no way for us to set them correctly for the template server ahead of time
No I meant some channels names that are in config are not the ones in the server
Hmm, doesn't the bot exit if it can't connect to redis
Are these old logs
or does it generate more of this error when starting up now
You can clear the old logs by removing the bot container
My dog peed in my yard, be back in a few minutes(or seconds)
Not a pet owner, but isn't that were you'd expect that to happen? What action needs doing π€
They need to mark their territory, assert dominance
Can't have shit in Detroit
Cleaning it lol
Umm, how do you clean a liquid in a yard
more liquid
Paper towel and wipe
Yeah, so what should I do? Update webhooks and channels?
Yeah
Use your best judgement when it comes to setting the channel IDs. You can combine a large majority of channels
Yeah but I have no idea what thos channels for
duck_pond?
I'll just make them all same channel and same webhook
If you don't know what to put, just pick a random channel. Chances are, you won't need 90% of these channels, unless you are working on a feature related to them, at that point you'll know what they are
For webhooks, yeah that's fine
For channels, you're better off spending 10 or 20 minutes now trying to figure them out now
If you can see a channel that has the same, or a similar name to what you're looking for, use it
Yap ok
Thank you! When I finish I try again, if it works, or don't(sad) I'll let you know!
Hi, I would like to contribute to @dusky shore but I have a few questions.
- I believe what I need to do is just follow the steps on this page:
https://pythondiscord.com/pages/guides/pydis-guides/contributing/sir-lancebot/
But I am not sure since this is my first time contributing. Could someone please tell me if this is correct? - I also have a question about the contributing guidelines. It seems like what is stated there is for the case of working on existing issues, but I would like to contribute by simply adding a new game/command to the bot. Are there separate guidelines for that case or is it the same for both?
- I don't think this was stated anywhere on the "contributing to Sir Lancebot" page, but is there a step where I set up a command for the bot to use to run my game, or does that happen automatically somewhere?
Thanks so much in advance!
A guide to setting up and configuring Sir Lancebot.
How do I stop the current bot from running? I want to run docker-compose up bot again to test if works
- Yes, that's info on how to get sirlance bot running on your machine
- Create an issue for something you want to add first, so we can decide if its' something we're happy to have in the bot
- You create a new cog and define a setup function to load it
if it's in terminal then ctrl+c
if not, open docker desktop and click on the thing you want to stop, then the stop button
Thank you!
Oh yeah I pressed stop but the response was delayed
Issues are also really useful for scoping out an issue first, making sure the steps are planned and there's a clear end goal before you work on implementing it
@vale ibex Where do I create a cog?
if you take a look inside the bot directory you can see all of our files, cogs are all in the exts folder, which sub folder they go in depend on the theme of your new cog
if it's specific to a season, then it goes in one of the seasonal cogs, if not it goes in evergreen
If you open one of the cogs already in there you can get a feel for the layout
Ok, lemme take a look rn
Ok
You can see it has a class that subclasses cog, and a setup fucntion that adds the cog to the bot
we have logic that automatically calls the setup function for all files in exts
Ok, cool. I'll check it out. Thanks again!
π
So on line 18 here, is that how you would set the command for the game?
you just give it the name you want
so you see there isn't called 8ball
so if I do this it runs the command
.8ball
Your input was invalid: question is a required argument that is missing.
Usage:.8ball <question>
just like a non-cog command
Ok, kinda sorta makes sense
https://paste.pythondiscord.com/xudugagiqi.apache Tehe bot seems to be working fine, but when I try the docs command it says the symbol was not found, yet it should be?
ooo why was #dev-voice opened?
Which symbol did you try to get?
So Joe did some sort of livestream on Kubernetes a few days ago and he opened it so other ppl could join and listen
str.format and discord.ext.commands.Bot
If you do !docs it will list all the symbols you have
And it was since left open
It says nothing there
yea, you need to add them
How?
for python its !docs setdoc python https://docs.python.org/3.10/ https://docs.python.org/3.10/objects.inv
Is that how @stable mountain does it every time it restarts?
they're stored in redis site db
they're saved in the site db
If I want all of that?
or me π
If you're developing for the bot, you really don't need all of them
or any of them really
I think they're working on a docs feature,
Is there a library for message/user commands yet btw?
so they'll need some at least
having a few can be useful from my experience (but depends on what's being developed), although definitely don't need all of them
At the moment I am not working on anything really, I just need it first for testing, and than I'll start on working
!docs setdoc <Package> <Base URL> <Inventory URL>
I have the inventories downloaded locally to not download them on every restart
Base URL I think I understand, btu Invetory URL?
see my csv above
@vale ibex So just to make sure I understood correctly, to create a cog for my game, I would need to create a class, like the one in the magic 8ball game, put all of my code for the game under that class, and define the cog function at the bottom, like the one attached?
Yes ofc
Again, I'd recommend raising an issue first so it can be discussed
it being the command you want to add
Yes, I will, thanks again for your help
Now I am really interested, how does the docs command work? It downloads a file?
it downloads and decodes the objects.inv file
which is a Sphinx file
(I might have mispelled that) I did, updated it
!src docs
Look up documentation for Python symbols.
see that for the source
How does it decode, this weird text
it's gzipped
The source for it confuses me
ooo how did you do that
that _cog file is mostly just the commands side of it
most of the decoding logic is in the other files in that dir
Oh and btw, thank you all so so so much for helping me start my bot, couldn't do it without you <3!!!!!!
Still so hard
the bot parses the inventory file and gets the individual symbol names and their URLs from that, then when you try to look up a symbol through the command it uses that url to scrape the HTML data into Markdown
I get this error with snekbox:
ClientConnectorError: Cannot connect to host localhost:8060 ssl:default [Connect call failed ('127.0.0.1', 8060)] from the bot
you'll want snekbox:8060 if it's all within docker
# Snekbox
snekbox_eval_api: "http://localhost:8060/eval"```
This is what I currently have
So just snekbox:8060?
Yes it worked, thank you!
I have a question, why if the mute fails to apply, it still sends the dm saying you were muted? I tried it on myself
Because it first tries to DM you
I suppose it just follows the same scheme as a ban. In case of a ban, you can't DM the user after you already banned them
I am hosting a website as well?
The website is coupled with the API at the moment, so yes
Hmmm I want to have a greedy channels arg, so I have discord.ext.commands.Greedy. But I want to alternatively specify "*". But I can't use Union on Greedy because Greedy is not a type.
I couuuld write a custom converter for this, but I'm wondering if there's a hack for this kind of thing
What is this signal package used in the python bot? The signal on pypi looks like some other package used to send SMS on android devices.. https://github.com/python-discord/bot/blob/main/bot/exts/utils/snekbox.py#L8 
bot/exts/utils/snekbox.py line 8
from signal import Signals```
bot/exts/utils/snekbox.py line 123
name = Signals(returncode - 128).name```
Oh means this returns the name for the return code python returns..
yea
Thanks π
I did a quick test. If you have requests as a dev dependency, you can't install the project without a venv.
Commands
poetry update
docker build .
pyproject.toml
[tool.poetry]
name = "__test0"
version = "0.1.0"
description = ""
authors = []
[tool.poetry.dependencies]
python = "^3.9"
aiofiles = "*"
[tool.poetry.dev-dependencies]
requests = "*"
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
Dockerfile
FROM python:3.9-slim
ENV POETRY_VIRTUALENVS_CREATE=false
RUN pip install -U poetry
WORKDIR /app
COPY pyproject.toml poetry.lock ./
RUN poetry install --no-dev
Error
OSError
Could not find a suitable TLS CA certificate bundle, invalid path: /usr/local/lib/python3.9/site-packages/certifi/cacert.pem
at /usr/local/lib/python3.9/site-packages/requests/adapters.py:227 in cert_veri
- Can someone replicate this?
- Doesn't that mean that building a project without a venv can potentially fail the build out of the blue? What if a dev-dependency of our project is a main dependency to poetry?
just replicated that in the docker playground
So my question is: why do we disable creating the venv?
Hey @brisk brook (sorry for the ping), but I made another PR (the continued version of the first bot vars, and I changed the tag name for now (it needs more changes). Can you approve those changes? The new PR is https://github.com/python-discord/bot/pull/1786
bot#1786
Because it's redundant. A Docker container generally has no need for isolating dependencies from the global site.
except if you want requests as a dev-dependency, apparently 
For example, if we'll want to make tests for the forms backend, which uses starlette, we will need requests. Will we just put them as main dependency?..
I have no idea why that error is happening.
certifi is installed right?
This is the plan poetry makes:
Package operations: 1 install, 0 updates, 5 removals
β’ Removing certifi (2021.5.30)
β’ Removing charset-normalizer (2.0.4)
β’ Removing idna (3.2)
β’ Removing requests (2.26.0)
β’ Removing urllib3 (1.26.6)
β’ Installing aiofiles (0.7.0)
So I assume that it first removes requests and/or certifi, and then can't download anything because these packages aren't there anymore.
because im supposed to allow optional seeds for the .quack command
Oh okay, I understand. requests is a dependency of poetry itself
yes, that's my point
so there's (theoretically) nothing that prevents poetry from using, say, pre-commit as a main dependency and actively using it, and then @stable mountain will fail to build
Well, we could make a venv but that bloats the image size a bit and slows builds down. I always felt like using poetry in Docker was redundant anyway; can just export to a requirements.txt. That would work fine in CI but would be inconvenient for local builds. Maybe in Docker: install poetry, export to requirements.txt, purge poetry and all dependencies, then install from requirements.txt? Sounds a bit ridiculous too.
alternatively we could just hope that poetry never does that, and move those dev-dependencies to main dependencies if it becomes anissue
I wouldn't call that a dev dependency in that case
wdym?
If poetry needs it and Python needs poetry then it just seems like a main dependency
Basically this
sounds like a hack, but I guess build speed/image size is more important here than occasionally failing the build
Well occasionally seems like an overstatement, poetry will rarely change its dependencies this drastically
can poetry write a requirements.txt along with the lock file?
yeah, poetry export -f requirements.txt
Is there any downside in installing from a requirements.txt through pip instead of poetry if only the main deps are written?
I guess it won't check the hashes
It includes hashes in the requirements.txt
yeah
I guess that means pip can check them?
->
aiofiles==0.7.0; python_version >= "3.6" and python_version < "4.0" \
--hash=sha256:c67a6823b5f23fcab0a2595a289cec7d8c863ffcb4322fb8cd6b90400aedfdbc \
--hash=sha256:a1c4fc9b2ff81568c83e21392a82f344ea9d23da906e4f6a52662764545e19d4
could just have the requirements.txt written along with locking and then use that in the docker build which would get rid of poetry completely for non dev environments
HINT: You are attempting to install a package literally named "requirements.txt" (which cannot exist). Consider using the '-r' flag to install the packages listed in requirements.txt
π€¦ I can't believe how many times I did that, thanks to pip for including this warning
Actually, if we automatically generate a requirements.txt and somehow maintain it automatically, builds should become much faster
because now there's no need to install poetry for building, right?
maybe a task for the locking so it's done in one step, but I'm not completely sure if it's all equivalent
We have the same situation in CI
Except with the added complexity of trying to cache all the packages
I might be totally wrong, but there's an export option in poetry:
poetry export -f requirements.txt --output requirements.txt
That'll export the lock file into a requirements.txt format.
Although, I'm not sure if that requires the packages in the lock-file to be installed.
(Update: It doesn't π )
it does not require them
Yeah, I've just tested it out.
I have a task for this
[tool.taskipy.tasks.export]
cmd = """
echo 'Exporting installed packages to requirements.txt.\n\
This task automatically relocks the lock file using "poetry lock --no-update"' && \
poetry lock --no-update && \
echo '# Do not manually edit.\n# Generate with "poetry run task export"\n' > requirements.txt && \
echo "Exporting..." && \
poetry export --without-hashes >> requirements.txt && \
echo "Done exporting."
"""
help = "Export installed packages in requirements.txt format"
this exports packages without the dev dependencies. And yes, you must ensure that the lockfile is up to date or the requirements.txt file gets messed up
I believe it would enough to just modify the Dockerfile. But that's just my opinion π
yep, have this bug, our solution was to add requests to the main dependencies since discord py uses it already
I think dpy uses aiohttp as their only dependency.
Yea, d.py doesn't use requests
the only time you'd need requests is if you're using d.py master branch, so poetry would need requests to use git
Also, in theory.. if we were to export the requirements and just install it, it would make the build time way less, since this way poetry won't create the virtual-env, I guess? π
what? it installs requests iirc
huh, it used to
weird
it doesn't create venvs, that was what started the discussion
Oh, I see. Sorry :/
but yes it would be a bit faster as there'd be no need for poetry, although I'm not sure it's worth keeping the requirements.txt up to date as it'd have to always be updated with the lock file
I don't think so. If you export it when you build up the container, it would be the same as now.. I mean maintained.(Although, that might be bad practice)
I'm not sure, discord.py has only every required pynacl, websockets and aiohttp
using the requirements.txt would also result in possibly funky behaviour as poetry always installs the package locally
I don't think any of these needed requests
syncwebhook
It seems like back in 2015 it started off using requests π
discord/webhook/sync.py lines 66 to 69
try:
from requests import Session, Response
except ModuleNotFoundError:
pass```
oh interesting
That's far before I ever used it π
looks like it has to be installed seperately to use sync webhook but
then the container would need poetry which would defeat most of the benefits apart from avoiding the error above, which I don't think is likely to show up in our environment
For Webhooks
but yeah, dpy doesn't actually install requests, apparently
I understand, but it still won't make a separated poetry environment, that should be enough to boost the build time (in a positive manner naturally)
it already doesn't
Oh, wait. I just came across something.
https://github.com/python-poetry/poetry-export-plugin
that's actually a plugin for the not yet released 1.2.0 which will likely have the removal of poetry export
as of now the 1.1.x series has poetry export
tldr this is part of poetry rn
Yes, I thought it doesn't require poetry to be installed.
pyproject.toml lines 17 to 19
[tool.poetry.dependencies]
python = "^3.6"
poetry = "^1.2.0a1"```
Then, set virtualenvs.create to false should solve the problem.
it... already is
( @static canyon the PR is failing tests )
@dim pelican hey, there's a page about commit messages, for future reference π https://pythondiscord.com/pages/guides/pydis-guides/contributing/contributing-guidelines/supplemental-information/#writing-good-commit-messages
Additional information related to our contributing guidelines.
Lol thanks. I'm guessing this is in relation to my second to last commit?
yes
I managed to force push a local .gitignore to my remote branch that the PR is tied to...
So I changed the .gitignore and then pushed the "old" version to resolve it, but I was losing my mind yesterday
A properly formed Git commit subject line should always be able to complete the following sentence:
If applied, this commit will __your subject line here__
Changed my way of thinking pretty much immediately, great link arl!
hm
that guide is actually slightly wrong
If applied, this commit your subject line here
present tense
Any interest in adding a .gitmessage.txt to use as a template? Found this from git-scm:
Subject line (try to keep under 50 characters)
Multi-line description of commit,
feel free to be detailed.[Ticket: X]
https://git-scm.com/book/en/v2/Customizing-Git-Git-Configuration
Well imperative tense is like saying "Do this action"
From a grammar stand point, this commit will "Do this action" works, but not this commit "Do this action"
true
I created an issue for the game I wanted to add to @dusky shore. sir-lancebot#823
If a contributor could take a look and add some comments when they get the chance (not urgent ofc), that would be great! Thanks so much in advance!
hey all β I just merged a change on how site generates static file, let me know if local stuff breaks
it didn't in testing, but you never know
Have just fixed it π
Hopefully bot#1787 passes this time
Seems to have
Hello
Hi @timid sentinel (sorry for the ping). I received your comment. Are you referencing sir-lancebot#821?
For the record you don't have to push to see if it passes, you can run poetry run task test
Yeah, I am aware. I just always forget (and it's not a part of pre-commit)
.help snake antidote
.snakes antidote
*Antidote! Can you create the antivenom before the patient dies?
Rules: You have 4 ingredients for each antidote, you only have 10 attempts
Once you synthesize the antidote, you will be presented with 4 markers
Tick: This means you have a CORRECT ingredient in the CORRECT position
Circle: This means you have a CORRECT ingredient in the WRONG position
Cross: This means you have a WRONG ingredient in the WRONG position
Info: The game automatically ends after 5 minutes inactivity.
You should only use each ingredient once.
This game was created by Lord Bisk and Runew0lf.*
@austere hornet Was referring to that 
Haven't looked through the proposal too closely though, let me know if I'm misunderstanding
Ok, thanks
Ok I actually don't know how to do this π
Like I can write a converter, but it would force the channels arg to be the last one
Really? It doesn't work with Union?
Greedy technically is a converter
And other converters do work in Union.'
What do you mean by complaining?
I wonder if it's possible to subclass it and make it return a new type with the proper converter
Or maybe just return a function? Since functions are valid converters too
It crossed my mind, but I would need to dig in dpy and understand how it processes this kind of object
Try returning a function. That doesn't seem complicated.
What does the function do?
you can add your own hooks as far as I can tell, by adding them in to .git/hooks lol
Try to use the greedy converter, and if it fails check for the string literal, and if that fails too raise BadArgument?
what object? can't view the link, and was reading the source a few days ago
Greedy[TextChannel]
Never mind, it's not as simple as using a function. Problem is that Converter.convert's signature expects a Context, but the function-style converts do not.
How it uses it as a converter
ah jeez, that's so complex in there
Looks like you'd want a custom converter, I think
I guess if it's explicitly doing if isinstance(thing, Greedy): ... then wrapping it in a function won't work anyway
yeah that's my worry, if it's checking explicitly for that case then it probably checks the converter against all arguments until it finds one it fails on
Or what about just gathering a Greedy[str] and parsing it ourselves? Seems less convoluted than using some converter madness
Everything starts off as a string so it would just consume everything
Sorry for just barging in, but that could work.
I came up with something like that:
*channels: Union[discord.TextChannel, str]
Although, that would still force you to put channels as the last argument.
Yeah problem is I don't want to allow multiple strings
I want either a series of channel ID's or a single string
Maybe this hacky thing: ```py
class Greedy2(Greedy):
def getitem(self, params):
greedy = super().getitem(params)
return type("Greedy", bases=[Greedy], dict(converter=greedy.converter))
I think that its a banned type in greedy
This is where dpy handles the Greedy object
Actually that may need to account for converter being an instance method but maybe the core idea can work
You could do an Optional, that falls back to "*" if you don't provide channels? π
wow fuck that it uses is
Well if I don't provide a channel it uses ctx.channel π
Oh wait wow I just noticed now
you could always make a pr to change it to isinstance
Hah I might just use that
I don't know if it will behave correctly when inside a Union even if you manage to get past the typeerror
Only one way to find out
oh right, its actually impossible given you're on 1.7.3 and not master
How so? I've just made a small test command it seem to be doing pretty fine. If I provide channels it'll convert them into channels, otherwise it'll falls back to ""
channels: Greedy[discord.TextChannel] = ""
(I know it's not a credible solution, I just wanted to clear π )
I mean that's the desired behavior. If I don't specify channels I want it to use ctx.channel
Oh, unfortunate. :/
GreedyType = type(Greedy)
class _Greedy2(GreedyType):
def __getitem__(self, params):
greedy = super().__getitem__(params)
return type("Greedy", (GreedyType,), dict(converter=greedy.converter))
Greedy2 = _Greedy2()
ChannelsList = Union[Greedy2[TextChannel], allowed_strings("*")]
π
Not working yet
But at least the cog loaded
You don't need to monkeypatch it?
Also, I would put allowed_strings first since it seems like the easier case to test for
At the moment it's not working, so I might ditch that in favor of an ordinary converter and just accept that I need to use the channels as the last argument
I just need to find how to convert a string to a TextChannel in that case
You can invoke TextChannelConverter.convert()
I'll probably do that then
@timid sentinel So I took a closer look at the Snakes Antidote rules and you were right - my game and that game really are similar, however, mine has nothing to do with snakes or antivenom. Let's see what others have to say about this.
sir-lancebot#823
In case someone else wants to take a look ^^
Also, just curious, do you know who created the .snake antidote game?
Hmm the converter is only taking one word instead of everything
You can use git blame to check
oh you actually can't
looks like it was moved there after being in another repo?
Ok, thanks
Oops.. that's not good.
Essentially, this is a unanimous decision that the discord.py project will be ending
For the foreseeable future, nothing?
All it means is that we won't get the newest features, and while unfortunate that's the situation we've been in for a long while, 2.0 has not been released for a long while and the feature support is a while behind.
As of April 2022 the commands as we know today won't work.
Here they will.
Is making our personal fork something we might consider at some point?
Well, we'll see
maybe some other new framework will become popular instead
It's something that could be considered, but I don't think we have the development bandwidth to facilitate that right now.
yeah
I would not be surprised if a new framework, or more realistically a well maintained fork emerges
guys, did u see
Hello.
I've written a gist regarding the future of discord.py. As you know, the only feature that discord.py does not implement is slash commands and this has been a contended topic for many. People have politely asked me what I plan on doing with the feature and when it's going to come. I've also been repeatedly heckled and harassed over it. However, this feature comes with significant "political" baggage and historical grievances to me personally. It's a long write-up but hopefully it'll explain my mental state and how we got to the point where we are today.
https://gist.github.com/Rapptz/4a2f62751b9600a31a0d3c78100287f1
ah yeah, didm't see that
The problem is that, even if a new fork emerges, the slash commands system won't be compatible with the whole discord.ext.commands
We weren't planning on adopting slash commands for a long while anyway, in terms of Python Discord at least this is not a critical problem, it's something to have a discussion about to decide the future path we take
Eventually, you have to.. I guess.
And there's no support for it, even if someone implements one, the bots will have to be rewritten to use slash commands
Maybe discord will make their own SDK
but who am I kidding
@patent pivot Have you read this?
If you want to apply for the message content intent, you cannot use it for command handling purposes
https://gist.github.com/Rapptz/4a2f62751b9600a31a0d3c78100287f1#whats-going-to-happen-to-my-bot
...yeah, what d0rs4n linked
ah right
We don't have to verify, we can just enable those intents without reason
I'm not sure how effective the 100 bot limit is.
The easiest way to circumvent it is to just make several bots, then make several accounts once you hit the limit.
although there is still a limit to that
it's a 90% solution
...it's going to stop 90% of attackers from thinking of making 10 bots instead of 1?
going by the number of bots that verify, yes, this is an effective gate
multiple bots doesn't solve it, it's pretty visible
unless you have some huge hosting capacity and name your bots differently (which then breaks the illusion of same bot) it's a pretty useless strategy
but off topic for here
Tldr discord is shit and doesn't listen to bot devs
unfortunate
Took me about 20 minutes, it was a nice story
Not like library devs are just a huge amount of small bot devs
... What?
What? Without library devs big bots wouldnt even exist lol
Yeah exactly
Ah
Yes
And Danny got left out in place of the big devs aka the bots that discord loves for some reason to inform then in advance
Btw could someone pin #discord-bots message
I don't think it needs pinning, people rarely look at the pins for that sort of information, it's better to just have the gist on hand, if we get question for a few days we could add a temporary tag
So message content is pretty useless now and you canβt just do something like if message.content.startswith whatever
...if you are on 100 or more servers and not verified
verified = showed a photo of your ID to Discord
What would happen if any of the bots went over 75 servers due to more contributors?
The bots would have to change some stuff up id presume
you can't invite any of our bots to other servers
OH WAIT, yeah, you create a new bot with a different token for contributing
Stupid question, my bad
yeah lol, testing in production isn't eπ§ic
We should also remember that while Danny's gist surely has some painful truths about his interactions with Discord staff, it's also completely one-sided. Discord have their justifications in the steps they take, and just because it's not the ideal command interactions Danny envisioned 6 years ago when Discord was a very different platform doesn't mean that Discord's plan is not good and won't allow for a rich custom functionality.
I just decided to not evaluate who's right because I'm sick of doing that for stuff
welp
We also should remember that there's some servers where staff are, I've seen danny interact with some of the staff members, and fully agree with the thoughts. It was not fully 1 sided, and actually danny left out some things with jake saying they'd add stuff, and never doing it about the audit log.
I'm not sure what you mean. The account of events is one sided by definition, it doesn't include the views of anyone else.
ah, I was reading replies from staff in that server
so it was not one sided in that case
what is python bots plan to support threads
honestly. just from the personal interactions ive had with discord staff. dannys statements ring painfully true. its hard to explain how infuriatingly obtuse and stubborn they are
we'll evaluate stuff once our team wakes up, we're at a time where most of our core devs are asleep
y'all on EU time 
arent u british, why are you up lol
a lot are europe, yeah
finishing some work
it's 5:19 here... tbh me and joe should both be sleeping now
theres going to be a lot of uncertainty in the pybot community around forks. a python discord fork could become the defacto standard. however obviously alot of owrk
yeah not something we'll likely consider. worst case scenario we could look at a fork for our own projects, but unlikely that we'd try make it a standard or accept feature reqs for other projects
we'll take it slowly and see what emerges in the coming weeks and months, we've got time
a wa
a qwa
review when there's actual changes pls lol
currently it's just a filename change iirc
yes triage king
ehhhhh I'm good
you don't want to be the triage king?
I'm fine with triage
Will the pydis bots have to transition from discord.py, since discord is migrating completely to slash commands, yeah?
triage what?
triage.
Discord isn't completely migrating to slash commands.
that's up to future conversations, since the announcement from discord.py did just come out. Also, I don't know if what you said is actually confirmed.
Hm, OK
Our bot will function just fine. It's present on 1 server, not on 100.
(I mean, they might, but I can't see into the future)
Lmao
Discord two years from now: the general api is dead, you must make all of your requests through the interaction api. An artificial intelligence on our backend will determine what information you receive from an interaction. You will send a response code which correlates to an action that we will make on our backend.
What's gonna happen with @stable mountain tho? You all gonna move to hikari or snekcord?
Nothing is going to happen for the foreseeable future
If u r talking about d.py, then it's not easy to maintain such a large library dude
We have a gud amount of people here who will contribute to it
Not really that bad for us all we'd need is to support passing the message intent. Our bots are only in a couple guilds so a lot of the major restrictions don't apply
could we possibly pin a message here saying that, so many are asking the same question ^
Yea
@severe tangle Did you open the pins before you asked?
Which pins?
here
Ah, no
I think the general consensus is that people don't really read pins
If u mean the channel pins, then nope. I didn't read those cz I didn't know that u pinned something regarding discord.py and @stable mountain , sorry
Until u don't tell people, no one read the pins (that's what I think)
We didn't pin anything
Ah
because
Hmm yea
I wish there were 'floating pins', which actually attract attention
like in Telegram
Hmm, idk about that (I don't use telegram)
The top pinned message is visible when you open the chat
Dang that's fun
yeah
too bad this open-source app has it and a multibillion dollar one doesn't π
Lmao
Maybe we could create a thread -- you see threads near the channel
let's move this to #community-meta
Cz the multi billion dollar company wants to focus on message intents and how to make people "like" slash commands
Sure
I personally looked at Hikari quite a while ago, but it wasn't something that clicked for me personally. Besides, the whole repository itself is very very complicated and probably not something I'd feel comfortable using
Ah, ok
We could theoretically take the API interaction part from some existing library and build something on top of it, or just export it as a separate package.
true
or do nothing right now and find a good trusted fork and use that in a week or so
that's what I'm doing for now, pretty much
I don't get some people's stress with it, let the dust settle
To be fair, I understand some stress with it, (that was the first thing I did) but meh, it'll work out even if I have to maintain the features of my own fork that I need to use.
I know one. It's literally discord.py
!pypi enhanced-dpy
The syntax is literally the same
That's pretty much just a personal fork
We aren't going to switch right now while things aren't properly settled down
After a bit we should see more distinct forks here and there, and we can discuss it
What bothers me the most is it delays threads and interactions even more, but what can we really do about it
Well, people use it (I have also used it and it's great) and it's more than just a personal fork now
!source
Oops, wrong channel. Sorry!
Oh yeah, right, but it's a continuation and personal take on discord.py
Hey @brisk brook I wanted some help.. Since discord.py is going down in a few months, so should I close the PR of the bots variable tag?
Or I should make it more general so as to target all the libs and General Python?
No I think we'll keep it, people are still gonna use it and it's already very general because we changed it to focus on attributes rather than "special bot variables".
discord.py is going down in a few months
?
Message Intents in April 2022
I know that's more than a few months, but we gotta be ready for it from before
we're a single-server bot, it'll have message intents
- There will be other forks of discord.py that implement slash commands
- our bots- what scragly said
Don't we still need to send that intent when connecting though?
Uhh I didn't say it in reference to the Python Bot...
yes, we will i believe
Yes just like Members Intent
no?
we just set the message intent to True
it's already an intent, just not privileged
there's a heap of options available to us over the coming weeks/months. it depends on how the ecosystem adjusts
Oh yea, I don't see us needing to migrate away for a while
we even have the option to moving to 2.0 if we really want those features now
there's always the possibility of another fork gaining heaps of traction and usurping as main release channel
Yea
Frankly i think the chances of there not being a maintained discord.py fork that implements new features well is next to none
lol yeah
discord.py isnt just gonna die, it's too massive
my future bot projects weren't gonna use dpy either so i'm not personally impacted
I've already switched some of my stuff over to corded so I'm good 
that's certainly one option ye, using your own
best of luck with that too
A switch too a new lib def isnβt feasible for me, it would have to be a drop in replacement fork
Hello, so I created a new issue on Github yesterday for a new game I want to add to @dusky shore and got 2 people to take a look and add comments. One of them said that my game is very similar to the existing .snake antidote game. I can agree at some level with this. So, I would like some more people, preferably those with the contributors role (I am certainly ok with non-contribs as well), to take a look and give their own opinion on this. Maybe also give some suggestions about how I can maybe change the game a little so it's not the same as the existing game? I would really appreciate it. Tysm!
sir-lancebot#823
Thanks for everyone's help with the Real Python searcher!
congrats!
bot#1786 what to do for this now?
Hey, may I ask what's the status of the api migration to fastapi?
I would love to push a draft PR for the models, so that it can be started working on! π
CC @hardy gorge
Would a youtube command be possible for Sir Lancebot?
What for? Searching YouTube?
Yeah, just gets the video for the name
I think there was a PR on it a while back but it looks like it's idling
If you can use Discord, then how's it different from searching a video and sending a link? It has a native support in Discord. π (I mean an embed for playing the video)
Native support for embeds? I mean, there are commands like stackoverflow and realpython, because it's just easier to not leave Discord than open a browser, open a tab, etc
Native support as in:
https://youtu.be/ZH26PuX3re0
What is Python Discord?
We're a large Discord community focused around the Python programming language. We believe anyone can learn to code, and are very dedicated to helping novice developers take their first steps into the world of programming. We also attract a lot of expert developers who are seeking friendships, collaborators, and who wish...
I don't think we should make a search command for everything, we already have a lot of them. Searching directly on YouTube will have a much better UI and allow you to see the thumbnail. Besides SO and RealPython are both programming and/or python related, while YouTube is not.
Yes there were, but no one has really commented since the last time I saw that PR. So yea tbh I am really confused what to do rn. Any help?
They likely haven't commented since that PR is closed now. I suggest you action the comments from that pr in this one, then wait for further comments
re: bot#1779
I feel like being a pre-commit hook would be a lot better than on the ci
as an advantage, it would automatically be added to the ci by virtue of being a pre-commit hook
@brisk brook I just realised I never pushed the aiodns commit, which might have been why you were asking those questions
It's used here, but the dep got mixed in with the first PR by accident
Hmm, I see now hahaha
@vale ibex
Update thread bot to use the latest discord.py version from git, since we don't need to worry about pinning this.
you can pin to an archive of a commit with github.....
pretty much a moot point though since the repo is archived lol
not like it's going to be getting new commits
nah I know
but for future reference
you could have pinned to a commit this whole time π
yea true, I just find it easier to read when you use the poetry git feature
rather than a long url
https://github.com/python-discord/thread-bot/archive/54fa5d26050e3e03aa4234b84a76048b4183720a.zip
i mean, yeah ofc
this is also fairly recent in my head since I just spent the last 5 days writing a regex and dpy converter for getting a reference from a repo
lol sounds fun

