I am new to Python as well as StackOver flow. I am coding a Discord Bot for my Guild. I first feature I want to add was sending a Welcome Message in a Specific Channel. I coded it and when running I got no error...but when someone is joining my Server, no message was send by the bot.
Here's my code:
from discord.ext import commands
import discord
bot = commands.Bot(command_prefix='-')
TOKEN = '<Bot Token>'
@bot.event
async def on_ready():
print("Succesfully logged in as {0.user}".format(bot))
@bot.event
async def on_memeber_join(member):
try:
channel = bot.get_channel(<Channel ID>)
await channel.message.send(
'Welcome to PRIME CLUB {0.mention}'.format(member))
except Exception as e:
print(e)
bot.run(TOKEN)
Please Help me in correcting my Mistakes... Thanks in adavnce