Пример #1
0
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)
Пример #2
0
async def on_member_join(member):
    # SEND WELCOME CHANNEL
    welcome_message, welcome_channel = Dashboard.send_welcome(
        member, discord), Dashboard.get_welcome_channel(member.guild.id)
    if welcome_message != None and welcome_channel != None:
        await member.guild.get_channel(welcome_channel).send(
            embed=welcome_message)
    data = Dashboard.add_autorole(member.guild.id)
    if data.isnumeric():
        # AUTOROLE
        await member.add_roles(member.guild.get_role(int(data)))
    if member.name.startswith('!'):
        if not Dashboard.getDehoister(member.guild): return
        try:
            await member.edit(nick='Dehoisted user')
        except:
            pass