Compare commits
No commits in common. "fe4d8a77d3c62c592eed771fb4b36491bfdf7e4a" and "19563e734f5de2b262a35b709d1a372a7c183873" have entirely different histories.
fe4d8a77d3
...
19563e734f
|
@ -160,5 +160,4 @@ cython_debug/
|
||||||
#.idea/
|
#.idea/
|
||||||
|
|
||||||
config.py
|
config.py
|
||||||
*.session
|
bot.session
|
||||||
*.session-*
|
|
||||||
|
|
5
bot.py
5
bot.py
|
@ -77,8 +77,7 @@ async def handler(ev):
|
||||||
|
|
||||||
# Limit stickers ratio (so people don't print incredibly long stickers)
|
# Limit stickers ratio (so people don't print incredibly long stickers)
|
||||||
if img.size[1]/img.size[0] > MAX_ASPECT_RATIO:
|
if img.size[1]/img.size[0] > MAX_ASPECT_RATIO:
|
||||||
await ev.respond(RATIO_ERR_MSG)
|
return ev.respond(RATIO_ERR_MSG)
|
||||||
return
|
|
||||||
|
|
||||||
# Remove transparency
|
# Remove transparency
|
||||||
if img.mode == 'RGBA':
|
if img.mode == 'RGBA':
|
||||||
|
@ -96,8 +95,6 @@ async def handler(ev):
|
||||||
|
|
||||||
img.save(IMAGE_PATH, 'PNG')
|
img.save(IMAGE_PATH, 'PNG')
|
||||||
|
|
||||||
await client.forward_messages(ADMIN_ID, ev.message)
|
|
||||||
|
|
||||||
status_code = system(PRINT_COMMAND)
|
status_code = system(PRINT_COMMAND)
|
||||||
if status_code == 0:
|
if status_code == 0:
|
||||||
print_log[ev.peer_id.user_id] = time()
|
print_log[ev.peer_id.user_id] = time()
|
||||||
|
|
Loading…
Reference in New Issue