simple fix for when discord invalidates the token and the bot just ends up restarting
This commit is contained in:
parent
d2771dc14e
commit
5e3d10ac3e
1 changed files with 4 additions and 1 deletions
5
bot.py
5
bot.py
|
@ -24,7 +24,7 @@ from modules.version import *
|
|||
|
||||
print(splashtext) # you can use https://patorjk.com/software/taag/ for 3d text or just remove this entirely
|
||||
check_for_update()
|
||||
|
||||
launched = None
|
||||
|
||||
def check_resources():
|
||||
resources = {
|
||||
|
@ -114,6 +114,8 @@ used_words = set()
|
|||
async def on_ready():
|
||||
|
||||
folder_name = "cogs"
|
||||
if launched == True:
|
||||
pass
|
||||
if not os.path.exists(folder_name):
|
||||
os.makedirs(folder_name)
|
||||
print(f"{GREEN}{get_translation(LOCALE, 'folder_created').format(folder_name=folder_name)}{RESET}")
|
||||
|
@ -136,6 +138,7 @@ async def on_ready():
|
|||
if not song:
|
||||
return
|
||||
await bot.change_presence(activity=discord.Activity(type=discord.ActivityType.listening, name=f"{song}"))
|
||||
launched = True
|
||||
|
||||
|
||||
positive_gifs = os.getenv("POSITIVE_GIFS").split(',')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue