diff --git a/leaver/leaver.py b/leaver/leaver.py index 6684a4a..9fa5542 100644 --- a/leaver/leaver.py +++ b/leaver/leaver.py @@ -5,7 +5,9 @@ from redbot.core.commands import Context class Leaver: - """Creates a goodbye message when people leave""" + """ + Creates a goodbye message when people leave + """ def __init__(self, bot): self.bot = bot @@ -29,12 +31,12 @@ class Leaver: await self.config.guild(guild).channel.set(ctx.channel.id) await ctx.send("Channel set to " + ctx.channel.name) - async def when_leave(self, member: discord.Member): - server = member.guild - channel = await self.config.guild(server).channel() + async def on_member_remove(self, member: discord.Member): + guild = member.guild + channel = await self.config.guild(guild).channel() if channel != '': - channel = server.get_channel(channel) + channel = guild.get_channel(channel) await channel.send(str(member) + "(*" + str(member.nick) + "*) has left the server!") else: pass diff --git a/nudity/nudity.py b/nudity/nudity.py index 7df64f1..1f6bf92 100644 --- a/nudity/nudity.py +++ b/nudity/nudity.py @@ -19,17 +19,12 @@ class Nudity: def __init__(self, bot: Red): self.bot = bot self.config = Config.get_conf(self, identifier=9811198108111121, force_registration=True) - default_global = {} + default_guild = { "enabled": True } - default_member = { - "seen": None - } - self.config.register_global(**default_global) self.config.register_guild(**default_guild) - self.config.register_member(**default_member) @staticmethod def get_date_time(s):