We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3954b6d commit efbd6ffCopy full SHA for efbd6ff
src/bot/main.py
@@ -61,8 +61,6 @@ async def on_ready():
61
await bot.change_presence(
62
activity=discord.Activity(type=discord.ActivityType.watching, name=f"{PREFIX}help"))
63
64
-
65
-if __name__ == '__main__':
66
# LOADING Extensions
67
bot.remove_command('help') # unload default help message
68
initial_extensions = [
@@ -74,4 +72,11 @@ async def on_ready():
74
72
bot.load_extension(extension, package=__package__)
75
73
76
77
- bot.run(TOKEN)
+def start_bot(token=None):
+ """ Start the bot, takes token, uses token from env if none is given """
+ if token is not None:
78
+ bot.run(token)
79
+ if TOKEN is not None:
80
+ bot.run(TOKEN)
81
+ else:
82
+ logger.error("No token was given! - Exiting")
0 commit comments