Captain D. Ezio commited on
Commit
89101b4
·
1 Parent(s): cff0172

Update stickers.py

Browse files
Files changed (1) hide show
  1. Powers/plugins/stickers.py +6 -0
Powers/plugins/stickers.py CHANGED
@@ -123,6 +123,7 @@ async def kang(c:Gojo, m: Message):
123
  return
124
  else:
125
  path = await m.reply_to_message.download()
 
126
  sticker = await create_sticker(
127
  await upload_document(
128
  c, path, m.chat.id
@@ -137,6 +138,9 @@ async def kang(c:Gojo, m: Message):
137
  ),
138
  sticker_emoji
139
  )
 
 
 
140
  except ShortnameOccupyFailed:
141
  await m.reply_text("Change Your Name Or Username")
142
  return
@@ -248,6 +252,8 @@ async def kang(c:Gojo, m: Message):
248
  except Exception as e:
249
  await msg.delete()
250
  await m.reply_text(f"Error occured\n{e}")
 
 
251
  return
252
 
253
 
 
123
  return
124
  else:
125
  path = await m.reply_to_message.download()
126
+ path = await resize_file_to_sticker_size(path)
127
  sticker = await create_sticker(
128
  await upload_document(
129
  c, path, m.chat.id
 
138
  ),
139
  sticker_emoji
140
  )
141
+ else:
142
+ await m.reply_text("Unsupported media file...")
143
+ return
144
  except ShortnameOccupyFailed:
145
  await m.reply_text("Change Your Name Or Username")
146
  return
 
252
  except Exception as e:
253
  await msg.delete()
254
  await m.reply_text(f"Error occured\n{e}")
255
+ LOGGER.error(e)
256
+ LOGGER.error(format_exc())
257
  return
258
 
259