gpt4 book ai didi

node.js - Discord.JS v13 开始输入和停止输入

转载 作者:行者123 更新时间:2023-12-03 08:10:27 26 4
gpt4 key购买 nike

我如何在 Discord.JS v13 中模拟输入 例如:机器人正在输入.. 我知道,在 Discord.JS v12 中您可以轻松使用 msg.channel.startTyping()msg.channel.stopTyping(),但我没有找到任何适用于 v13 的结果。

最佳答案

使用:<channel>.sendTyping()

此方法会在 10 秒后或发送消息时自动停止输入。

使用示例:

await message.channel.sendTyping();
await message.channel.send("Hello World!");

关于node.js - Discord.JS v13 开始输入和停止输入,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/71000344/

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