async def on_member_remove(member): # REMOVE ALL WARNS Dashboard.clearWarn(member) # SEND GOODBYE CHANNEL goodbye_message, goodbye_channel = Dashboard.send_goodbye( member, discord), Dashboard.get_welcome_channel(member.guild.id) if goodbye_message != None and goodbye_channel != None: await member.guild.get_channel(goodbye_channel).send( embed=goodbye_message)
async def unwarn(self, ctx): if not ctx.author.guild_permissions.manage_messages: return await ctx.send(f'{str(self.client.get_emoji(BotEmotes.error))} | You need the `Manage messages` permissions to unwarn someone.') if len(ctx.message.mentions)==0: return await ctx.send('{} | Please TAG someone !!!'.format( str(self.client.get_emoji(BotEmotes.error)) )) unwarned = Dashboard.clearWarn(ctx.message.mentions[0]) if unwarned: return await ctx.send(f'{str(self.client.get_emoji(BotEmotes.success))} | Successfully unwarned {ctx.message.mentions[0].name}.') await ctx.send(f'{str(self.client.get_emoji(BotEmotes.error))} | An error occurred.')