Skip to content

Commit

Permalink
Merge pull request #15 from DiscordBotPortalJP/feature/multiple_attac…
Browse files Browse the repository at this point in the history
…hments

複数のattachmentに対応
  • Loading branch information
1ntegrale9 authored May 20, 2021
2 parents 5a397bb + a5e69d6 commit a4dd775
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions dispander/module.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,13 @@ async def dispand(message):
for m in messages:
if m.content or m.attachments:
await message.channel.send(embed=compose_embed(m))
# Send the second and subsequent attachments with embed (named 'embed') respectively:
for attachment in m.attachments[1:]:
embed = Embed()
embed.set_image(
url=attachment.proxy_url
)
await message.channel.send(embed=embed)
for embed in m.embeds:
await message.channel.send(embed=embed)

Expand Down

0 comments on commit a4dd775

Please sign in to comment.