Clear Messages Changes
- Added help message
This commit is contained in:
Logan Cusano
2022-04-09 22:09:24 -04:00
parent bfb049e268
commit dcf0de8351

View File

@@ -8,7 +8,12 @@ class ClearMessages(commands.Cog):
def __init__(self, bot):
self.Bot = bot
@commands.command()
@commands.command(name='displayprofiles',
help="Use this command to clear a given number of messages from the channel it is called in.\n"
"Example command:\n"
"\t@ clear\n"
"\t@ clear 10",
breif="Clear x messages in the channel it's called in")
async def clear(self, ctx, amount=2):
member = ctx.author.display_name
member_id = ctx.author.id
@@ -24,7 +29,7 @@ class ClearMessages(commands.Cog):
authors[message.author] += 1
await message.delete()
msg = f"{mtn_member}, I deleted {sum(authors.values())} messages\n"
msg = f"{mtn_member}, I deleted {sum(authors.values())} messages from {len(authors.keys())} users:\n"
LOGGER.debug(f"Deleted {sum(authors.values())} messages from {ctx.message.channel}")
for author in authors.keys():