First off, I tried googling this and could never really find an answer so here I am on stackoverflow. So, I'm trying to add a greeting effect to my discord bot but can't seem to be able to send a message. I know the bot isn't sending the message because "message" is not defined when using message.channel.send but I don't know the correct way to do so.

Error:

```
Traceback (most recent call last):
  File "C:\Users\Me\AppData\Local\Programs\Python\Python36\lib\site-packages\discord\client.py", line 312, in _run_event
    await coro(*args, **kwargs)
  File "<string>", line 20, in on_member_join
NameError: name 'message' is not defined`)

```

```py
import discord

bot = discord.Client() 

@bot.event
async def on_ready():
    print('Logged in')
    print("Username: %s" % (bot.user.name))
    print("Userid: %s" % (bot.user.id))

@bot.event
async def on_member_join(member):
    print(f'{member} has joined the server')
    await message.channel.send('{member} has joined the server'.format(message))

@bot.event
async def on_member_remove(member):
    print(f'{member} has left the server')
    await message.channel.send('{member} has left the server'.format(message))

bot.run(Token)

```