【问题标题】:Discord.JS v13 start typing and stop typingDiscord.JS v13 开始输入和停止输入
【发布时间】:2022-02-06 01:35:48
【问题描述】:

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

【问题讨论】:

    标签: node.js discord discord.js


    【解决方案1】:

    使用:<channel>.sendTyping()

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

    使用示例:

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

    【讨论】:

    • 我可以手动停止吗?
    • startTyping()、stopTyping() 都被替换为单数<TextChannel>.sendTyping()
    • @abdooo9 stopTyping() 已完全删除。停止输入的唯一方法是发送消息或稍等
    • @MrMythical 我说过:)
    • @jihndoc 如果您能接受我的回答,我将不胜感激 :-),只需单击灰色复选标记。
    猜你喜欢
    • 2021-11-15
    • 1970-01-01
    • 2021-12-30
    • 2016-05-09
    • 2017-07-02
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多