mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-21 18:27:59 -05:00
[Cleanup] Add [p]cleanup between (#2617)
* Add `[p]cleanup between` At the moment, only deletes the messages in between, does not delete the messages specified when running the command. * Create converter for message IDs; remove f-strings; use converters in a few extra commands * Sacrifice to the style gods
This commit is contained in:
committed by
Michael H
parent
e3db3c0341
commit
b3850f6bb7
12
redbot/cogs/cleanup/converters.py
Normal file
12
redbot/cogs/cleanup/converters.py
Normal file
@@ -0,0 +1,12 @@
|
||||
from redbot.core.commands import Converter, BadArgument
|
||||
from redbot.core.i18n import Translator
|
||||
|
||||
_ = Translator("Cleanup", __file__)
|
||||
|
||||
|
||||
class RawMessageIds(Converter):
|
||||
async def convert(self, ctx, argument):
|
||||
if argument.isnumeric() and len(argument) >= 17:
|
||||
return int(argument)
|
||||
|
||||
raise BadArgument(_("{} doesn't look like a valid message ID.").format(argument))
|
||||
Reference in New Issue
Block a user