#on_member_join not working
1 messages · Page 1 of 1 (latest)
Did you add intents=... in your code?
Yes
what
intents = discord.Intents().all()
intents.presences = True
intents.members = True
enable all intents and add
so like remove
intents.presences = True
intents.members = True
and just use
intents = discord.Intents().all()
If you mean in dev portal, then I already enabled it
okay
Didn't work
btw I'm using slash commands, if it has something to do with it
client = discord.Bot(debug_guilds=['931241793083822080'])
which library u are using
I changed it to client = discord.Bot(debug_guilds=['931241793083822080'], intents=intents) , but it still doesn't work
py-cord
any error
Nope, I'm trying to make a welcome command, I made a command where you can set the channel by using /setwelcome <ch>, and it will set to DB, but whenever someone joins it doesn't even show error in console or smth, I'm sure DB is working, as I checked the DB save data and things
- I have on_member_join
intents = discord.Intents.default()
intents.members = True
intents.presences = True
bot = discord.Bot(intents=intents)
@knotty fern
okay, I'll try this
Not working
I'll send my join event if you want
ok give
@client.event
async def on_member_join(member):
if member.guild.id in settings and 'welcome' in settings[member.guild.id]:
ch = discord.utils.get(member.guild.channels, id = settings[member.guild.id]['welcome'][0])
if ch!=None:
text = settings[member.guild.id]['welcome'][1]
try: text = text.format(name=str(member),mention=member.mention, guild=member.guild.name, membercount=len(member.guild.members))
except: pass
await ch.send(text)
what