【发布时间】:2021-06-15 14:39:54
【问题描述】:
我在确保我的机器人在用户加入服务器时发送消息时遇到了一些问题,我的代码似乎没问题,但它既不发送也不打印任何东西
import discord
from discord.ext import commands
bot = commands.Bot(command_prefix=config.PREFIX, case_insensitive=True)
@bot.event
async def on_member_join(member):
print("a member joined")
await bot.get_channel(851883872186400812).send(f"<@!{member.id}> just joined the server! Welcome and enjoy your stay!")
bot.run(config.TOKEN)
【问题讨论】:
-
这能回答你的问题吗? Discord.py on_member_join not responding
标签: discord discord.py