Multiple images in the message deletion embed
This commit is contained in:
parent
5594b89e37
commit
a03db533f1
@ -7,14 +7,18 @@ class Logger(commands.Cog):
|
|||||||
|
|
||||||
@commands.Cog.listener()
|
@commands.Cog.listener()
|
||||||
async def on_message_delete(self, msg: nextcord.Message):
|
async def on_message_delete(self, msg: nextcord.Message):
|
||||||
embed = nextcord.Embed(
|
embedlist = []
|
||||||
|
embedlist[0] = nextcord.Embed(
|
||||||
title="Message delete",
|
title="Message delete",
|
||||||
description=msg.content
|
description=msg.content,
|
||||||
|
url="https://entarapi.xyz"
|
||||||
)
|
)
|
||||||
embed.set_author(name=msg.author.name)
|
embedlist.set_author(name=msg.author.name)
|
||||||
for image in msg.attachments:
|
for image in msg.attachments:
|
||||||
embed.set_image(image.url) # Unfortunately i cant add multiple images.
|
newembed = nextcord.Embed(url="https://entarapi.xyz")
|
||||||
await SquogMod.send(embed=embed)
|
newembed.set_image(image.url) # Unfortunately i cant add multiple images.
|
||||||
|
embedlist.append(newembed)
|
||||||
|
await SquogMod.send(embeds=embedlist)
|
||||||
|
|
||||||
@commands.Cog.listener()
|
@commands.Cog.listener()
|
||||||
async def on_command(self, ctx: commands.Context):
|
async def on_command(self, ctx: commands.Context):
|
||||||
|
1
main.py
1
main.py
@ -12,7 +12,6 @@ SquogMod = None
|
|||||||
|
|
||||||
for filename in os.listdir('./commands'):
|
for filename in os.listdir('./commands'):
|
||||||
if filename.endswith('.py'):
|
if filename.endswith('.py'):
|
||||||
print(filename)
|
|
||||||
client.load_extension(f'commands.{filename[:-3]}')
|
client.load_extension(f'commands.{filename[:-3]}')
|
||||||
|
|
||||||
for filename in os.listdir("./events"):
|
for filename in os.listdir("./events"):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user