mirror of
https://github.com/RYGhub/royalnet.git
synced 2024-11-27 13:34:28 +00:00
log imgur errors
This commit is contained in:
parent
7eff7f4880
commit
be75d0afe3
2 changed files with 2 additions and 2 deletions
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
[tool.poetry]
|
[tool.poetry]
|
||||||
name = "royalpack"
|
name = "royalpack"
|
||||||
version = "5.13.8"
|
version = "5.13.9"
|
||||||
description = "A Royalnet command pack for the Royal Games community"
|
description = "A Royalnet command pack for the Royal Games community"
|
||||||
authors = ["Stefano Pigozzi <ste.pigozzi@gmail.com>"]
|
authors = ["Stefano Pigozzi <ste.pigozzi@gmail.com>"]
|
||||||
license = "AGPL-3.0+"
|
license = "AGPL-3.0+"
|
||||||
|
|
|
@ -26,7 +26,7 @@ async def to_imgur(imgur_api_key, photosizes: List[telegram.PhotoSize], caption=
|
||||||
}) as request:
|
}) as request:
|
||||||
response = await request.json()
|
response = await request.json()
|
||||||
if not response["success"]:
|
if not response["success"]:
|
||||||
raise rc.CommandError("Imgur returned an error in the image upload.")
|
raise rc.CommandError(f"Imgur returned an error in the image upload: {response}")
|
||||||
return response["data"]["link"]
|
return response["data"]["link"]
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue