diff --git a/main.py b/main.py index c98d065..5f56ca4 100644 --- a/main.py +++ b/main.py @@ -81,6 +81,7 @@ class Guild: self.modules = [] self.load_config() self.update_modules() + self.save_config() def load_config(self): if self.bot.fileSystem.exists(self.config_file): @@ -211,6 +212,11 @@ class FoBot(discord.Client): async def on_resumed(self): info("foBot is resumed.") + async def on_guild_join(self, guild): + self.load_modules() + self.load_config() + self.save_config() + async def on_error(self, event, *args, **kwargs): error("foBot encounter an error.", exc_info=True) if os.environ.get("DROPBOX_ACCESS_TOKEN", False):