mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-06 03:08:55 -05:00
Added warning
This commit is contained in:
parent
e73e1f38d2
commit
c45acb65ca
6
red.py
6
red.py
@ -1449,6 +1449,12 @@ async def cleanup(message):
|
|||||||
errorMsg = "`!cleanup [number] !cleanup [name/mention] [number]`"
|
errorMsg = "`!cleanup [number] !cleanup [name/mention] [number]`"
|
||||||
if isMemberAdmin(message):
|
if isMemberAdmin(message):
|
||||||
if canDeleteMessages(message):
|
if canDeleteMessages(message):
|
||||||
|
try:
|
||||||
|
async for x in client.logs_from(message.channel, limit=1):
|
||||||
|
pass
|
||||||
|
except TypeError:
|
||||||
|
logger.error("Your discord.py is outdated. Update it to use cleanup.")
|
||||||
|
return False
|
||||||
msg = message.content.split()
|
msg = message.content.split()
|
||||||
if len(msg) == 2:
|
if len(msg) == 2:
|
||||||
if msg[1].isdigit():
|
if msg[1].isdigit():
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user