Throw bot config into the bot object.
build

This commit is contained in:
2023-06-17 16:45:30 -04:00
parent bca5b0d84b
commit 52aa4742e5
+2 -1
View File
@@ -28,6 +28,7 @@ def main(cfg: DakinyConfig):
# intents.members = True
bot = commands.Bot(intents=intents)
bot.config = cfg
# Get the modules of all cogs whose directory structure is ./cogs/<module_name>
for folder in os.listdir("cogs"):
@@ -40,7 +41,7 @@ def main(cfg: DakinyConfig):
print(f"{bot.user.name} has connected to Discord!")
# Run Discord bot
bot.run(cfg.params.discord_token)
bot.run(bot.config.params.discord_token)
if __name__ == "__main__":