V3.0 + V3.1 compability (#44)
* Update away.py * Update dungeon.py * V3.0 + V3.1 compability * V3.0 + V3.1 compability * V3.0 + V3.1 compability * V3.0 + V3.1 compability * V3.0 + V3.1 compability * V3.0 + V3.1 compability
This commit is contained in:
@@ -7,6 +7,12 @@ from redbot.core import commands, checks, Config
|
||||
|
||||
BaseCog = getattr(commands, "Cog", object)
|
||||
|
||||
listener = getattr(commands.Cog, "listener", None) # Trusty + Sinbad
|
||||
if listener is None:
|
||||
|
||||
def listener(name=None):
|
||||
return lambda x: x
|
||||
|
||||
|
||||
class AntiPhoneClapper(BaseCog):
|
||||
"""This cog deletes bad GIFs that will crash phone clients."""
|
||||
@@ -67,6 +73,7 @@ class AntiPhoneClapper(BaseCog):
|
||||
tile_sizes.append(im.tile[0][1][2:])
|
||||
return any([x[0] > limit[0] or x[1] > limit[1] for x in tile_sizes])
|
||||
|
||||
@listener()
|
||||
async def on_message(self, m):
|
||||
if not m.attachments:
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user