code: ```py
@bot.event
async def on_member_join(member):
db = sqlite3.connect("data.db")
cursor = db.cursor()
cursor.execute(f"SELECT channel_id FROM welcomechannel WHERE server_id={member.guild.id}")
result = cursor.fetchone()
id = channel_id = result[0]
channell = bot.get_channel(id)
await channell.send(f"{member} joined!")````