Ask coding questions

← Back to all posts
How can i made my bot welcome/goobye people?
neagregg (0)

How can i made my bot welcome/goobye people?

Comments
hotnewtop
JohnBarnhart (11)

Try this:

@bot.event
async def on_member_join(member):
    channel = discord.utils.get(member.guild.channels, name='the name of the channel')
    await channel.send(f'Enjoy your stay {member.mention}!')
LukeWright (114)

do you mean something like "if someone says hi, then respond with hi"?

LukeWright (114)

If so, you would need something like:

if message.author != client.user:
 if message.content.startswith("Hi" or "hi"):
  await message.channel.send("Hi")