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

标签 node.js discord discord.js

我如何在 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/

相关文章:

node.js - 放置在 Sequelize 中的 WHERE 子句中的值,PostgreSQL 以获取所有内容

python - 我正在与在 discord.py 中具有一定角色的 dming 成员作斗争

javascript - 为用户添加 channel 权限

javascript - 是否可以从 Discord.js 中的 react 收集器获取用户?

javascript - 编辑嵌入在 Discord Music Bot 中的 'Now Playing'

javascript - 使用 Node.js 从 MySQL 数据库进行 Ext js 树延迟加载

node.js - Node 光纤会破坏 Node 域吗?

jquery - 如何在 Electron 中使用 fs 保存 PDF 文件?

typescript - Discord.js 指南 : Property 'commands' does not exist on type 'Client<boolean>' in Typescript

javascript - 禁止/踢出命令在使用时崩溃