🐛 sticker 增加无法正确连接服务器的报错

This commit is contained in:
xtaodada 2020-08-14 22:49:18 +08:00
parent 4cbacddda9
commit a73f289bde
No known key found for this signature in database
GPG Key ID: EE4DC37B55E24736

View File

@ -89,6 +89,9 @@ async def sticker(context):
response = request.urlopen(
request.Request(f'http://t.me/addstickers/{pack_name}'))
if not response.status == 200:
await context.edit("连接到 Telegram 服务器失败 . . .")
return
http_response = response.read().decode("utf8").split('\n')
if " A <strong>Telegram</strong> user has created the <strong>Sticker&nbsp;Set</strong>." not in \