Beispiel #1
0
async def on_member_join(member):
    await client.send_message(member, "Welcome %s\nin this Paradies full of naughty things.\n\nDon't fap too much" % (member.name))

    #role = discord.utils.get(member.server.roles, id='592392234922672165')
    role = cmd_autorole.get(member.server, id)                                                                    #idk müsste eigentlich so passen aber der hat wohl probleme beim übergeben der ID(rolen name)
    await client.add_roles(member, role)


    """role = cmd_autorole.get(member.server)
Beispiel #2
0
def on_member_join(member):
    yield from client.send_message(
        member,
        "**Hey %s**\n\nWelcome on the official nice supercool %s discord server from %s\n\nNow have a nice day!"
        % (member.name, member.server.name, member.server.owner.mention))
    with cmd_autorole(member.server) as role:
        if not cmd_autorole.get(role) == None:
            yield from client.add_roles(member, role)
            yield from client.send_message(
                member,
                "You got automatically assigned the role" + role.mention + "!")
Beispiel #3
0
def on_member_join(member):
    serverchannel = discord.Object(STATICS.channelname_Bot_channelforall)
    msg = "Willkommen ⭐{0}⭐ auf **{1}**".format(member.mention,
                                                member.server.name)
    yield from client.send_message(serverchannel, msg)
    yield from client.send_message(
        member,
        "**Hey!** %s \n\nWelcome on the official %s Discord-Server from %s\n\nNow have a nice day!"
        % (member.name, member.server.name, member.server.owner.mention))
    role = cmd_autorole.get(member.server)
    if not role == None:
        yield from client.add_roles(member, role)
        yield from client.send_message(
            member, "You got automatically assigned the role **" + role.name +
            "**!\nA moderator will register you")
Beispiel #4
0
async def on_member_join(member):
    await client.send_message(
        member,
        "**Hey %s!**\n\nWelcome on the official nice super cool *%s* discord server from %s!\n\nIf you want, you can write a little bit about you in the %s channel!\n\nNow have a nice day!"
        % (member.name, member.server.name,
           discord.utils.get(
               member.server.channels,
               id="332163979365580801").mention, member.server.owner.mention))
    role = cmd_autorole.get(member.server)
    if role is not None:
        await client.add_roles(member, role)
        try:
            await client.send_message(
                member, "\n\nYou got automatically assigned the role **" +
                role.name + "**!")
        except Exception:
            await client.send_message(
                member,
                "Sorry, but the bot has no permissions to automatically assing you the role **"
                + role.name + "**.")
            raise Exception
Beispiel #5
0
    async def on_member_join(member):
        global n_server
        f = "FILES/" + "join_message.txt"
        if path.isfile(f):
            with open(f) as f:
                custome_welcome = f.read()
            await client.send_message(member, embed=Embed(color=discord.Color.orange(), description=custome_welcome))

        f = "FILES/" + "additional_join_info.txt"
        if path.isfile(f):
            with open(f) as f:
                custome_welcome_pre = f.read()
                custome_welcome = custome_welcome_pre % (n_server.member_count-3)
            await client.send_message(member, embed=Embed(color=discord.Color.blue(), description=custome_welcome))

        role = cmd_autorole.get(member.server)
        if not role == None:
            await client.add_roles(member, role)
            custome_first_promote="Congratulations!! \n\nYou have been promoted!! \n\nYou are now a part of the %s!!" % role.name
            await client.send_message(member,embed=Embed(color=discord.Color.green(), description=custome_first_promote))

        await special_member_count.check_count(client, n_server, member)