我已经搜索了很多这个答案,但没有找到。我想使用一个意见建议命令,每当有人用它来建议一个想法时,它都会DM我一个人,也只有我一个人。
您必须使用该send_message
方法。在此之前,您必须找到User
与自己相对应的。
@client.event
async def on_message(message):
# we do not want the bot to reply to itself
if message.author == client.user:
return
# can be cached...
me = await client.get_user_info('MY_SNOWFLAKE_ID')
await client.send_message(me, "Hello!")
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句