+2
-1
@@ -28,6 +28,7 @@ def main(cfg: DakinyConfig):
|
|||||||
# intents.members = True
|
# intents.members = True
|
||||||
|
|
||||||
bot = commands.Bot(intents=intents)
|
bot = commands.Bot(intents=intents)
|
||||||
|
bot.config = cfg
|
||||||
|
|
||||||
# Get the modules of all cogs whose directory structure is ./cogs/<module_name>
|
# Get the modules of all cogs whose directory structure is ./cogs/<module_name>
|
||||||
for folder in os.listdir("cogs"):
|
for folder in os.listdir("cogs"):
|
||||||
@@ -40,7 +41,7 @@ def main(cfg: DakinyConfig):
|
|||||||
print(f"{bot.user.name} has connected to Discord!")
|
print(f"{bot.user.name} has connected to Discord!")
|
||||||
|
|
||||||
# Run Discord bot
|
# Run Discord bot
|
||||||
bot.run(cfg.params.discord_token)
|
bot.run(bot.config.params.discord_token)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|||||||
Reference in New Issue
Block a user