This post has been de-listed
It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.
class MyClient(discord.Client):
async def on_ready(self):
print('Logged in as', self.user)
#checks msges
async def on_message(self, message):
guild = client.get_guild(878268979376980079)
for member in list(guild.members):
id =
member.id
if id == [the bots ID]:
print("self identified")
else:
user = client.fetch_user(id)
nick = member.display_name
if "[word]" in casefold(user) or "[word]" in casefold(nick):
await member.ban(reason="DOOM stan")
channel1 = [channel to send announcement to]
message.channel1.send(nick " has been banned")
It just prints "self identified" and doesn't ban anyone. I think it's stopping checking users when it finds itself, as its one of the top in the server list. Any ways to fix this?
Subreddit
Post Details
- Posted
- 1 year ago
- Reddit URL
- View post on reddit.com
- External URL
- reddit.com/r/Discord_Bot...