Skip to content

Commit b322d3e

Browse files
committed
🐛 Bug: Fix the bug where Tokens usage reports an error when the API is not set.
1 parent 69c6a92 commit b322d3e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ def update_info_message(user_id = None):
200200
f"**🔑 API:** `{replace_with_asterisk(api_key)}`\n\n" if api_key else "",
201201
f"**🔗 API URL:** `{api_url}`\n\n" if api_url else "",
202202
f"**🛜 WEB HOOK:** `{WEB_HOOK}`\n\n" if WEB_HOOK else "",
203-
f"**🚰 Tokens usage:** `{get_robot(user_id)[0].tokens_usage[str(user_id)]}`\n\n",
203+
f"**🚰 Tokens usage:** `{get_robot(user_id)[0].tokens_usage[str(user_id)]}`\n\n" if get_robot(user_id)[0] else "",
204204
f"**📖 Version:** `{get_version_info()}`\n\n",
205205
])
206206

0 commit comments

Comments
 (0)