I'm trying to create a discord self bot #157167
Replies: 4 comments 2 replies
-
what language do you use |
Beta Was this translation helpful? Give feedback.
-
What problems? can you how your code? |
Beta Was this translation helpful? Give feedback.
-
import discord Enable intents for member eventsintents = discord.Intents.default() TOKEN = "MyToken" Pass the intents when creating the clientclient = discord.Client(intents=intents) @client.event @client.event
client.run(TOKEN) When a bot joins a server, it doesn't automatically have access to post in channels. The updated code checks if your bot has permission to send messages in your alert channel and warns you if it doesn't. Make sure your bot has the proper permissions in all servers it joins, and enable the "Server Members Intent" in the Discord Developer Portal. |
Beta Was this translation helpful? Give feedback.
-
Creating a self-bot for Discord is explicitly against Discord's Terms of Service (Discord Developer Policy), and using one risks account termination. However, assuming this is purely for educational purposes, here’s why your current approach fails and potential workarounds: Why It’s Not Working To detect on_member_join events in servers you don’t own, your account needs the View Audit Log permission in those servers. Most servers restrict this permission to admins/moderators. Self-bots (user accounts) cannot request privileged intents like GUILD_MEMBERS, which are required to track member joins globally. Discord API Restrictions: User accounts (self-bots) are rate-limited and restricted from accessing certain events. Discord’s API intentionally blocks non-bot accounts from receiving real-time member updates in servers where they lack permissions. Possible Workarounds
python
Pros: Legal, reliable, and scalable. Cons: Requires server admins to invite the bot to their servers (you can’t monitor servers where the bot isn’t added).
python
Limitations: High rate-limit risk, no details about the new member.
python
Limitations: Only works in servers where you have admin permissions. |
Beta Was this translation helpful? Give feedback.
-
Body
Educational purposes only
I'm trying to create a discord self bot that automatically detects whenever any new member joins any server am in and sends an alert to my channel in my own server but I've been having problems, please any help?
Guidelines
Beta Was this translation helpful? Give feedback.
All reactions