question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Because it does not work ?

import discord
import asyncio
import random

client = discord.Client()

@client.event
async def on_ready():
    print('BOT')
    print(client.user.name)
    print(client.user.id)
    print('---------------')

@client.event
async def on_member_join(member):
    serverchannel = member.server.default_channel
    msg = "Willkommen {0} auf {1}".format(member.mention, member.server.name)
    await client.send_message(serverchannel, msg)


@client.event
async def on_member_remove(member):
    serverchannel = member.server.default_channel
    msg = "Bye Bye {0}".format(member.mention)
    await client.send_message(serverchannel, msg)


client.run('token')

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

3reactions
LucasCoderTcommented, Feb 7, 2018

.send_message(member,content)

2reactions
Vexscommented, Feb 7, 2018

Sure, but it’s better to just use client.get_channel.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Pylon welcome/leave system - GitHub
Pylon welcome/leave system. To use this module in Pylon, go to the editor, create a new file called welcome-leave.ts , copy the contents...
Read more >
welcome leave by 9 classic round sticker - Zazzle
FREE Design Tool on Zazzle! Shop welcome leave by 9 classic round sticker created by Aminemangaka. Personalize it with photos & text or...
Read more >
Leave WORRIES and BOOTS at Door Funny No Shoes Take
Welcome Leave WORRIES and BOOTS at Door - funny no shoes take off remove your shoes off sign mudroom hallway Printable Sign digital...
Read more >
Jackey&Smith Welcome Mat Welcome Leave Your Worries ...
Material: Durable felt fabric, easy to absorb water to keep the ground more dry, backed with a print backing. Easy to clean dirt...
Read more >
Welcome/Leave by 9pm Towel - the olde farmstead
Welcome/Leave by 9pm Towel. $9.95. 19” x 28”. Default Title. Default Title. Instruction for order. Qty. Add to Cart. Buy now with ShopPayBuy...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found