mirror of
https://github.com/RYGhub/royalnet.git
synced 2024-11-23 19:44:20 +00:00
Don't send more than 5 embeds at a time in the bot chat
This commit is contained in:
parent
d5e38ae29a
commit
8560f850eb
2 changed files with 7 additions and 3 deletions
|
@ -69,12 +69,14 @@ class DiscordLazyPlayEvent(rc.Event):
|
|||
await main_channel.send(rsd.escape(f"▶️ {user} ha aggiunto {len(added)} file _(lazy)_ alla coda:"))
|
||||
else:
|
||||
await main_channel.send(rsd.escape(f"▶️ Aggiunt{'o' if len(added) == 1 else 'i'} {len(added)} file "
|
||||
f"_(lazy)_ alla coda:"))
|
||||
for ytd in added:
|
||||
f"[i](lazy)[/i] alla coda:"))
|
||||
for ytd in added[:5]:
|
||||
embed: discord.Embed = ytd.embed()
|
||||
if force_color:
|
||||
embed._colour = discord.Colour(force_color)
|
||||
await main_channel.send(embed=embed)
|
||||
if len(added) > 5:
|
||||
await main_channel.send(f"e altri {len(added) - 5}!")
|
||||
|
||||
if len(too_long) > 0:
|
||||
if user:
|
||||
|
|
|
@ -72,11 +72,13 @@ class DiscordPlayEvent(rc.Event):
|
|||
else:
|
||||
await main_channel.send(rsd.escape(f"▶️ Aggiunt{'o' if len(added) == 1 else 'i'} {len(added)} file alla"
|
||||
f" coda:"))
|
||||
for ytd in added:
|
||||
for ytd in added[:5]:
|
||||
embed: discord.Embed = ytd.embed()
|
||||
if force_color:
|
||||
embed._colour = discord.Colour(force_color)
|
||||
await main_channel.send(embed=embed)
|
||||
if len(added) > 5:
|
||||
await main_channel.send(f"e altri {len(added) - 5}!")
|
||||
|
||||
if len(too_long) > 0:
|
||||
if user:
|
||||
|
|
Loading…
Reference in a new issue