请帮帮我 我尝试了很多,但它不起作用
@bot.event
async def on_voice_state_update(member, before, after):
notifchannel = 702241043810353332
channel = before.channel or after.channel
if channel.id == 677216062013440030:
if before.channel is None and after.channel is not None:
await notifchannel.send("...")
答案 0 :(得分:0)
您需要通过
获取频道对象notifchannel = member.guild.get_channel(702241043810353332)
而不是在频道 ID 上调用函数 send()
。