gpt4 book ai didi

discord - 如何获取运行交互的用户

转载 作者:行者123 更新时间:2023-12-05 01:25:57 26 4
gpt4 key购买 nike

我已经为此搜索了一段时间,但似乎找不到答案。有谁知道如何获取运行交互昵称、用户名和用户 ID 的用户?谢谢。

最佳答案

您可以使用 user/member Interaction 的属性.

client.on('interactionCreate', async interaction => {
// Making sure the interaction is a command
if (!interaction.isCommand()) return false;

await interaction.reply(`Hello, ${interaction.user.tag}!`)
})

关于discord - 如何获取运行交互的用户,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/70579435/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com