#dev-contrib

1 messages Β· Page 128 of 1

celest charm
#

FastAPI has a dependency system which allows to do that in a static way

#

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.

brisk brook
tough imp
#

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?

dim pelican
#

I'm back. I have the GitHub Desktop app open as well

tough imp
#

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

celest charm
#

I think Bluenix is arguing that it isn't a bad practice

tough imp
#

that is ok

brisk brook
tough imp
#

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

brisk brook
# tough imp anyway, what I'm trying to say primarily is that when writing tags aimed at begi...

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.

brisk brook
celest charm
#

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.

dim pelican
#

@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?

brisk brook
trim cradle
#

@vocal wolf a wa

brisk brook
vocal wolf
trim cradle
#

A qwa

trim cradle
#

Also should we squash the commits

celest charm
#

It's less explicit, and you lose editor support.

vocal wolf
trim cradle
#

I'm officially a computational linguist now.
C o m p u t a t i o n a l

vocal wolf
#

well you know how words work better than I do

celest charm
#

alright, let's just stop arguing

#

this is not going anywhere

brisk brook
celest charm
#

Hey, I'm not even a core developer, I don't bear responsibility for tag-induced damage lemon_pleased

trim cradle
#

My instinct was to say "No, let's argue more!", But I don't even know the context

celest charm
#
  1. you
  2. are
  3. wrong
  4. q e d
trim cradle
celest charm
#

Yes.

vocal wolf
#

@trim cradle waits faster

tough imp
#

the context is just me saying "just put it in module namespace" which retrospectively seems to be everything I even say anymore

stable mountainBOT
#

you guys should stop spamming or I'll ban you both

trim cradle
#

fineee

vocal wolf
celest charm
vocal wolf
#

but if you aren't, I have it on auto squash merge

trim cradle
vocal wolf
trim cradle
#

Auto squash merge

vocal wolf
#

ye

#

it's in the little drop down next to auto merge

timid sentinel
#

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

dim pelican
brisk brook
#

What's going wrong?

tawdry vapor
#

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

celest charm
#

I don't think I'd ever speak the words "a global variable is better" but yeah...

timid sentinel
#

lol

fallen patrol
#

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

dim pelican
#

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)

fallen patrol
brisk brook
timid sentinel
dim pelican
#

Yay I broke something real good

tawdry vapor
#

No because a reload of an extension just reloads the whole module (file)

brisk brook
fallen patrol
timid sentinel
#

Ah I didn't realise that

fallen patrol
#

yeah, even if the extension is reloaded, I want those to stay since they're resource intensive to collect and require multiple database calls

brisk brook
#

@dim pelican which of those commits added that line, the one you have selected?

celest charm
#

If your bot has some lifetime logic like cleaning up, you should probably create a proper class to manage that (like in @stable mountain)

trim cradle
#

@vocal wolf I have completed my review

molten perch
#

Hey! Any news about sir-lancebot#778 ? It's blocking two of my issues :/

dusky shoreBOT
vocal wolf
vale ibex
trim cradle
#

I want a green ribbon.

vale ibex
#

so you might need to wait a little while πŸ™‚

molten perch
vale ibex
#

Feel free to review it if you see anything that needs changed

#

but from the first glance, there's currently only 1 thing outstanding

molten perch
#

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 πŸ˜„

brisk brook
dim pelican
#

I think that's enough for me today...losing my mind

#

Also got drafted for now πŸ₯²

vale ibex
#

Just a precaution to make sure it doesn't get merged before we have written confirmation

fallen patrol
#

since I brought this up previously iirc and was told something like don't add people you don't trust

patent pivot
#

no, nothing happened

#

yes, people are trusted, we just decided to implement it

#

it's primarily staff in there

fallen patrol
#

well, ok

patent pivot
#

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.

celest charm
#

one fuckup later...

patent pivot
#

lol

#

we don't have fuckups we have happy little zero-days

fallen patrol
#

I mean, yeah, I get it. Just feels like it happens a lot (it probably doesn't and I'm overthinking everything)

patent pivot
#

like what happens?

fallen patrol
patent pivot
#

i'm still not sure which bit you are referencing, if it's to staff revisiting things then yeah we do revise

fallen patrol
#

I know you may have proposed it at some point, I mean we do change our feelings on things,

fallen patrol
patent pivot
#

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

fallen patrol
#

aha

patent pivot
#

Β―_(ツ)_/Β―

fallen patrol
#

I can't even find where I said it initially so

#

probably a channel that has since served its purpose I guess? idk

tawdry vapor
#

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

viscid coral
#

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

viscid coral
#

O wait

#

bot#113 - meta#113

viscid coral
#

Which was opened 24 days ago...

gritty wind
#

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

brisk brook
#

Lol it appears we have had an issue for bot-var

severe tangle
#

Purely coincidental PepeGiggleHehe

viscid coral
#

I need help setting up config.yml file

#

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?

vale ibex
#

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 trashcan it can be βš”οΈ for all the bot cares

#

as long as it's in the config

timid sentinel
#

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

viscid coral
#

Oh yeah it can raise Not Found

timid sentinel
#

you can usually get away with not filling in that much tbh

viscid coral
#

Yeah that other ones will just look like !yert

#

guilds.categories, what is moderators category name? Just STAFF?

clever wraith
stable mountainBOT
#

bot/exts/utils/snekbox.py line 30

re.DOTALL | re.IGNORECASE               # "." also matches newlines, case insensitive```
viscid coral
#

Shouldn't the template be changed of the server?

vale ibex
stable mountainBOT
#

@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
clever wraith
#

Oh wow, never knew this is also possible. Thanks πŸ˜„

vale ibex
#

πŸ‘

viscid coral
vale ibex
#

We have a template on the contributing docs I believe

#

It's what we used for our test server

viscid coral
#

I used the template

vale ibex
#

Is it?

#

what's missing?

viscid coral
#

There are categories or channels not there

vale ibex
#

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

viscid coral
#

Oh wait

vale ibex
#

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.

viscid coral
#

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

vale ibex
#

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

viscid coral
#

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

vale ibex
#

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.

viscid coral
#

Why not create a template from this server?

vale ibex
#

see my above messages

#

we didn't want a test server with 200+ channels

vale ibex
#

or whatever channel you want them to be pushed to

viscid coral
#

Oh ok

vale ibex
#

not much more to say πŸ˜…

#

It's an old thread talking about the nomination process

severe tangle
#

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)

vocal wolf
#

TLDR; You must fork again.

severe tangle
#

Yup, and I will have to make another PR (for those changes) or what?

vocal wolf
#

Another PR will have to be created.

severe tangle
#

Ah

vocal wolf
#

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

severe tangle
#

Ah, sure. Can i name it as Continued PR of #old-pr?

vocal wolf
#

yes

#

link my comment as well for more context

severe tangle
#

Which one? Sorry for being a bother πŸ˜…

severe tangle
#

Ah cool. Thanks for the help!

vocal wolf
severe tangle
#

Which one Thonk

vocal wolf
severe tangle
#

Ah

vocal wolf
#

because I forgot tag PRs only need 1 approval, not 2

#

by a core dev

severe tangle
#

Ah so Bluenix isn't a core dev?

vocal wolf
#

Sorry, I mean staff

severe tangle
#

Oh

#

Ok

#

So Bluenix isn't considered a staff or something?

vocal wolf
#

no they're staff

static canyon
#

Bluenix is staff, but not a core-dev

vocal wolf
#

just not a core dev

severe tangle
#

Ah

static canyon
#

Staff = helpers, mods, admins, owners

severe tangle
#

Thanks for the information. I'mma make a new PR as soon as I get free!

vocal wolf
#

veri nais

severe tangle
#

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? 7408_shrekstare

timid sentinel
stable mountainBOT
#

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```
viscid coral
#

Or why not just do replace right away?

gritty wind
#

It's there to protect against escape attempts

static canyon
#

I guess protection in case someone figured out how to make it not in a codeblock?

gritty wind
#

Of which we've had a few

static canyon
#

Yeah

severe tangle
#

Wait, it's possible to make an eval result show without the codeblock?

timid sentinel
#

shouldn't allowed mentions mean it would be impossible to ping somebody even if the codeblock was escaped though?

gritty wind
#

Yeah, but it's annoying to figure out

severe tangle
#

Lmao

#

No please

#

First one is better

gritty wind
#

This has been here for over two years

vocal wolf
#

@gritty wind k I merged that site PR I hope I didn't break production

vocal wolf
gritty wind
#

Did allowed mentions even exist back then

timid sentinel
gritty wind
#

It's probably redundant now, but there is no harm in keeping it

#

Especially since allowed mentions can break if discord fucks up

vale ibex
#

Allowed mentions was only added in like 1.4/1.5

gritty wind
#

Found the commit where it was added

#

All the way back in 2018

vale ibex
#

yea, just looked it was added in 1.4

#

which released Aug 2020

brisk brook
#

Holy shit really?

#

Time flies

green oriole
#

lol that isn't the lounge

vale ibex
#

lol

viscid coral
#

In config.yml, what are webhooks for? I mean why is it a number and not a link? What should I put instead?

vale ibex
#

It's the ID of the webhook, the bot has webhook perms, so it can get the webhook secret directly

viscid coral
#

Can I get it myself?

vale ibex
#

Yea, if you make a webhook, copy the URL you can get the ID

viscid coral
#

Ohh ok, thank you!

dim pelican
#

Is it helpful for people without approval rights to review PRs?

patent pivot
#

absolutely it is yeah

viscid coral
#

Not as much as ones with permission

patent pivot
#

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

viscid coral
#

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

patent pivot
#

still matters β€” when we see a good review from a non-core member it means we can accelerate our review a bit

thorny obsidian
#

Also, for someone consistently doing great reviews we'll definitely consider them for the contributor role and someone with the contributor role counte iirc

viscid coral
#

Oh contributor role counts? I thought it is only staff or project leads

vale ibex
#

contributors count as staff as far as policy bot is concerned

brazen charm
#

And reviewing is probably the best way to familiarise yourself with the codebase

dim pelican
#

Sweet, thanks for the quick feedback!

viscid coral
#

If I have errors with starting @stable mountain bot my own, where can I ask about them?

vale ibex
#

here πŸ˜„

#

Paste the error and we can try to help

viscid coral
#

!paste

stable mountainBOT
#

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.

viscid coral
#

Thanks

vale ibex
#

Have you got docker desktop running?

viscid coral
#

Right now? No

vale ibex
#

you need it running to use docker compose

viscid coral
#

I think it's running on background tho

vale ibex
#

Do you have this icon on your task bar?

viscid coral
#

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

vale ibex
#

The error is saying that docker-compose can't connect to the docker agent

#

this is before touching anything in the bot

viscid coral
#

I know that snekbox worked for me

vale ibex
#

If you open docker desktop what shows up under the container/apps section?

short snow
#

try docker run hello-world

viscid coral
short snow
#

if that works, there is some problem in docker compsoe installation

vale ibex
#

Yea, looks like the engine wasn't actually running

vale ibex
#

try quitting and restarting it, if it isn't starting

short snow
#

hmm i can see, docker.errors.DockerException: Error while fetching server API version: (2, 'CreateFile', 'The system cannot find the file specified.')

viscid coral
#

It's like that a few inutes, Benefit of laptop programming

vale ibex
#

or run wsl --shutdown

#

then wsl

#

to restart it

viscid coral
#

Me?

vale ibex
vale ibex
thorny obsidian
vale ibex
#

everything in linux is a file kek

viscid coral
vale ibex
#

then retry docker-compose

short snow
#

I always got a connection aborted, sorrry ^^

viscid coral
vale ibex
#

yea, give it a go

viscid coral
vale ibex
#

cool

#

might take a bit for the first time

#

since it isn't cached

viscid coral
#

And everytime I want to start it I should do the same command and it'll be faster?

vale ibex
#

yea

viscid coral
vale ibex
#

hah, impressive they even have docker installed on there

viscid coral
#

I mean I installed it

#

I wonder how it can actually take so many files and programs

vale ibex
#

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

viscid coral
#

I got another error lol

vale ibex
#

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

viscid coral
#
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"```
vale ibex
viscid coral
#

Oh I copy pasted it from mine

#

snekbox_eval_api is what running on my docker

vale ibex
#

ah alright

viscid coral
#

But site_paste I didn't change

vale ibex
#

the bot docker-comopse starts up snekbox for you, no need to run it seperatly

viscid coral
#

Nah I actually use it for my bot as well

#

I added the reddit part, should I retry?

vale ibex
#

did you add, or replace?

brazen charm
#

probably best to disable the snekbox in the bot's compose then

viscid coral
vale ibex
#

you should remove the part that's already there then, since there's already a section for redis

viscid coral
#

Oh yeah under bot

#

and redis

vale ibex
#

Yea, that's the right place

#

so you should update those values

viscid coral
#

Yeah updated, so I should disable the snekbox in the bot' compose like Numerlor said?

#

Because I have no idea how πŸ™‚

gritty wind
#

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

viscid coral
#

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?
brazen charm
#

You can use an ignore profile in the override; I use this to disable the bot

services:
  bot:
    profiles:
      - ignore
viscid coral
#

Do I need to run some Redis server or someting?

cold island
brazen charm
viscid coral
#

You sure?

#

I didn't setup any redis stuff

cold island
#

You don't need to, that's the magic of docker

viscid coral
#

So what should I do

cold island
#

Are you trying to start the bot?

viscid coral
#

Yeah

cold island
#

And you entered docker-compose up?

viscid coral
#

docker-compose up --no-deps bot

cold island
#

Why --no-deps?

viscid coral
#

Because I don't think I set up the site

cold island
#

It sets up the site for you

brazen charm
#

docker does that for you

#

the bot won't work without the site

viscid coral
#

Oh so what should I type than?

cold island
#

Just without that flag

viscid coral
#

docker-compose up bot?

cold island
#

yes

viscid coral
#

Ok

cold island
#

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

viscid coral
#

Oh so me stupid lol

#

I hope it would work

#

Errors are being spammed

cold island
#

What are the errors?

viscid coral
#

Again could not connect to Redis, but than it loaded the cogs

#

There is another error but I know how to handle, privileged intents

cold island
#

Intents should be handled in the code already

viscid coral
#

Yeah not it is ok I know I forgot to enable intemt via developers portal

cold island
#

ah

viscid coral
#

But the error still spammed

cold island
#

Ok, what is the specific error you get with redis

viscid coral
#

Now it spams like a million times the redis error, discord.Forbidden error and cogs loaded

stable mountainBOT
#

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:

https://paste.pythondiscord.com

viscid coral
#

Yeah I'll use paste

#

I didn't update all webhooks, just one

#

But I think it should raise naother error

#

But the bot is running

gritty wind
#

What’s the output of this:

docker container ls

viscid coral
#
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>```
vale ibex
#

I'm gonna guess the channel ids are mis-configured?

gritty wind
#

As for the webhook urls, can you set all the other ones as well? You can use the same ID for all of them

viscid coral
vale ibex
#

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

viscid coral
#

No I meant some channels names that are in config are not the ones in the server

gritty wind
#

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

viscid coral
#

My dog peed in my yard, be back in a few minutes(or seconds)

gritty wind
#

Not a pet owner, but isn't that were you'd expect that to happen? What action needs doing πŸ€”

brisk brook
#

Can't have shit in Detroit

gritty wind
#

Umm, how do you clean a liquid in a yard

vale ibex
gritty wind
#

I've always known you to be wise

#

Anyways

viscid coral
#

Paper towel and wipe

viscid coral
gritty wind
#

Yeah

#

Use your best judgement when it comes to setting the channel IDs. You can combine a large majority of channels

viscid coral
#

Yeah but I have no idea what thos channels for

#

duck_pond?

#

I'll just make them all same channel and same webhook

gritty wind
#

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

viscid coral
#

Yap ok

#

Thank you! When I finish I try again, if it works, or don't(sad) I'll let you know!

austere hornet
#

Hi, I would like to contribute to @dusky shore but I have a few questions.

  1. 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?
  2. 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?
  3. 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!
viscid coral
vale ibex
#
  1. Yes, that's info on how to get sirlance bot running on your machine
  2. 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
  3. You create a new cog and define a setup function to load it
vale ibex
#

if not, open docker desktop and click on the thing you want to stop, then the stop button

viscid coral
#

Oh yeah I pressed stop but the response was delayed

thorny obsidian
#

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

austere hornet
#

@vale ibex Where do I create a cog?

vale ibex
#

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

vale ibex
#

The magic_8ball cog is a fairly simplistic one

#

might be a good place to look

austere hornet
vale ibex
#

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

austere hornet
vale ibex
#

πŸ‘

austere hornet
#

So on line 18 here, is that how you would set the command for the game?

vale ibex
#

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

dusky shoreBOT
#
I can't believe you've done this

Your input was invalid: question is a required argument that is missing.

Usage:.8ball <question>

vale ibex
#

just like a non-cog command

austere hornet
viscid coral
#

ooo why was #dev-voice opened?

vale ibex
#

Which symbol did you try to get?

austere hornet
viscid coral
#

str.format and discord.ext.commands.Bot

vale ibex
#

If you do !docs it will list all the symbols you have

austere hornet
#

And it was since left open

viscid coral
vale ibex
viscid coral
#

How?

vale ibex
#

for python its !docs setdoc python https://docs.python.org/3.10/ https://docs.python.org/3.10/objects.inv

viscid coral
#

Is that how @stable mountain does it every time it restarts?

vale ibex
#

they're stored in redis site db

brazen charm
#

they're saved in the site db

viscid coral
#

Oh so I need to do it once?

#

!docs

stable mountainBOT
viscid coral
#

If I want all of that?

brazen charm
#

yes, for every inventory

#

or ask joe for a sql dump

vale ibex
gritty wind
#

If you're developing for the bot, you really don't need all of them

#

or any of them really

vale ibex
#

I think they're working on a docs feature,

gritty wind
#

Is there a library for message/user commands yet btw?

vale ibex
#

so they'll need some at least

brazen charm
#

having a few can be useful from my experience (but depends on what's being developed), although definitely don't need all of them

viscid coral
#

At the moment I am not working on anything really, I just need it first for testing, and than I'll start on working

vale ibex
#

!docs setdoc <Package> <Base URL> <Inventory URL>

brazen charm
#

I have the inventories downloaded locally to not download them on every restart

viscid coral
vale ibex
#

see my csv above

austere hornet
#

@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?

vale ibex
#

yup

#

changing references to 8ball to whatever you call it

austere hornet
#

Yes ofc

vale ibex
#

Again, I'd recommend raising an issue first so it can be discussed

#

it being the command you want to add

austere hornet
viscid coral
#

Now I am really interested, how does the docs command work? It downloads a file?

vale ibex
#

it downloads and decodes the objects.inv file

#

which is a Sphinx file

#

(I might have mispelled that) I did, updated it

#

!src docs

stable mountainBOT
#
Command: docs

Look up documentation for Python symbols.

Source Code
vale ibex
#

see that for the source

viscid coral
#

How does it decode, this weird text

brazen charm
#

it's gzipped

viscid coral
vale ibex
#

There's quite a lot to it πŸ˜„

#

Numerlor knows it best, since he wrote it πŸ˜„

viscid coral
#

ooo how did you do that

vale ibex
#

that _cog file is mostly just the commands side of it

#

most of the decoding logic is in the other files in that dir

viscid coral
#

Oh and btw, thank you all so so so much for helping me start my bot, couldn't do it without you <3!!!!!!

viscid coral
brazen charm
#

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

viscid coral
#

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

brazen charm
#

you'll want snekbox:8060 if it's all within docker

viscid coral
#
    # Snekbox
    snekbox_eval_api: "http://localhost:8060/eval"```
This is what I currently have
#

So just snekbox:8060?

brazen charm
#

no the scheme and eval should stay

#

replace the localhost with snekbox

viscid coral
#

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

cold island
#

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

viscid coral
#

I am hosting a website as well?

cold island
#

The website is coupled with the API at the moment, so yes

cold island
#

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

clever wraith
stable mountainBOT
#

bot/exts/utils/snekbox.py line 8

from signal import Signals```
vale ibex
#

its used to parse the return code after snekbox responsds to the bot

stable mountainBOT
#

bot/exts/utils/snekbox.py line 123

name = Signals(returncode - 128).name```
vale ibex
#

It's a built-in, not a pypi package

clever wraith
#

Oh means this returns the name for the return code python returns..

vale ibex
#

yea

clever wraith
#

Thanks πŸ˜„

celest charm
#

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
  1. Can someone replicate this?
  2. 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?
#

this just replicated that in the docker playground

#

So my question is: why do we disable creating the venv?

severe tangle
#

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

dusky shoreBOT
tawdry vapor
celest charm
#

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?..

clever wraith
#

hey quick question regarding quackstack

#

are seeds implemented yet

tawdry vapor
#

certifi is installed right?

celest charm
# tawdry vapor 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.

clever wraith
tawdry vapor
celest charm
#

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

tawdry vapor
#

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.

celest charm
#

alternatively we could just hope that poetry never does that, and move those dev-dependencies to main dependencies if it becomes anissue

cold island
celest charm
#

wdym?

cold island
#

If poetry needs it and Python needs poetry then it just seems like a main dependency

celest charm
#

sounds like a hack, but I guess build speed/image size is more important here than occasionally failing the build

tawdry vapor
#

Not necessarily

#

I'm just saying that would be ideal.

cold island
#

Well occasionally seems like an overstatement, poetry will rarely change its dependencies this drastically

brazen charm
#

can poetry write a requirements.txt along with the lock file?

celest charm
#

yeah, poetry export -f requirements.txt

brazen charm
#

Is there any downside in installing from a requirements.txt through pip instead of poetry if only the main deps are written?

celest charm
#

πŸ€”

#

can't think of any

brazen charm
#

I guess it won't check the hashes

tawdry vapor
#

It includes hashes in the requirements.txt

celest charm
#

yeah

tawdry vapor
#

I guess that means pip can check them?

celest charm
brazen charm
#

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

celest charm
#
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?

brazen charm
#

maybe a task for the locking so it's done in one step, but I'm not completely sure if it's all equivalent

tawdry vapor
#

We have the same situation in CI

#

Except with the added complexity of trying to cache all the packages

molten perch
fallen patrol
#

it does not require them

molten perch
#

Yeah, I've just tested it out.

fallen patrol
#

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

molten perch
#

I believe it would enough to just modify the Dockerfile. But that's just my opinion πŸ˜„

fallen patrol
molten perch
#

I think dpy uses aiohttp as their only dependency.

vale ibex
#

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

molten perch
#

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? πŸ™‚

fallen patrol
#

huh, it used to

#

weird

brazen charm
molten perch
#

Oh, I see. Sorry :/

brazen charm
#

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

molten perch
#

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)

vale ibex
fallen patrol
#

using the requirements.txt would also result in possibly funky behaviour as poetry always installs the package locally

vale ibex
#

I don't think any of these needed requests

fallen patrol
#

syncwebhook

molten perch
stable mountainBOT
#

discord/webhook/sync.py lines 66 to 69

try:
    from requests import Session, Response
except ModuleNotFoundError:
    pass```
vale ibex
#

That's far before I ever used it πŸ˜›

fallen patrol
#

looks like it has to be installed seperately to use sync webhook but

brazen charm
brisk brook
fallen patrol
#

but yeah, dpy doesn't actually install requests, apparently

fallen patrol
molten perch
fallen patrol
#

it already doesn't

molten perch
fallen patrol
#

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

fallen patrol
molten perch
#

Yes, I thought it doesn't require poetry to be installed.

stable mountainBOT
#

pyproject.toml lines 17 to 19

[tool.poetry.dependencies]
python = "^3.6"
poetry = "^1.2.0a1"```
molten perch
#

Then, set virtualenvs.create to false should solve the problem.

fallen patrol
#

it... already is

cold island
#

( @static canyon the PR is failing tests )

static canyon
#

Yeah, will fix when I'm on my laptop

#

Probably a few hours

fallen patrol
dim pelican
fallen patrol
#

yes

dim pelican
#

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

dim pelican
#

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!

fallen patrol
#

hm

#

that guide is actually slightly wrong

#

If applied, this commit your subject line here

#

present tense

dim pelican
dim pelican
# fallen patrol present tense

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"

fallen patrol
#

true

austere hornet
#

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!

dusky shoreBOT
patent pivot
#

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

static canyon
#

Hopefully bot#1787 passes this time

dusky shoreBOT
static canyon
#

Seems to have

grim spindle
#

Hello

austere hornet
#

Hi @timid sentinel (sorry for the ping). I received your comment. Are you referencing sir-lancebot#821?

dusky shoreBOT
cold island
static canyon
timid sentinel
#

.help snake antidote

dusky shoreBOT
#
Command Help

.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.*

timid sentinel
#

@austere hornet Was referring to that this

#

Haven't looked through the proposal too closely though, let me know if I'm misunderstanding

cold island
#

Like I can write a converter, but it would force the channels arg to be the last one

tawdry vapor
#

Really? It doesn't work with Union?

#

Greedy technically is a converter

#

And other converters do work in Union.'

cold island
#

Greedy[...] creates a class instance

#

As opposed to a type

#

so Union is complaining

tawdry vapor
#

What do you mean by complaining?

cold island
#

Throwing an error

tawdry vapor
#

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

cold island
#

It crossed my mind, but I would need to dig in dpy and understand how it processes this kind of object

tawdry vapor
#

Try returning a function. That doesn't seem complicated.

cold island
#

What does the function do?

fallen patrol
cold island
#

Try to use the greedy converter, and if it fails check for the string literal, and if that fails too raise BadArgument?

fallen patrol
tawdry vapor
#

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.

cold island
fallen patrol
#

ah jeez, that's so complex in there

green oriole
#

Looks like you'd want a custom converter, I think

tawdry vapor
#

I guess if it's explicitly doing if isinstance(thing, Greedy): ... then wrapping it in a function won't work anyway

cold island
#

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

green oriole
#

Or what about just gathering a Greedy[str] and parsing it ourselves? Seems less convoluted than using some converter madness

cold island
#

Greedy[str] is pretty meaningless

#

I can just do *args

tawdry vapor
#

Everything starts off as a string so it would just consume everything

molten perch
# cold island I can just do *args

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.

cold island
#

Yeah problem is I don't want to allow multiple strings

#

I want either a series of channel ID's or a single string

tawdry vapor
#

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))

fallen patrol
cold island
#

This is where dpy handles the Greedy object

tawdry vapor
#

Actually that may need to account for converter being an instance method but maybe the core idea can work

molten perch
tawdry vapor
#

wow fuck that it uses is

cold island
cold island
fallen patrol
tawdry vapor
#

That takes too long

#

It could be monkeypatched

tawdry vapor
#

I don't know if it will behave correctly when inside a Union even if you manage to get past the typeerror

cold island
#

Only one way to find out

fallen patrol
molten perch
cold island
molten perch
#

Oh, unfortunate. :/

cold island
#

Not working yet

#

But at least the cog loaded

tawdry vapor
#

You don't need to monkeypatch it?

#

Also, I would put allowed_strings first since it seems like the easier case to test for

cold island
#

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

tawdry vapor
#

You can invoke TextChannelConverter.convert()

cold island
#

I'll probably do that then

austere hornet
#

@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

dusky shoreBOT
austere hornet
#

In case someone else wants to take a look ^^

#

Also, just curious, do you know who created the .snake antidote game?

cold island
#

Hmm the converter is only taking one word instead of everything

cold island
#

oh you actually can't

#

looks like it was moved there after being in another repo?

molten perch
#

Oops.. that's not good.
Essentially, this is a unanimous decision that the discord.py project will be ending

slow steppe
#

Yeah...

#

This is very bad. What do you guys plan on doing about it?

patent pivot
#

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.

molten perch
#

As of April 2022 the commands as we know today won't work.

patent pivot
#

Here they will.

celest charm
#

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

patent pivot
#

It's something that could be considered, but I don't think we have the development bandwidth to facilitate that right now.

celest charm
#

yeah

patent pivot
#

I would not be surprised if a new framework, or more realistically a well maintained fork emerges

short snow
#

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

celest charm
#

we're in the middle of discussing it right now πŸ™‚

#

that is a moderately sized oof

short snow
#

ah yeah, didm't see that

molten perch
#

The problem is that, even if a new fork emerges, the slash commands system won't be compatible with the whole discord.ext.commands

patent pivot
#

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

molten perch
#

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

celest charm
#

Maybe discord will make their own SDK

#

but who am I kidding

#

...yeah, what d0rs4n linked

patent pivot
#

This will not affect us.

#

We are under 75 servers

celest charm
#

ah right

patent pivot
#

We don't have to verify, we can just enable those intents without reason

vocal wolf
#

this gist is so long

#

I'm gonna read this entire thing

celest charm
#

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

patent pivot
#

it's a 90% solution

celest charm
#

...it's going to stop 90% of attackers from thinking of making 10 bots instead of 1?

patent pivot
#

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

celest charm
#

alright, I'm not going to argue about that

#

discord can do whatever they please

fallen patrol
vocal wolf
fallen patrol
#

Sorry, library devs.

#

They listen to big bot devs πŸ™ƒ

brisk brook
brisk brook
fallen patrol
#

... What?

slow steppe
brisk brook
#

Yeah exactly

fallen patrol
#

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

patent pivot
#

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

trail pilot
celest charm
#

verified = showed a photo of your ID to Discord

trail pilot
#

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

celest charm
#

you can't invite any of our bots to other servers

trail pilot
#

OH WAIT, yeah, you create a new bot with a different token for contributing

#

Stupid question, my bad

celest charm
#

yeah lol, testing in production isn't eπŸ‡§ic

cold island
#

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.

celest charm
#

I just decided to not evaluate who's right because I'm sick of doing that for stuff

shut aspen
#

welp

fallen patrol
cold island
#

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.

fallen patrol
#

ah, I was reading replies from staff in that server

#

so it was not one sided in that case

shut aspen
#

what is python bots plan to support threads

shut aspen
patent pivot
shut aspen
#

arent u british, why are you up lol

patent pivot
#

a lot are europe, yeah

patent pivot
celest charm
#

it's 5:19 here... tbh me and joe should both be sleeping now

shut aspen
#

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

patent pivot
#

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

trim cradle
#

@vocal wolf I see you

#

a wa a qwa

vocal wolf
#

a wa

trim cradle
#

a qwa

vocal wolf
#

review when there's actual changes pls lol

#

currently it's just a filename change iirc

trim cradle
#

yes triage king

vocal wolf
#

ehhhhh I'm good

trim cradle
#

you don't want to be the triage king?

vocal wolf
#

I'm fine with triage

wide elm
#

Will the pydis bots have to transition from discord.py, since discord is migrating completely to slash commands, yeah?

trim cradle
#

triage what?

vocal wolf
#

triage.

trim cradle
#

they are?!

#

you can't just be triage.

celest charm
vocal wolf
celest charm
#

Our bot will function just fine. It's present on 1 server, not on 100.

wide elm
#

My bad then

#

Lol

celest charm
wide elm
#

Lmao

fallen patrol
# celest charm (I mean, they might, but I can't see into the future)

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.

severe tangle
#

What's gonna happen with @stable mountain tho? You all gonna move to hikari or snekcord?

tawdry vapor
#

Nothing is going to happen for the foreseeable future

severe tangle
#

Ah, well at least u all got till April 2022

#

After that, message intents and stuff

pulsar gorge
#

Just make a fork lol

#

and maintain it

severe tangle
pulsar gorge
#

We have a gud amount of people here who will contribute to it

tawdry vapor
#

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

short snow
#

could we possibly pin a message here saying that, so many are asking the same question ^

severe tangle
#

Yea

celest charm
#

@severe tangle Did you open the pins before you asked?

celest charm
#

here

severe tangle
#

Ah, no

celest charm
#

I think the general consensus is that people don't really read pins

severe tangle
#

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)

celest charm
#

We didn't pin anything

severe tangle
#

Ah

severe tangle
#

Hmm yea

celest charm
#

I wish there were 'floating pins', which actually attract attention

#

like in Telegram

severe tangle
#

Hmm, idk about that (I don't use telegram)

celest charm
severe tangle
#

Dang that's fun

celest charm
#

yeah

#

too bad this open-source app has it and a multibillion dollar one doesn't πŸ˜„

severe tangle
#

Lmao

celest charm
#

Maybe we could create a thread -- you see threads near the channel

severe tangle
#

Cz the multi billion dollar company wants to focus on message intents and how to make people "like" slash commands

severe tangle
brisk brook
celest charm
#

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.

fallen patrol
#

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

brisk brook
#

I don't get some people's stress with it, let the dust settle

fallen patrol
#

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.

severe tangle
#

!pypi enhanced-dpy

stable mountainBOT
severe tangle
#

The syntax is literally the same

brisk brook
green oriole
#

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

severe tangle
#

!source

stable mountainBOT
severe tangle
#

Oops, wrong channel. Sorry!

brisk brook
severe tangle
#

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?

brisk brook
#

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".

severe tangle
#

Ah

#

Ok, thanks!

severe tangle
#

I know that's more than a few months, but we gotta be ready for it from before

glass pecan
#

we're a single-server bot, it'll have message intents

fervent sage
#
  1. There will be other forks of discord.py that implement slash commands
  2. our bots- what scragly said
vale ibex
#

Don't we still need to send that intent when connecting though?

severe tangle
#

Uhh I didn't say it in reference to the Python Bot...

vale ibex
#

So IG we'll need to monkey patch d.py?

fervent sage
#

yes, we will i believe

severe tangle
fervent sage
#

we just set the message intent to True

vale ibex
#

Ah, I didn't realise it was something already part of d.py

fervent sage
#

it's already an intent, just not privileged

glass pecan
vale ibex
#

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

glass pecan
#

there's always the possibility of another fork gaining heaps of traction and usurping as main release channel

vale ibex
#

Yea

glass pecan
#

i'm using 2.0 for another bot atm

#

it's fine

fervent sage
#

Frankly i think the chances of there not being a maintained discord.py fork that implements new features well is next to none

glass pecan
#

lol yeah

fervent sage
glass pecan
#

my future bot projects weren't gonna use dpy either so i'm not personally impacted

fervent sage
#

I've already switched some of my stuff over to corded so I'm good KEKW

glass pecan
#

best of luck with that too

shut aspen
#

A switch too a new lib def isn’t feasible for me, it would have to be a drop in replacement fork

austere hornet
#

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

dusky shoreBOT
dim pelican
#

Thanks for everyone's help with the Real Python searcher!

short snow
#

congrats!

severe tangle
#

bot#1786 what to do for this now?

dusky shoreBOT
vale ibex
#

Weren't there some requested changes on the last PR?

#

I guess you can do those?

molten perch
#

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! πŸ™‚

green oriole
#

CC @hardy gorge

trail pilot
#

Would a youtube command be possible for Sir Lancebot?

green oriole
#

What for? Searching YouTube?

trail pilot
#

I think there was a PR on it a while back but it looks like it's idling

molten perch
#

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)

trail pilot
molten perch
# trail pilot Native support for embeds? I mean, there are commands like stackoverflow and rea...

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...

β–Ά Play video
green oriole
trail pilot
#

Ah, alright

#

Ah, wait, yeah there was already a PR on this
sir-lancebot#586

dusky shoreBOT
green oriole
#

Ah, it is an old issue

#

I guess it is fine then

severe tangle
vale ibex
#

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

fallen patrol
#

re: bot#1779
I feel like being a pre-commit hook would be a lot better than on the ci

dusky shoreBOT
fallen patrol
#

as an advantage, it would automatically be added to the ci by virtue of being a pre-commit hook

vale ibex
#

@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

brisk brook
#

Hmm, I see now hahaha

fallen patrol
#

@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.....

vale ibex
#

pretty much a moot point though since the repo is archived lol

#

not like it's going to be getting new commits

fallen patrol
#

nah I know

#

but for future reference

#

you could have pinned to a commit this whole time πŸ˜›

vale ibex
#

yea true, I just find it easier to read when you use the poetry git feature

#

rather than a long url

fallen patrol
#

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

vale ibex
#

lol sounds fun

fallen patrol
#

no

#

no its not

#

dealing with zips now please send πŸ₯²

desert vessel
#

Hey people

#

i have a hugee problem