Skip to content

Commit

Permalink
fix error on incorrect bot token
Browse files Browse the repository at this point in the history
  • Loading branch information
jakbin committed Jan 11, 2024
1 parent 0c79b92 commit d3f5639
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion tl_bot/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.0.7"
__version__ = "0.0.8"
4 changes: 2 additions & 2 deletions tl_bot/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,14 +81,14 @@ def verify_token(bot_token: str):
if verify_data['ok'] == True:
return True, verify_data["result"]["username"]
elif verify_data['ok'] == False:
return False
return False, None

def test_token(bot_token: str):
is_token_correct, bot_name = verify_token(bot_token)
if is_token_correct:
print(f'Bot Token is correct and Bot username is {bot_name}.')
else:
print(f'Bot Token is wrong.')
print(f'Bot Token is incorrect.')

def upload_url(bot_token: str) -> str:
config = configparser.ConfigParser()
Expand Down

0 comments on commit d3f5639

Please sign in to comment.