feat(commands/voice/clear): add --attachments
This commit is contained in:
@@ -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(
|
||||||
|
Reference in New Issue
Block a user