Clear Messages Changes
- Mentioning user ID not name
This commit is contained in:
Logan Cusano
2022-04-09 22:02:04 -04:00
parent 8d090c5c67
commit 8af7a70b65

View File

@@ -11,7 +11,8 @@ class ClearMessages(commands.Cog):
@commands.command()
async def clear(self, ctx, amount=0):
member = ctx.author.display_name
mtn_member = f"<@{member}>"
member_id = ctx.author.id
mtn_member = f"<@{member_id}>"
LOGGER.info(f"Clear {amount} messages requested by {member}")
authors = {}
@@ -26,7 +27,7 @@ class ClearMessages(commands.Cog):
LOGGER.debug(f"Deleted {sum(authors.values())} messages from {ctx.message.channel}")
for author in authors.keys():
msg += f"\t{author}: {authors[author]}"
msg += f"\t{author}: {authors[author]}\n"
LOGGER.debug(f"Deleted {authors[author]} messages from {author}")
await ctx.channel.send(msg)