#sending multiple msgs with different name, avatar based on list on 1 request

1 messages · Page 1 of 1 (latest)

dusty sigil
#

i wanna send multiple messages without overwhelming the API. Like take example

# 5 requests
possibleList = [["name", "avatar_url"], ["name2", "avatar_url2"], ["name", "avatar_url"], ["name", "avatar_url"], ["name2", "avatar_url2"]]
for index, [name, url] in enumerate(possibleList)
   await webhook.send(f"count: {i + 1}", avatar_url = url, username = name)

i want to bulk send messages with sometimes even different avatars and display names, example can be

# 1 request
possibleList = [["name", "avatar_url"], ["name2", "avatar_url2"], ["name", "avatar_url"], ["name", "avatar_url"], ["name2", "avatar_url2"]]
await webhook.bulk_send(possibleList)

This is purely a example, but you get the premise

#

sending multiple msgs with different name, avatar based on list on 1 request

zenith geyser
#

you shouldn't care about ratelimits, the library generally handles that for you

dusty sigil
#

well

#

i kinda have a list of about 100 messages

#

and i wanna send them

#

these can be very different from each other

#

the author who wrote

#

and etc....

zenith geyser
#

there's nothing known as "bulk send" or similar

dusty sigil
#

can it be developed on pycord or nah?

zenith geyser
#

it doesn't matter if you send them all at once. You still get ratelimited

dusty sigil
#

oh

#

well then whats the best practices i can do

#

for sending multiple messages

#

in a small amount of time

zenith geyser
#

what is your use case anyways?

novel holly
dusty sigil
#

currently with messages on like the snapshots

#

for recreating it takes 2 minutes and 39 seconds

#

which i wanna reduce it bc most is sending messages

#

i got one solution i can try

#

and thats checking the next message

#

and defining the breakpoint

#

a breakpoint is when the messages split

dusty sigil
#

or long time duration

#

and for those messages i could chunk em

#

like see how my user

#

is 3

#

so by chunking i could do

yes
currently with messages on like the snapshots
for recreating it takes 2 minutes and 39 seconds
which i wanna reduce it bc most is sending messages

instead of

yes
currently with messages on like the snapshots
for recreating it takes 2 minutes and 39 seconds
which i wanna reduce it bc most is sending messages
#

but at expense of the saving process performance

#

and a lil performance

#

this should improve massively performance

#

theoritically

#

so chunking

#

but i have to run it sync and not async

#

which creates a problem in of itself

stark ridge
#

I think you could still run that async, no?

#

loop through all the messages you have saved in your snapshot before sending them and group messages sent by the same author?

dusty sigil
#

well

#

ok

zenith geyser
#

Closing for now. If this isn't solved, feel free to reopen. If a different issue pops up, feel free to open a new thread!