#Basic Pycord Help

1 messages ยท Page 76 of 1

cerulean laurel
#

?

sage tendon
#

thats the method i constantly say should be removed. its stupid, abuses how python is supposed to work, and just causes issues

sage tendon
#

read the docs

lofty parcel
#

.rtfm Role.mention

sly karmaBOT
fresh sierra
#

Il pretty sure it should not be = but :

red crypt
#

we also do it for avoiding the channel limit, we have reached the limit of channels already

sage tendon
#

there's a limit??

frail basin
fresh sierra
#

with 50 per category

#

how can an option name be None ?

#

shouldnt it be by default the parameter name ?

#
    name: :class:`str`
        The name of this option visible in the UI.
        Inherits from the variable name if not provided as a parameter.
#

so here option.name shouldnt only be type str ? since if its not the option name it should be the parameter name

fresh sierra
frail basin
#

well it has to get set somewhere

fresh sierra
#

when i look for self.name = , there is only this line

#

so i dont really know from where else it can be set

echo wraith
#

It's set from kwarg name probably

#

Or smth like that

errant trout
fresh sierra
#

so it will never be None but its typehint as None because its set in the parse option which first create the option and then set the var if None

errant trout
#

it will be never be None after the Option's parent SlashCommand is initalized

#

strictly speaking, you could just make an Option at random that never has name set

fresh sierra
#

looking at the code for option its a bit spaghetti imo, lets see how its gonna be in v3

errant trout
#

most of v2 command stuff is pretty spaghetti yeah

eternal kite
#

btw does on_application_command runs after the command is finished/before/while the command is running?

#

i assume on_application_command won't block the command function from responding right?

fresh sierra
eternal kite
fresh sierra
#

so it does not wait for any of those

#

only check and before will run before

silk spire
#

^ events are scheduled and called as async tasks

lofty parcel
#

It's best to use a listener which runs in parallel

eternal kite
lofty parcel
eternal kite
lofty parcel
#

If its a listener, then no

eternal kite
#

@bot.event is a listener wdym

fresh sierra
eternal kite
#

oh

#

so @bot.event does affect?

fresh sierra
#

bot.event will overwrite the default one, while the other one will not

eternal kite
#

im asking about the performance, because my bot is thinking a lot before the commamd responds

fresh sierra
#

and make sure you have no blocking code usage, like pillow, sync database etc

#

if you want me to check for any blocking code, feel free to share it

#

.tag paste

sly karmaBOT
#

Please copy and paste your code here. This makes it easier for everyone helping you.

eternal kite
#

it's alr my bot have too much stuff going on

fresh sierra
#

as you want

#

but if your bot is not answer at all for some time its usally blocking cod

eternal kite
fresh sierra
#

because when a blocking code is running it makes all ur bot stop

eternal kite
#

yeah ive made all image manipulation function run in executor

fresh sierra
#

do you open any file ?

eternal kite
#

no just image file

fresh sierra
#

or use sqlit3

sage tendon
#

just as a note, running stuff in an executor won't make it any faster

eternal kite
#

async motor for mongodb

eternal kite
fresh sierra
#

no time.sleep too ?

eternal kite
sage tendon
eternal kite
little cobalt
#

.tag motor

sly karmaBOT
#

Tag not found.

sage tendon
#

then I don't see the issue

little cobalt
#

.tag mongodb

sly karmaBOT
#

MongoDB is a NoSQL database that stores data as documents in BSON format. In general, NoSQL databases are not recommended as most of Discord data you are storing is relational (e.g. economy things) while mongodb is for non-relational data, hence there is no reason to use NoSQL over SQL to store relational data.

-# Motor, the previous async driver has been deprecated in favor of PyMongo
Nevertheless, if you still want to use mongodb within your asynchronous code, use PyMongo for the async driver. Keep in mind that odds of you getting mongo support here are low as it is not a common topic.

fresh sierra
#

well it can come from 1000 reasons if its blocking code

#

you could make a blocking code detector

eternal kite
#

I've done research beforehand

fresh sierra
#

and check from here in which frame the loop is stopped

little cobalt
sage tendon
eternal kite
#

i mean i coded the bot in 2020

sage tendon
#

but yea what exactly is the issue then if light commands are fast and others are slower

eternal kite
#

reading db is slow i guess

#

yea i agree read and write with motor mongodb is kinda slow

little cobalt
#

uh, I added everytime ctx.defer if I have to connect to my MongoDB

fresh sierra
#

then we might have found the issue

#

switch to a sql and see

eternal kite
#

is pymongo faster than motor?

sage tendon
#

mongo is nosql..

fresh sierra
#

sql***

eternal kite
#

I'll be having issues exporting data from nosql to sql lol

sage tendon
#

how many servers is your bot in

eternal kite
#

I know how to read the docs wtf

little cobalt
#

1 sec.

eternal kite
fresh sierra
sage tendon
#

Are you running the db on the same server

eternal kite
sage tendon
#

are you using a hoster or is it on the VPS you run the bot on

eternal kite
#

mongodb have their own servers

fresh sierra
sage tendon
#

lol

eternal kite
fresh sierra
little cobalt
eternal kite
#

mb

eternal kite
sage tendon
#

512 is enough for a db for some time

little cobalt
#

yea but not at 900 server

eternal kite
little cobalt
#

oh

eternal kite
#

2k users

sage tendon
#

btw, are you keeping the connection to the db open or do you keep re-establishing it whenever you need to access the db

sage tendon
eternal kite
#

so technically i can survive up to 200k users

sage tendon
#

and nosql is space inefficient compared to sql

eternal kite
#

connecting takes more than 5 seconds

sage tendon
#

wtf

eternal kite
#

what the wtf

#

am i not supposed to keep the connection open wtf

#

that's weird af

sage tendon
#

no, 5 seconds is so long

eternal kite
#

yea..

#

alr so i did some googling

sage tendon
#

and how long does an operation take

eternal kite
#

and everything said mongodb is faster than sql databases

eternal kite
sage tendon
#

that depends on a lot of factors

eternal kite
#

200 ms average i think

fresh sierra
lofty parcel
#

You usually have to work with indexes if you have quite a lot of documents.

lofty parcel
#

Search can be inefficient in non sql dbs

little cobalt
#

I host my MongoDB locally

sage tendon
#

sigh

fresh sierra
#

i thought it was only on server, that's mb then

sage tendon
#

If only people only shared info they were certain about

eternal kite
sage tendon
#

like any other db

#

lol

eternal kite
#

establishing connection with the db isn't establishing it with the db servers?

sage tendon
#

what

little cobalt
sage tendon
#

on Amazon
lol

eternal kite
#

like aren't the db servers located at the company business location

sage tendon
#

dude you download the db server and run it lol

eternal kite
#

wtf

lofty parcel
#

You're storing stuff in their servers

eternal kite
#

yes im using atlas

#

yea exactly

sage tendon
#

yea and you shouldn't

#

it's completely unnecessary

#

just run it locally

little cobalt
#

at the end its all the same, but just local

eternal kite
#

what's the difference

sage tendon
#

depending on where the servers are compared to your VPS it'll save you a lot of time

little cobalt
#

you need internet for the other one xd

sage tendon
eternal kite
#

yea so should i switch to sql database or nah

sage tendon
#

it's really not that complicated lol

eternal kite
#

because online saying nosql is much faster

little cobalt
#

host it locally at your server and not online

sage tendon
#

let's just say the overwhelming majority of the world runs on SQL dbs

eternal kite
sage tendon
#

obviously it'll need some resources

#

shouldn't be much tho

eternal kite
#

my bot is already taking 2-3gb ram and i still couldn't locate the memory leakage smh

sage tendon
#

doesn't have to be a memory leak necessarily

lofty parcel
eternal kite
sage tendon
#

the lack of ping will make it much faster now matter how shit your server is

eternal kite
#

oh so that's the reason

sage tendon
#

200ms seems super much to me
on a local SQL server I get sub millisecond execution times

eternal kite
#

yea im tired of shit taking 0.2 seconds to search something in merely 2k documents

little cobalt
#

oh, at the online version you have a ratelimit

sage tendon
#

yea I mean search will always be slower with nosql

#

SQL is just better if you have structured and regular data

eternal kite
echo wraith
#

It's not

#

idk why they saying that

sage tendon
#

sigh

eternal kite
sage tendon
#

honestly sqlite might even be more ideal than a local server

#

for you

sage tendon
eternal kite
lofty parcel
#

Choosing a DB depends on many factors

eternal kite
#

im reading stack exchange

lofty parcel
#

Toothy is right about having structured data, you should use sql

#

You also get some other advantages like integrity

eternal kite
#

apart from the user data, other data i have are non relational

sage tendon
#

like what

eternal kite
#

like two pieces data having their fields completely unrelated

sage tendon
#

that's normal lol

#

look unless you are storing VERY different pieces of data in every single row, or your DB schema changes regularly, you should use SQL

#

mongodb is overhyped and overused

sage tendon
#

No

eternal kite
#

schema changes quite regularly

sage tendon
#

why / how

eternal kite
#

because that'll be easier to read when im reading the database from the mongodb app

sage tendon
#

can you just show some of your dB entries I think you're confusing stuff

eternal kite
#

im not home rn

lofty parcel
#

Do you know what toothy means by schema?..

eternal kite
#

but i came up with the conclusion that the less work and most efficient solution is to switch online db servers to host it locally

eternal kite
sage tendon
eternal kite
lofty parcel
#

Then how the hell are you changing the schema that regularly

sage tendon
#

does that

#

not on some fuck ass servers thousands of kilometres away

#

oh nvm I misread your message

#

my bad

eternal kite
#

you're confusing me now

sage tendon
#

that's what local means lol

lofty parcel
#

Hosting it on your vps equals local

eternal kite
#

yea

#

that's literally what i meant

eternal kite
#

im not home rn

sage tendon
#

if you have the same data fields every time, or mostly anyway, mongo is unnecessary

eternal kite
#

most data fields are same yeah

#

but im too lazy to switch from nosql to sql when i can just remove the ping factor

sage tendon
#

that is completely unrelated

#

wtf

#

you can also host mongo locally, its just that mongo has zero benefits for your case then

eternal kite
#

the thing is im lazy to switch to sql as the effort:efficiency ratio is not that big of a difference

sage tendon
#

Shrug_3 then have fun with 1s write times

eternal kite
#

and switching from online db to local hosting db can remove the ping factor literally making it sub milliseconds like you said

eternal kite
sage tendon
#

you said that

eternal kite
#

no i said read time

sage tendon
#

so.. write is even slower? kekw

eternal kite
#

idk about write

#

never tested it

fickle frost
#

๐Ÿ˜ญ ๐Ÿ˜ญ ๐Ÿ˜ญ ๐Ÿ˜ญ ๐Ÿ˜ญ ๐Ÿ˜ญ ๐Ÿ˜ญ ๐Ÿ˜ญ ๐Ÿ˜ญ

sage tendon
#

you can still use them

#

they just aren't supported by the library yet

fickle frost
#

My bot is like 15 files written in pycord I'm not switching to discord.py now๐Ÿ˜ญ

#

Just to confirm there is no way yet to upload application emojis, only guild emojis, right?

sage tendon
#

not via the library no

fickle frost
sage tendon
#

yea I think there's some way to make a raw API request using the library so you don't need to worry about authorisation and all that
but I really don't know about that

round heart
#

There's a PR for application emojis, isn't there?

sage tendon
#

mayhaps

fresh sierra
#

seems like its merged

round heart
#

.tag master

sly karmaBOT
#

pip install -U git+https://github.com/Pycord-Development/pycord
-# Note: The Master Branch May Have The Newest Features But It May Also Have More Bugs

buoyant eagle
#
    @discord.ui.button(label="English", emoji=":flag_us:", style=discord.ButtonStyle.secondary)
    async def english_button(self, interaction: discord.Interaction, button: discord.ui.Button):
        # Create a copy of the embed with the server name
        embed_copy = discord.Embed(
            title=english_terms_embed.title.replace("SERVER", interaction.guild.name),
            color=english_terms_embed.color
        )

error:

                                                      ^^^^^^^^^^^^^^^^^
AttributeError: 'Button' object has no attribute 'guild'

why i get this error?

sage tendon
#

the order of interaction and button is different

buoyant eagle
#

really?

sage tendon
#

yes

buoyant eagle
#

since when

sage tendon
#

always?

little cobalt
# buoyant eagle since when

it has to be always button first and after that the interaction, you also have to add both or else it is not gonna work

errant trout
sinful juniper
#

What is the best way to translate my discord bot into another language (English)? There should be a setup command with which an admin can specify which language the bot should have on the server

sage tendon
#

localisation file, and then just change every string to currently_selected_language.stringname
the currently selected language is a bot attribute ideally

sinful juniper
sage tendon
#

not really

#

its not really that hard tho
fetch the selected language from the db and load the appropriate set of strings, then just do selected_language.thisEmbedTitle or whatever

shy oasis
#

Is there any difference between using discord.Cog.listener() and discord.ext.commands.Cog.listener() ?
Both seem to work fine, but the official guide uses the latter

sage tendon
#

its just a shortcut

shy oasis
sage tendon
#

follow the import, its the same thing

#

should be anyway

shy oasis
#

The ext one overrides some commands methods, but I guess it doesn't really matter for event listening?

sage tendon
#

hm, weird
idk

eternal kite
#

even with this light code the response time is about 600ms, is this normal?

async def ping(self, ctx):
      before = time.monotonic()
      botlatency = round(self.bot.latency * 1000)
      await ctx.respond("Pong!")
      msg = await ctx.interaction.original_response()
      await msg.edit(content=f'Pong! In **{botlatency}ms**')
      await msg.edit(content=f'Pong! In **{botlatency}ms** Response time in **{round((time.monotonic() - before) * 1000)}ms**')
frail basin
#

Whats the bot latency?

#

And where is it hosted, country wise?

sage tendon
#

erm.. why do you use time.monotonic() and not time.now()

frail basin
fresh sierra
#

since you told me previously you were in the us

eternal kite
fresh sierra
#

still seems like blocking code

eternal kite
sage tendon
#

luma you are obsessed with blocking code

frail basin
frail basin
fresh sierra
frail basin
#

I dont see any blocking code

fresh sierra
#

dont necessary need to be inside a command

frail basin
fresh sierra
eternal kite
#

there's two db reads in my bot.check

fresh sierra
#

if there is nothing blocking, the check should not matter

#

so it might be normal since rn ur not inside the us

sage tendon
#

i mean you are basically measuring 3 api calls

#

respond > original response > edit

#

reduce that

#

200ms per call would be more normal

frail basin
#

4*60=240ms

#

So that leaves 360ms "processing" time

frail basin
#

The only thing that really matters is the time till the pong interaction reaches discord

#

Anything under 1s is fine

eternal kite
#

alr

sage tendon
#

which is usually around 130ms

frail basin
#

True

sage tendon
#

130*3 = 390

#

and there you have it

#

all accounted for

buoyant eagle
sage tendon
#

its a boost perk of this server

buoyant eagle
#

oh wow

round heart
#

This is a new one

discord.errors.ConnectionClosed: Shard ID None WebSocket closed with 1000
DeprecationWarning: parameter 'timeout' of type 'float' is deprecated, please use 'timeout=ClientWSTimeout(ws_close=...)'

lapis dock
sage tendon
#

are you on 2.6.1

round heart
# lapis dock Could you share the full traceback?

Not much else to it.. I've been getting the reconnect every so often, this is the first time I've seen the float warning

ERROR:discord.client:Attempting a reconnect in 0.16s
Traceback (most recent call last):
File ".../site-packages/discord/client.py", line 617, in connect
await self.ws.poll_event()
File ".../site-packages/discord/gateway.py", line 630, in poll_event
raise ConnectionClosed(
discord.errors.ConnectionClosed: Shard ID None WebSocket closed with 1000
.../site-packages/discord/http.py:216: DeprecationWarning: parameter 'timeout' of type 'float' is deprecated, please use 'timeout=ClientWSTimeout(ws_close=...)'
return await self.__session.ws_connect(url, **kwargs)

round heart
lapis dock
#

It is probably from this line in pycord
msg = await self.socket.receive(timeout=self._max_heartbeat_timeout)
The aiohttp docs do not make it clear that using timeout like that is deprecated tho. Because that method calls the method in the error, it is not the method in the error.

errant trout
#

you have the idea but not quite, it's as the error says; line 216 in http.py ```py
async def ws_connect(self, url: str, *, compress: int = 0) -> Any:
kwargs = {
...
"timeout": 30.0,
...
}
return await self.__session.ws_connect(url, **kwargs)

#

basically just needs a PR to change it to ClientWSTimeout instead

#

well, might need a version check

round heart
#

ahhh. version fun

lapis dock
#

dangit, reading fail

#

python version check? If so that is not fun :(

errant trout
#

idk if aiohttp version is bound to python version

#

someone else can figure that out

sage tendon
#

wdym

errant trout
#

the PR that deprecated float timeout is the same PR they added the new class for it; pycord still works with older versions of aiohttp than that, so you have to include both implementations

sage tendon
#

update aiohttp?

echo wraith
errant trout
#

I'm aware, but pycord isn't very strict on the version

#

Like my master bot I'm testing cv2 on uses aiohttp 3.8

sage tendon
#

just update to use the new method and raise the dependency version

sage tendon
#

3.10 is thin ice

errant trout
#

My assumption was that aiohttp versions itself to match Python versions but I didn't look too far into it

sage tendon
#

nah the newest is either 3.11 or 3.15

#

3.11.18 stable

#

actually no they just released 3.12

lethal loom
#

is components v2 in the git version?

lapis dock
#

Not yet, just the PR

lethal loom
#

nah ok

lapis dock
#

although it probably should be merged and 2.7 released

lethal loom
#

Do you know how long this may take? Invalid server list

lapis dock
#

No, also what does "Invalid server list" mean?

fresh sierra
#

how can member.joined_at be None ?
self.joined_at: datetime.datetime | None = utils.parse_time(
data.get("joined_at")
)

little cobalt
lapis dock
#

The API does not mark it as optional so...

fresh sierra
#

well it might be a typehint issue then

#

so ig it will be fix in v3

sage tendon
#

you do realize at the current pace v3 will never actually release right

fresh sierra
#

but it looks like its gonna be done before 2.8 ;)

silk spire
#

Idk when exactly but Member.joined_at can definitely be None

errant trout
#

(there's a docs pr for this but it's stuck in draft hell)

sterile herald
#

Very minor, but on mobile it shows the command still thinking even though itโ€™s finished (very bottom of image). On PC, it doesn't show it.
After deferring, Iโ€™ve tried ctx.respond and ctx.followup.send for the embed and both show the same thing.

Am I able to remove that or am I missing something? Iโ€™ve tried searching, but canโ€™t find anything about it.

Itโ€™s just a straight reply. No buttons, menus, etc.

lapis dock
#

TBH this looks a bit like a discord bug because of how squished the loading dots are

sterile herald
#

Awesome thank you guys. I just updated my app as well and it no longer shows. Should have done that in the first place

fresh sierra
errant trout
fresh sierra
#

And like they can be in a guild for some hour and then they get ยซย kickย ยป ?

errant trout
fresh sierra
#

Ok, itโ€™s like a kind of application member but old fashioned
Good to know

errant trout
#

well... not particularly? just try it

frail basin
#

Under what conditions is discord.Thread.parent None?

errant trout
fresh sierra
#

is it the same for view.message ?

#

or if we send a view inside a slash command its not considered as a message so view.message is None ?

frail basin
#

Is there any reason why User doesnt inherit from Member?

sage tendon
#

because that's not how it works

#

User stands above member

frail basin
#

What?

sage tendon
#

A member is a special user

#

any member is also a user, but not every user has an associated member object

frail basin
#

Oh I meant it in reverse

#

why doesnt Member inherit from User

sage tendon
#

it does afaik?

frail basin
#

it just has a _user attr

sage tendon
frail basin
#

it setattr's the user functions' and properties

sage tendon
#

pycord internals are a bit weird

#

you can just use it as if it inherits straight from user

frail basin
#

I just spent quite some time debugging an issue where the User was implicit converted to a Member, while the type remained a User, breaking isinstance checks

sage tendon
#

how does that happen lol

frail basin
#

Slash command input

sage tendon
#

Fun fact

#

you can put ANY user ID into a slash command member option

#

are you typing it as : User or : Member

frail basin
#

user

#

but I get a Member object

sage tendon
#

yea that's expected behaviour

#

you should type it as Member

frail basin
#

how is that expected

#

if it inherited from User? sure.

#

but since it doesnt, it doesnt make sense to implicit convert

sage tendon
#

It does effectively, even if it looks like it doesn't

frail basin
#

well tell that to isinstance

sage tendon
#

check another way

#

e.g. member.guild

#

with hasattr

frail basin
#

yeah much more pythonic solution

sage tendon
#

or if member in guild.members

#

many roads lead to rome

#

I also dislike that you cant disable people entering non-member IDs, which isn't your exact issue but kinda related

frail basin
#

so if I have an input typed as User, it would return a Member in a guild context but a User in a dm?

sage tendon
#

yes

frail basin
#

...

sage tendon
#

remember, what you type it as doesn't matter to python

#

it's just a type_hint_

#

not a type_force_

frail basin
sage tendon
#

Nope

#

If you use the option decorator for example, and pass discord.User or discord.Member, what gets passed to the Discord API is essentially just "any user"
And after that the library gives a rats ass about what comes back

silk spire
lapis dock
#

This must be it. From member object discord docs.

The field user won't be included in the member object attached to MESSAGE_CREATE and MESSAGE_UPDATE gateway events.

#

So you can create a user if you only have some of the info

real glacier
#

hello! sorry if this is off-topic, im using aiosqlite. is it good to use WAL?

sage tendon
#

whats that

fresh sierra
fresh sierra
# sage tendon whats that

Instead of editing directly the db, it will first append each commit in a file and then it will be merge to the db

#

So it can help with concurrency especially with sqlit since you can only have 1 connection

real glacier
#

i want to turn it off, but it might cut some of my processing

#

or idk

fresh sierra
#

Then if you donโ€™t have a lot of place in ur vps you should not use it

fresh sierra
real glacier
#

ok, thanks!

hazy turret
#

Do I have to add a view on each Guild in the on_ready method to make it persistent or is it enough if I just do self.bot.add_view(view)?
Or do I have to do:

for guild in self.bot.guilds:
   self.bot.add_view(view)```
lofty parcel
#

You're not even using the guild object in the method

hazy turret
fresh sierra
#

but self.bot.add_view(view) is enough to make the view persistent inside ur whole bot

#

no need to do it guild by guild

hazy turret
fresh sierra
#
for guild in self.bot.guilds:
   self.bot.add_view(MyView(guild=guild))
hazy turret
lofty parcel
#

Am sure that won't work

#

Dynamic args and persistent views are kinda weird

fresh sierra
#

Maybe itโ€™s not how itโ€™s supposed to be done but it works

lofty parcel
#

I haven't worked with pycord in a long time

#

So eh, I could be wrong

fresh sierra
#

im doing like so for example

#

and it does add the view correctly and also keep each option correctly, but maybe you can also just pass None and its gonna work (dont remember if it works with None)

sage tendon
#

me when people actually read their code

fiery fable
#

is there a way to display a role but dont mention it? because role Role.mention, ofc mention it

frail basin
#

allowed_mentions=discord.AllowedMentions(roles=False)

cosmic thorn
#

is it possible to check if a message is sent from a thread? smth like
if message.channel.type == "private_thread"

frail basin
#
if isinstance(message.channel, discord.Thread) and message.channel.is_private():
    ...
cosmic thorn
#

thank you!!

echo wraith
frail basin
echo wraith
#

It's also just ugly like that imo

frail basin
#

feel free to suggest better solutions

echo wraith
#

smth like if message.channel.type is ChannelType.PRIVATE_THREAD or smth idk

frail basin
#

that doesnt type narrow it

echo wraith
#

also why is is_private a method ?!

frail basin
#

all methods

echo wraith
#

yeah ik that was a rethoric question

echo wraith
#

well

#

just make a class PrivateThread etc... and all inherit from a common thing

#

but do it actually correctly

#

cause rn it's a mess

#

there's not clear inheritance path

frail basin
#

Also, make Member inherit from User ๐Ÿ™

echo wraith
#

I'm not sure about that one

frail basin
#

which is a full user object

#

Its also not typehinted as optional

sage tendon
sage tendon
frail basin
sage tendon
#

not really

torn barn
sage tendon
#

how would typing make it easier?

frail basin
sage tendon
#

how else would you do it then?

#

how can you be sure its a thread otherwise?

frail basin
#

So a type checker would know that message.channel is a discord.Thread

sage tendon
#

uh.. no

#

message.channel can be any other channel type too

torn barn
sage tendon
#

did you get infected by luma with his typing virus?

torn barn
#

Prolly

sage tendon
torn barn
#

You can have a helper function typed as a TypeIs[MessageSubclass] return type

sage tendon
#

yea but you will always need an isinstance

torn barn
#
class PrivChannel(discord.Message):
    channel: discord.Thread
def is_priv_thread(ch) -> typing.TypeIs[PrivChannel]:
    return isinstance(ch, discord.Thread) and ch.is_private()
torn barn
#

And still does that type thing

sage tendon
#

has nothing to do with how the lib is typed tho

torn barn
#

So maybe they like it more

sage tendon
#

akos is just infected by lumas typing virus

torn barn
#

Didnโ€™t doubt it

frail basin
frail basin
echo wraith
fresh sierra
#

how can InteractionChannel be a category ?

frail basin
#

ยฏ_(ใƒ„)_/ยฏ

#

Interaction has it typed like that

fresh sierra
#

is it just a mistake or is it really somth that i dont know about discord

frail basin
#

I guess the official docs didnt bother with it

#

I dont think it can actually ever be that

torn barn
echo wraith
#
frail basin
#

there are probably even cleaner ways to do this

echo wraith
#

oh I'll love when pycord goes 3.12 +

#

cause of the new generics sytax

#

[]

fresh sierra
#

how am i supposed to pass a list of snowflakes into the role edit ?
should the list of role id already be a list of snowflak ?

frail basin
fresh sierra
fresh sierra
frail basin
#

Snowflake is literally just str | int

fresh sierra
#

so this doesnt work here, it looks more for a list of object

frail basin
#

there are two snowflake types?

fresh sierra
frail basin
sage tendon
torn barn
frail basin
#

true

torn barn
# frail basin

And how would the lib know what type to return the interaction.channel without it having bunchs of if statements

fresh sierra
#

cant that be possible with typevar ?

torn barn
#

Yes, but still the lib would need bunch of if statements per channels

#

Typevars canโ€™t magically guess the type of a channel

#

Unless explicitly stated

sage tendon
#

the luma virus

fresh sierra
torn barn
#

No

sage tendon
#

i legit dont see the issue with the current solution

torn barn
fresh sierra
#

i dont know what is his issue so

#

but for example the rework of the get or fetch using the typevar is really nice

torn barn
#

overloads when

#

But ig typevars work on that context

#

Not on this

sage tendon
#

overloads...... we.. are.. in python..

lapis dock
echo wraith
#

:)

sage tendon
#

the client allows you to type in category channels

#

:>

torn barn
fresh sierra
#

a nice thing i would love to see implemented is a better support for custom context, for example using typevar and so being able to pass our context too

#

like so :
Context[MyContext],
this is just an idea, i have no idea how can or if its even possible to implement this

torn barn
#

You can do that

#

Just override your get_(application_)context method to default to a custom subclass and use that custom context annotation instead of the default one

fresh sierra
torn barn
#

Why not

frail basin
#

even strict type checkers will allow it

fresh sierra
#

not really, or i dont understand how

torn barn
#

Error is self explanatory

#

Tbh

#

You trying to override a converter to return Emoji but expects a Role

fresh sierra
#

im talking about the above one (other one is a typo)

torn barn
#

And when you using commands.Context is expecting to be a LumabotContext type or any that subclasses it

#

Why annotate it like commands.Context

fresh sierra
#

so im doing like this to pass the context, but its telling me its not

#

so i did try to do
commands.Context[LumabotContext] (which is not possible since its about using Bot etc

#

for a bit more clarity using a known class, here also an example with bridge ext context

#

and so it leads also to some issue here

#

so if its possible as you said, could you give me some pointers ? because im a bit lost tbh

little cobalt
#

All the red error at the right side ;3

sage tendon
#

jesus

fresh sierra
#

(rn i have to fix 800 errors inside 1 file) mainly untyped dict

lapis dock
ashen cargo
#

I'm using bridge commands but doesn't seem to work in DMs, any way to solve this?

lapis dock
#

The slash commands are not working? And when you say "in DMs" do you mean DMs with the bot or DMs with other people?

ashen cargo
lapis dock
#

Is your bot user installed?

ashen cargo
#

Yep I can use it in different servers which it's not in but not DMs

lapis dock
#

Have you set the contexts?

rugged lodgeBOT
#

Here's the slash users example.

lapis dock
#

This example shows how to set the contexts if you have not

ashen cargo
#

Cancel that, it seems that it's only showing in servers the bot is in

ashen cargo
lapis dock
#

No problem, then you need to also set the integration types as shown in the example as well.

#

I think it should still work for bridge

ashen cargo
#

For each command?

lapis dock
#

You can set it bot wide as well

ashen cargo
#
@bot.bridge_command(integration_types={discord.IntegrationType.user_install})
async def embed(ctx: bridge.BridgeContext, *, url: str):
    """Uploads a video to Catbox and returns an embeddable link."""
#

Completely empty

#

In my other bot that uses normal slash commands, I didn't need to do any of this

lapis dock
#

Have you refreshed discord client cache with ctrl+r?
Try setting the contexts as well. I just skimmed the internal code and it looks like bridge should work with contexts and such

#

*, url: str not so sure that this syntax works with bridge commands

#

but that is secondary to the current problem

ashen cargo
#

This seems to have worked

#
bot = bridge.Bot(command_prefix="!", intents=intents, case_insensitive=True, default_command_contexts = {InteractionContextType.private_channel}, default_command_integration_types = {IntegrationType.user_install})
lapis dock
#

Does it still work in guilds then?

#

If not you should expand the defaults

ashen cargo
#

No because I only set IntegrationType to user install

#

Yep

lapis dock
#

Just making sure you are aware ๐Ÿ‘

ashen cargo
#

Thank you

real glacier
#

hello!

is_booster = True
            if not isinstance(ctx.author, discord.Member) or not ctx.author.premium_since:
                is_booster = False

this only checks if the user is a booster. what about checking if the user boosted in a specific guild...?

torn barn
#

You should check whether the user avatar is animated, they have a banner also, because they maybe have nitro but have not boosted any server your bot is in

real glacier
#

oop you are right!

errant trout
deft kestrel
#

Hello, i trying to do stuff with some variables when i close the modal without sending it, but not luck trying with on_timeout() or _dispatch_timeout(), gemini says on_timeout would me enough to do what i want, but dont trigger when i close it. ยฟideas?

torn barn
#

This is because Modals have no timeout by default

#

So they never really time out

#

And discord does not let the apps know when someone closes a modal without sending it

deft kestrel
#

thats bad, because thats exactly what i need, i dont want the modal to timeout, just know when a user haves or not the modal open

errant trout
#

unfortunately it's impossible to know if a model is currently open

#

your bot can ONLY know 1) when a modal is first opened and 2) when a modal is submitted

deft kestrel
#

shame, i will try to find another way to do what i want. thanks for the replies! ๐Ÿ˜„

real glacier
#

please help

round heart
#

I feel like I've asked this before, but choices loaded when the bot loads, right? There's no way to change that list without reloading?

sage tendon
#

the command needs to be synced again

round heart
#

Mm. Which is somewwhat broken in pycord currently iirc. Isn't that what Wolfy was working on

fresh sierra
#

maybe not as optimized as possible

#

they might also be some issue of commands not being remove when cog is unload or somth like that, but if you sync again it works

lapis dock
#

As far as I can tell it just syncs more commands then it should. Like luma said it is more of an optimization fix.

cinder mica
#

hello pycord discord server. I am intending to make a bot that does an action at 8:00AM every day. I saw tasks in the guide that could help me.
I saw that the task can take either a time interval or a sequence of datetimes. I have two questions:

  • is there a way to tell the task to start looping at a certain datetime.time, and then loop with a time interval of hours=24
  • can I provide an infinite generator object that yields datetime.time's as the time parameter (now that i type this out, it feels like a bad idea)
torn barn
#

you can have an inner sleep until that time, then start the loop

#

when starting the loop, there will always be one iteration the time it gets started

#

something like:

@tasks.loop(hours=24)
async def task():
    ...

when_to_start = datetime....
await discord.utils.sleep_until(when_to_start)
task.start()
cinder mica
#

you're one of the greatest aint no debating on it

fresh sierra
#

I do think there is a better way using the time arg

fresh sierra
#

(i might have not understand everything you ask but this seems more logical imo)

torn barn
#

They want to wait till X timestamp to start the 24h loop

fresh sierra
#

I thought this X timestamp was the 8am, so then it can turn every 24h

#

If not then I misunderstood their message

sage tendon
torn barn
#

One thing is wait till X time, ie waiting for 8 am, no specific day / month, other for a timestamp

#

If they meant the first, they should use Lumaโ€™s suggestion

wheat tiger
#

Why do I get this error? Although I've accessed is_finished attribute anywhere in my code.

wheat tiger
#

@echo wraith Congo dude, ur exams finished ๐Ÿฅณ

echo wraith
#

Finally ๐Ÿ˜ญ

wheat tiger
#

@echo wraith Any clues?

fresh sierra
echo wraith
fresh sierra
#

strange because by looking at the pycord code, they are never using it before checking if view is not None

fresh sierra
wheat tiger
fresh sierra
wheat tiger
echo wraith
#

No but like the full error

fresh sierra
fresh sierra
#

print(error.with_traceback(error.traceback))

wheat tiger
fresh sierra
#

error.__traceback__

wheat tiger
#
print(error.__traceback__)
fresh sierra
#

no

#

print(error.with_traceback(error.traceback))

wheat tiger
fresh sierra
#

try to do
error = error.original

#

and then ur thing

#

and last option is just remove the on_application_error for a moment

wheat tiger
#

it's not in error

fresh sierra
#

if you have an error error has no attribut original then you dont need it

#

and so just try to remove ur error handler

fresh sierra
# wheat tiger

the view you pass is wrongly pass from what i understood

wheat tiger
fresh sierra
#

it seems that its None

wheat tiger
#

it's None

fresh sierra
#

but you cant pass a view None like this

#

(i will maybe make a pr for you can)

wheat tiger
fresh sierra
#

@errant trout could you add this inside your v2 pr ? or should i make one ?

#

basically in the async py it check if the view is not missing but not if its None, its also the only place where it does that

#

i dont know if its intentional but i dont think it is

errant trout
#

...that's only in the send method

#

just don't pass the view kwarg

wheat tiger
#

@fresh sierra Is there any way to get the tracebak from error handler too?

fresh sierra
errant trout
#

no because it expects MISSING

#

that's the point

fresh sierra
#

then if its intended no need for a change

wheat tiger
fresh sierra
#
    @commands.Cog.listener()
    async def on_application_command_error(self, ctx: discord.ApplicationContext, error: discord.DiscordException):
        error = getattr(error, "original", None) or error
        print(error.with_traceback(error.__traceback__))
errant trout
#

i understand it's not the most intuitive but that's how MISSING operates and i'm not gonna make an exception specifically for view - you simply shouldn't pass it at all

errant trout
wheat tiger
fresh sierra
errant trout
fresh sierra
#

i never really noticed that the send cannot have view = None tbh

errant trout
#

that's not specific to view, generally if something is typed as MISSING it's because None has a different purpose

#

but this isn't always the case, for the most part MISSING is just legacy design

#

changing it is a larger scale thing that i'm not addressing in this pr

fresh sierra
#

we do get the usecase of missing, but because we were used to view=None in edit we got induce in error for this send too

wheat tiger
fresh sierra
fresh sierra
#

is it the same ?

wheat tiger
fresh sierra
#

maybe try like this :
tb_str = "".join(traceback.format_exception(type(error), error, error.traceback))

#

it does work on my end so i dont really know why it doesnt for you, (maybe different python version)

fresh sierra
#

?

#
elif await check.is_dev(ctx):
    error = getattr(error, "original", None) or error
    tb_str = "".join(traceback.format_exception(type(error), error, error.__traceback__))
    error_em.description = (
        f"{emoji.error} An unexpected error occurred: **`{error.__class__.__name__}`**\n"
        f"\```py\n{tb_str}\```"
    )
sage tendon
wheat tiger
errant trout
#

literally just read the docs

#

it tells you if it's missing or none

torn barn
sage tendon
#

yea, one is using a workaround for no reason, the other uses the intended way

ancient timber
#

So ig this is where I ask this lol, I was redoing my cog loader yesterday and I somehow broke it to the point where I'm not sure how to fix it. I'm getting the object list can't be in await when trying to load cogs and my cogs are setup using async def setup(bot) then await bot.load_cog(mycog(cog))

And my loader using await bot.load_extension(module)

Any ideas or suggestions would be appreciated

sage tendon
#

yea, that's not Pycord

#

pycord's load_extension is sync

ancient timber
#

Wym?

tidal vessel
ancient timber
#

Oh I see now, I probably confused the too when watching a YouTube tutorial thanks

tidal vessel
#

See the documentation

ancient timber
#

I presume that would be in the cog section of the docs

tidal vessel
ancient timber
#

Thank u kindly!

sage tendon
#

that's not even the start of what you can do regarding task timing

#

did you never check the docs on tasks?

cinder mica
#

ok now I feel belittled

#

have a good one

sage tendon
#

lol

#

just saying theres much more you can do

#

and left

#

man some people

summer knot
#

Is it now?

torn barn
#

Check the docs

echo wraith
#

on master it can afaik

torn barn
#

Ig master

echo wraith
sly karmaBOT
# summer knot Is it now?

pip install -U git+https://github.com/Pycord-Development/pycord
-# Note: The Master Branch May Have The Newest Features But It May Also Have More Bugs

summer knot
echo wraith
#

here

warm monolith
#

Is there a plan to put the user tag into the discord.User object? Currently I'm querying the day like this:

result = requests.get(f"https://discord.com/api/guilds/{MAIN_GUILD}/members/{member.id}", headers={"Authorization": f"Bot {TOKEN}"})
            if result.status_code == 200:
                data = result.json()
                user = data.get("user")
                if user:
                    primary_guild = user.get("primary_guild")

                    if primary_guild is None:
                        log("ERROR", f"Member {member.name} ({member.id}) has no primary guild set.")
                        continue

                    if primary_guild.get("identity_guild_id") == str(MAIN_GUILD):
                        if TAG_SUPPORTER_ROLE not in [role.id for role in member.roles]:
                            await member.add_roles(tag_role)
                            await channel.send(f"Added `{tag_role.name}` role to {member.mention} ({member.id})")
lofty parcel
#

Not until its officially documented.

#

It's not worth adding not documented stuff because they're subject to change at any time.

warm monolith
#

Too bad

lofty parcel
#

You can also use the http module from the lib to get the raw json

#

You dont need to make the raw request all by yourself

warm monolith
#

How do I do that?

lofty parcel
#
raw = await bot.http.get_user(member.id)```
#

Then you can access it normally as a you would with dictionaries

warm monolith
lofty parcel
#

It has built-in handling for ratelimits

#

Since that's what the library uses

warm monolith
#

๐Ÿ‘

warm monolith
#

Can I delete ephemeral messages with a button interaction?

errant trout
loud kayak
#

why is py-cord sending multiple on_ready signals?

little cobalt
loud kayak
#

i see

#
@client.listen(once=True)
async def on_ready():

???

#

@little cobalt

little cobalt
#

yea

#

like that

loud kayak
#

ah

sage tendon
#

had 2 of them too some minutes ago

loud kayak
#

oh i see

#

why would i be getting this error with a view?:

Ignoring exception in view <UserSettingsView timeout=600 children=5> for item <Button style=<ButtonStyle.primary: 1> url=None disabled=False label='Edit Template' emoji=None sku_id=None row=None>:
Traceback (most recent call last):
  File "/home/container/.local/lib/python3.9/site-packages/discord/ui/view.py", line 426, in _scheduled_task
    await item.callback(interaction)
  File "/home/container/cogs/settings.py", line 26, in edit_template_callback
    await view.initalize(interaction=interaction, followup=True)
  File "/home/container/core/utils.py", line 261, in initalize
    raise e
  File "/home/container/core/utils.py", line 259, in initalize
    self.main_message = await destination(embed=embed, content=content, view=view)
  File "/home/container/.local/lib/python3.9/site-packages/discord/webhook/async_.py", line 1812, in send
    if view is not MISSING and not view.is_finished():
AttributeError: 'NoneType' object has no attribute 'is_finished'

errant trout
loud kayak
#

nvm fixed it

#

half the time i fix my issues after i post for help ๐Ÿ˜ญ

wheat tiger
#

Bot was on since a day

#

but this happened today at 4:00am

lapis dock
#

on_ready can fire many times due to how the discord gateway works

wheat tiger
#

it was up like always

lapis dock
#

Yes, on_ready is not a one time event. It is normally for it to trigger once every few hours/days. Discord was having some issues so it fired more often for a bit

cinder mica
#

hello pycord discord server. is the following issue normal? i am making my bot able to join and leave voice channels with these two methods. it joins just fine, but attempting to call play on the ctx.voice_client while it's connected to my channel gives me a ClientException: Not connected to voice.

The bot leaves the voice channel after a minute, but ctx.voice_client still exists after it leaves, and trying to call join will say it's Already connected to a voice channel.

the leave command doesn't seem to do anything to the voice client. the bot doesn't leave the channel when I call /leave.

what did i do wrong? prob something simple, i just can't find it

#

maybe i'm misunderstanding what ctx.voice_client actually gives me, let me check the docs again

#

ctx.voice_client
it says a shortcut to Guild.voice_client
Guild.voice_client
it says it "returns the VoiceClient associated with this guild, if any."

I assumed the VoiceClient I get is something I can then call .play() or .disconnect() on, am I right? that it is the voiceclient that would return from my await voice_channel.connect()

#

...

#

it started working

#

okay well... maybe my computer bad

#

ok with no edits it stopped working

#

ima go to sleep.

cinder mica
# sage tendon man some people

hello again! some people can't let a homie enjoy learning a cool thing without telling them they should have already known cool thing. they have to question said homie's competence. I appreciate you and the others opening my eyes to pycord's functionality but I don't need to be asked if I never read the docs when my original question was literally asking about it. the phrasing was a little discouraging, that's all.

#

you seem nice though, and pycord is still cool to me

sage tendon
#

what you're doing is assuming

rancid kestrel
#

class MyView(discord.ui.View):discord.ui.View
    @discord.ui.button(label="(0) Vote", style=discord.ButtonStyle.success)
    async def button_callback(self, button:discord.ui.Button, interaction, timeout=None):

``` why does the button still time out? (Im assuming after 180 seconds since last interaction since the docs say thats the default)
fresh sierra
#

its not inside the callback

lapis dock
#

Timeout is something you pass to the view constructor not the button arguments

#

Do you have an __init__ anywhere? If so you should then you can call super().__init__(timeout=None)

fresh sierra
#
class MyView(discord.ui.View):
    def __init__(self):
        super().__init__(timeout=None)
    @discord.ui.button(label="(0) Vote", style=discord.ButtonStyle.success)
    async def button_callback(self, button: discord.ui.Button, interaction: discord.Interaction):
rancid kestrel
#

okay that makes sense, thanks

cinder mica
lofty parcel
#

You have to install a pr if you want it to work

red mist
#

โ†‘

cinder mica
#

ohh ok

#

i'll look into it

#

also, does anyone know how to make bytesio work with a discord.File? saved_img contains the right contents when i try to reopen it with PIL.Image.open(saved_img).show() but the discord.File gives me wack

#

should I be using a different io class?

#

oh i fixed it by adding saved_img.seek(0) before my send from stackoverflow

wheat tiger
#

@fresh sierra in the docs it says that the listener cog_unload() must not be a coroutine

fresh sierra
#

def cog-unload

wheat tiger
#

but if I do

@commands.Cog.listener()
def cog_unload(self):
    self.lavalink._event_hooks.clear()

it throws error

fresh sierra
#

No need for any decorator or anything else

#

Remove the listener

wheat tiger
#

ok

fresh sierra
#

.tag rie

sly karmaBOT
#

You can run blocking code (such as PIL/Pillow) in an executor to run it in a separate thread:

def my_blocking_func(*args):
    ...

@bot.command()
async def test_command(ctx):
    ret = await bot.loop.run_in_executor(None, my_blocking_func, 'put', 'args', 'here')

See the python documentation for more info.

fresh sierra
#

Else it will block ur whole bot

cinder mica
#

we are so back

wheat tiger
#

@fresh sierra Have used Lavalink?

cinder mica
fresh sierra
fresh sierra
ancient timber
#

so whats the official way to use bridgeoption since option is depreciated for bridge commands

ancient timber
#

AHHH thank u

cinder mica
#

if my command has awaits in it, am i able to turn it into a blocking function, or should i like segment away the parts that are blocking

#

actually disregard

#

actually regard

#

actually disregard

fresh sierra
#

if there is blocking code, even tho its inside an await function it will still block ur code

cinder mica
#

oh dang

fresh sierra
#

that's why you run it inside a separate thread aka rie this ensure that it doesnt block the first thread

cinder mica
#

i understand it now

cinder mica
#

hallalujah

cinder mica
lofty parcel
#

@lapis dock

#

Nvm

lofty parcel
cinder mica
#

i swear you're the goat or my name isn't akash

ancient timber
#

whats the proper way to fetch global slash commands when ur using bridge.bot

sage tendon
#

wdym? what for?

ancient timber
#

basically i have an api cog that checks various things one of them is slash command desync and i was using py self.bot.tree.fetch_global_commands()

#

but tree dont exsist lol

little cobalt
ancient timber
#

does pycord have such a thing?

errant trout
#

it technically does, but to be completely honest pycord's command fetching functions are implemented in a pretty convoluted way

ancient timber
#

oh boy

errant trout
#

let's see

little cobalt
#

For what do you even need that?

ancient timber
#

personal use of the api breaking my slash commands ig?

little cobalt
#

?

errant trout
#

if you're fine with raw data you can run bot.http.get_global_commands(bot.user.id)

ancient timber
#

ahh i see thank u

tender latch
#

Hey, guys. Anyone familiar with this error?

Join failed: Shard ID None WebSocket closed with 4006

#

I have a bot that's meant to join voice channels, but recently, I notice that I get this error a lot and it simply crashes. The bot will work when I join a fresh channel after a long time, but then when I try to move it or use it in any channel I've already been to, it breaks.

tender latch
#

I can't read. ๐Ÿ˜ญ Let me see.

#

All works - thank you-!

next egret
#

Any help on why my bot (working for years just fine) connects to a voice channel but fails on the vc.play() command? Error is not connected to voice for some reason

cinder mica
#

we have the same issue stew

cinder mica
#

i haven't installed it yet but yeah

wheat tiger
#

Currently I am initializing the lavalink client on_ready event

#

this works but every time I need to access self.client.lavalink ourside of this function I won't get type annotations

#

lavalink.py docs (examples) says to do like this

#

But when the cog is loaded the client isn't ready due to which we can't access the client.id, thus throws error

#

Any fix for this?

fresh sierra
#

if you want to have it on ur bot attr

#

on my side i dont really do that, i just have a function get player that vie me the current player

wheat tiger
#

it was the lavalink node initialization

#

where add a node

wheat tiger
#

@fresh sierra?

fresh sierra
#

Thatโ€™s ur question ?

wheat tiger
fresh sierra
#

In which Iโ€™m putting this

wheat tiger
fresh sierra
wheat tiger
#

but

#

when u run the function for the player

#

du get the typehints?

fresh sierra
#

Also using cast

wheat tiger
fresh sierra
#

I donโ€™t get many player

wheat tiger
#

Is there any way to change the view emoji from here?

#

And then edit the message with the new view?

#

@fresh sierra?

#

Like some .emoji = "<>"

fresh sierra
#

First you get the view

#

Then you get the item you want

wheat tiger
fresh sierra
#

You should maybe cast this into the item it is and then you will be able to

#

Like
item = view.get_item(ยซpauseย ยป)
button = cast(discord.ui.Button, item)
button.emoji = โ€ฆ
message.edit(view=view)

sage tendon
#

that makes no sense

fresh sierra
#

Im not sure the last thing exist

#

Im not really familiar with v2 component

sage tendon
#

we're not in java, you dont have to cast stuff

fresh sierra
wheat tiger
#

but not title/emoji

sage tendon
#

i think you need to replace it with a new button and edit the view

fresh sierra
wheat tiger
#

it gives discord.Item type

fresh sierra
#

Since for example view does not have a emoji attribute, so by casting it it will typehint it as a button

#

And so you should have then the emoji showing

sage tendon
#

not necessary and also doesnt solve the issue

fresh sierra
sage tendon
fresh sierra
#

...

sage tendon
#

and why does that matter? it doesnt

fresh sierra
#

he also wants the typehint, by doing ur thing he will not have it

sage tendon
#

they never asked for that

#

they just want to change the emoji

fresh sierra
#

@wheat tiger do you want to also have the autocomplete for emoji ?

#

i might have misunderstandood ur requests

torn barn
#

just obtaining the item and setting the attribute works

#

no need to replace on the view

sage tendon
#

oh wait they never sent the view they're editing it before sending

#

yea then its easy

torn barn
#

even if sent they don't need to replace it lol

lapis dock
#

^ just edit the message afterwards

sage tendon
#

yea but they'd need to at least edit the message with the then changed view

fresh sierra
sage tendon
#

why not just view.get_item("pause").emoji = emoji.play_white

#

way shorter

torn barn
#

you still need to manually edit the message

wheat tiger
sage tendon
#

the luma disease

#

sigh

fresh sierra
#

i wish people stop crying for everything

sage tendon
#

yea, like useless type stuff