From 16644a592a6d05041f2a6efaa38ba437eb50cdf0 Mon Sep 17 00:00:00 2001 From: supopur Date: Sat, 18 Mar 2023 10:14:57 +0100 Subject: [PATCH] Added the option to disable the messages im not sure if it works. I hope it does --- commands.py | 4 ++++ 1 file changed, 4 insertions(+) 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'])