remove instance method
@@ -12,6 +12,8 @@ class ImageConvert:
self.bot = bot
print('Addon "{}" loaded'.format(self.__class__.__name__))
+ async def on_message(self, message):
+ # BMP conversion
def img_convert(self, in_img):
img_obj = Image.open(BytesIO(in_img))
img_out = BytesIO()
@@ -19,8 +21,6 @@ class ImageConvert:
img_out.seek(0)
return img_out
- async def on_message(self, message):
- # BMP conversion
for f in message.attachments:
if f["filename"].lower().endswith('.bmp') and f["size"] <= 600000: # 600kb
async with aiohttp.ClientSession() as session:
