diff --git a/commands.py b/commands.py index 2268941..bcde8bb 100644 --- a/commands.py +++ b/commands.py @@ -18,6 +18,8 @@ class EssentialCommands(commands.Cog): @discord.Cog.listener() async def on_member_join(self, member): # Send a welcome message with an embed to the specified channel + if not esconf["events"]["welcome_enabled"]: + return 0 welcome_title = esconf['events']['welcome_title'] welcome_message = esconf['events']['welcome_content'] welcome_channel = self.bot.get_channel(esconf["events"]['welcome_channel_id']) @@ -27,6 +29,8 @@ class EssentialCommands(commands.Cog): @discord.Cog.listener() async def on_member_remove(self, member): # Send a goodbye message with an embed to the specified channel + if not esconf["events"]["goodbye_enabled"]: + return 0 gb_title = esconf['events']['goodbye_title'] gb_message = esconf['events']['goodbye_content'] gb_channel = self.bot.get_channel(esconf["events"]['welcome_channel_id'])