Added the option to disable the messages im not sure if it works. I hope it does

main
supopur 2 years ago
parent 10ab4c34fe
commit 16644a592a

@ -18,6 +18,8 @@ class EssentialCommands(commands.Cog):
@discord.Cog.listener() @discord.Cog.listener()
async def on_member_join(self, member): async def on_member_join(self, member):
# Send a welcome message with an embed to the specified channel # 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_title = esconf['events']['welcome_title']
welcome_message = esconf['events']['welcome_content'] welcome_message = esconf['events']['welcome_content']
welcome_channel = self.bot.get_channel(esconf["events"]['welcome_channel_id']) welcome_channel = self.bot.get_channel(esconf["events"]['welcome_channel_id'])
@ -27,6 +29,8 @@ class EssentialCommands(commands.Cog):
@discord.Cog.listener() @discord.Cog.listener()
async def on_member_remove(self, member): async def on_member_remove(self, member):
# Send a goodbye message with an embed to the specified channel # 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_title = esconf['events']['goodbye_title']
gb_message = esconf['events']['goodbye_content'] gb_message = esconf['events']['goodbye_content']
gb_channel = self.bot.get_channel(esconf["events"]['welcome_channel_id']) gb_channel = self.bot.get_channel(esconf["events"]['welcome_channel_id'])

Loading…
Cancel
Save