clean up bot.py

This commit is contained in:
2023-09-08 16:46:22 -04:00
parent f1db18a038
commit 01894831b2
+8 -1
View File
@@ -21,6 +21,13 @@ logger.addHandler(handler)
@hydra.main(config_path="conf", config_name="config")
def main(cfg: BotConfig):
"""
Main function for the bot. Sets config, intents, then connects the bot to discord.
Args:
cfg (BotConfig): The local configs to use.
"""
# Allows privledged intents for monitoring members joining, roles editing, and role assignments
# These need to be enabled in the developer portal as well
intents = nextcord.Intents.default()
@@ -32,7 +39,7 @@ def main(cfg: BotConfig):
# intents.guilds = True
# To enable the members priveleged intent:
intents.members = True
# intents.members = True
bot = commands.Bot(intents=intents)
bot.config = cfg