Skip to content

Commit

Permalink
🐛 Bug: Fixed the bug where uploading images could not retrieve text e…
Browse files Browse the repository at this point in the history
…rror when there is NICK.

💻 Code: Change the robot's first message back to "Thinking".
  • Loading branch information
yym68686 committed Jun 14, 2024
1 parent 9fb2d50 commit b91ba4b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
5 changes: 4 additions & 1 deletion bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,8 @@ async def GetMesage(update_message, context):
image_url = None
file_url = None
reply_to_message_text = None
message = None
rawtext = None

chatid = str(update_message.chat_id)
message_thread_id = update_message.message_thread_id
Expand All @@ -121,7 +123,8 @@ async def GetMesage(update_message, context):

image_url = await get_file_url(photo, context)

message = rawtext = CutNICK(update_message.caption, update_message)
if update_message.caption:
message = rawtext = CutNICK(update_message.caption, update_message)

if update_message.document:
file = update_message.document
Expand Down
16 changes: 8 additions & 8 deletions utils/i18n.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,16 +74,16 @@
"en": "Reply message",
"zh-hk": "回覆消息",
},
"message_think": {
"zh": "`...`",
"en": "`...`",
"zh-hk": "`...`",
},
# "message_think": {
# "zh": "`思考中💭`",
# "en": "`thinking💭`",
# "zh-hk": "`思考中💭`",
# "zh": "`...`",
# "en": "`...`",
# "zh-hk": "`...`",
# },
"message_think": {
"zh": "`思考中💭`",
"en": "`thinking💭`",
"zh-hk": "`思考中💭`",
},
"message_banner": {
"zh": "👇 下面可以随时更改默认模型:",
"en": "👇 Change model below:",
Expand Down

0 comments on commit b91ba4b

Please sign in to comment.