From 26fd3f14114e61b3bc74ce2cb684532b16bedd3b Mon Sep 17 00:00:00 2001 From: Hamidreza Farzin <60010616+H-VICTOOR@users.noreply.github.com> Date: Tue, 13 Sep 2022 15:22:01 +0430 Subject: [PATCH] Update auth.py --- auth.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/auth.py b/auth.py index 2ecb6aa..fbde40d 100644 --- a/auth.py +++ b/auth.py @@ -3,7 +3,7 @@ import asyncio import time import sqlite3 - +import sys token = input("Enter a token: ") intents = disnake.Intents.all() @@ -27,4 +27,10 @@ async def ping(ctx): pass bot.load_extension("cogs.check") -bot.run(token, reconnect=True) + +try : + bot.run(token, reconnect=True) +except disnake.errors.LoginFailure: + print("login faild please check to correct token(app will be terminated )") + time.sleep(3) + sys.exit()