💩 修复 throwit 部分代码错误

This commit is contained in:
xtaodada 2020-08-12 01:27:33 +08:00
parent a4a41059ff
commit ff56bcb3bd
No known key found for this signature in database
GPG Key ID: EE4DC37B55E24736
2 changed files with 5 additions and 2 deletions

View File

@ -82,7 +82,7 @@
}, },
{ {
"name": "throwit", "name": "throwit",
"version": "1.4", "version": "1.5",
"section": "profile", "section": "profile",
"maintainer": "xtaodada", "maintainer": "xtaodada",
"size": "6.9 kb", "size": "6.9 kb",

View File

@ -110,7 +110,10 @@ async def throwit(context):
diu_round = True diu_round = True
if diu_round: if diu_round:
foreground = foreground.rotate(180) # 对图片进行旋转 foreground = foreground.rotate(180) # 对图片进行旋转
background.paste(foreground, (19, 181), foreground) if randint_r == 1:
background.paste(foreground, (19, 181), foreground)
elif randint_r == 2:
background.paste(foreground, (368, 16), foreground)
background.save('plugins/throwit/throwout.webp') background.save('plugins/throwit/throwout.webp')
target_file = await context.client.upload_file('plugins/throwit/throwout.webp') target_file = await context.client.upload_file('plugins/throwit/throwout.webp')
try: try: