【问题标题】:Argument is not fully displayed in discord.js v12参数未在 discord.js v12 中完全显示
【发布时间】:2021-11-24 04:06:53
【问题描述】:

我的 arg 未完全显示。它只发送第一个单词。我不知道该尝试什么。这是我要解决的问题:输入: 输出:这是一个带有我的代码的 hastebin:https://hastebin.com/okayobanuz.js

【问题讨论】:

    标签: node.js discord discord.js args


    【解决方案1】:

    你的代码说const comment = args[1];只有一个字,你需要使用const comment = args.slice(1).join(" ");来获得完整的参数

    【讨论】:

    • 现在我得到了 ep,5,Test,Reputation
    • 我的错,尝试使用这个const comment = args.slice(1).join(" ")(我也编辑了我的答案)
    猜你喜欢
    • 2021-01-05
    • 2021-04-19
    • 2021-04-26
    • 2021-02-22
    • 2020-08-03
    • 1970-01-01
    • 2020-10-19
    • 2021-08-04
    • 2023-04-01
    相关资源
    最近更新 更多