import discord
from discord.ext import commands
intents = discord.Intents(
messages = True,
guilds = True, reactions = True,
members = True, presences = True
)
bot = commands.Bot(command_prefix = "[", intents = intents)
@bot.event
async def on_ready():
print("Bot ready")
@bot.event
async def on_member_join(member):
print(f"{member} is ___")
@bot.event
async def on_member_remove():
print("xxx")
if member.id == 341212492212600832:
invitelink = discord.TextChannel.create_invite(max_uses=1,unique=True)
await member.send(f"you ___ bro. Here u go {inviteLink}")
bot.run("TOKEN")
Ignoring exception in on_member_remove
Traceback (most recent call last):
File "C:UsersFilbertAppDataLocalPackagesPythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0LocalCachelocal-packagesPython38site-packagesdiscordclient.py", line 343, in _run_event
await coro(*args, **kwargs)
TypeError: on_member_remove() takes 0 positional arguments but 1 was given
question from:
https://stackoverflow.com/questions/65924006/discord-api-exception-error-on-on-member-remove 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…