1
0
Fork 0

Compare commits

..

No commits in common. "a6c4de8e2c218507fa82580d0204a333d346cfe5" and "cd4ac2d3aaff0bfaf8b8779c5da61285c3bc07a3" have entirely different histories.

3 changed files with 2 additions and 7 deletions

3
.gitignore vendored
View File

@ -160,5 +160,4 @@ cython_debug/
#.idea/
config.py
*.session
*.session-*
bot.session

View File

@ -10,7 +10,6 @@ Currently, you can set any command to print your sticker (by default brother_ql
* [MCH2022](https://mch2022.org)
* [BornHack (2023)](https://bornhack.dk/bornhack-2023)
* [Chaos Communication Camp (2023)](https://events.ccc.de/camp/2023/infos/index.html)
* [37th Chaos Communication Congress (2023)](https://events.ccc.de/congress/2023/infos/startpage.html)
**Running it at your con? Add it with a pull request! :D**

5
bot.py
View File

@ -77,8 +77,7 @@ async def handler(ev):
# Limit stickers ratio (so people don't print incredibly long stickers)
if img.size[1]/img.size[0] > MAX_ASPECT_RATIO:
await ev.respond(RATIO_ERR_MSG)
return
return ev.respond(RATIO_ERR_MSG)
# Remove transparency
if img.mode == 'RGBA':
@ -96,8 +95,6 @@ async def handler(ev):
img.save(IMAGE_PATH, 'PNG')
await client.forward_messages(ADMIN_ID, ev.message)
status_code = system(PRINT_COMMAND)
if status_code == 0:
print_log[ev.peer_id.user_id] = time()