Template
clean up bot.py
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user