Im setup discord welcome bot, on python, and this is the error:
File "welcome-bot.py", line 27, in on_member_join await client.send_message(member, newUserMessage) AttributeError: 'Client' object has no attribute 'send_message'
import discord
import asyncio
client=discord.Client()
@client.event
async def on_ready():
print('logged in as')
print(client.user.name)
print(client.user.id)
print('-----')
newUserMessage = """
is
that
works?
"""
@client.event
async def on_member_join(member):
print("Recognised that a member called " + member.name + " joined")
await client.send_message(member, newUserMessage)
print("Sent message to " + member.name)```
Client
do not have this attribute. You should consult the documentation for this library to find out which methods this class provides. – ForceBru