feat(commands/voice/clear): add --attachments

This commit is contained in:
Ryan 2025-01-08 14:27:40 -05:00
parent d6150a664f
commit 79fd40a8e3
Signed by: ErrorNoInternet
GPG Key ID: 2486BFB7B1E6A4A3

View File

@ -55,6 +55,12 @@ async def clear(message):
action="store_true", action="store_true",
help="delete messages with reactions", help="delete messages with reactions",
) )
parser.add_argument(
"-A",
"--attachments",
action="store_true",
help="delete messages with attachments",
)
parser.add_argument( parser.add_argument(
"-d", "-d",
"--delete-command", "--delete-command",
@ -96,6 +102,8 @@ async def clear(message):
c.append(m.author.id in i) c.append(m.author.id in i)
if args.reactions: if args.reactions:
c.append(len(m.reactions) > 0) c.append(len(m.reactions) > 0)
if args.attachments:
c.append(len(m.attachments) > 0)
return all(c) return all(c)
messages = len( messages = len(