Why does my join message not work?
I'm trying to make it so my bot says a join message in my welcome channel, but it comes up with an error and doesnt work.
The error: Unindent does not match any outer indentation level
@bot.event
async def on_member_join(self, member):
ment = member.mention
await self.bot.get_channel(790977019940175882).send(f"{ment} has joined the server.")
print(f"{member} has joined the server.")
uh, there seems to be no error.
Yeah the error was fixed but it just doesnt work
@RYANTADIPARTHI
@UkDarky it says im alive
@UkDarky the output
So? That's to keep the bot running @RYANTADIPARTHI
Error is exactly what it says. Line 26 is indented with a tab, but 27 and 28 are indented with two spaces. Python hates this, so you need to change then to match each other.
If it still does not work, try enabling intents in the developer dashboard. @UkDarky
Where are intents in the developer dashboard?
@alanchen12
@UkDaUkDarky Try going to your application in the developer dashboard, and enabling intents.
First, go to your app within the developer dashboard.
Then, go to the bot tab.
Finally, scroll down to the intents section and enable intents.

If this helped, mark this as correct!
Should i enable both?
@alanchen12
If you want to, yes, but I think only server members are needed for join leave events @UkDarky
It still doesnt seem to work... maybe it's the code?
@alanchen12
Intents should solve the problem, espically since your code looks correct and you aren't getting errors. Be sure to save before you exit.

@UkDarky