久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

無效的交互應(yīng)用命令(discord.js 斜線命令使用 WOK

Invalid interaction application command(discord.js slash commands using WOKCommands)(無效的交互應(yīng)用命令(discord.js 斜線命令使用 WOKCommands))
本文介紹了無效的交互應(yīng)用命令(discord.js 斜線命令使用 WOKCommands)的處理方法,對(duì)大家解決問題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

問題描述

我正在使用 discord.js 和 WOKCommands 來使用斜杠命令,但是在 Discord 中輸入時(shí)它給我一個(gè)錯(cuò)誤無效的交互應(yīng)用程序命令"

I'm using discord.js and WOKCommands to use slash commands, but when entered in Discord it gives me an error "Invalid interaction application command"

這里是命令的代碼:

const { MessageEmbed } = require("discord.js");

// Simple command for the message
module.exports = {
    name: "ping",
    slash: "both",
    testOnly: false,
    description: "Command to figure out what your current ping is. Also shows API Latency",
    // Executing the message command
    execute(client, message, cmd, args, Discord) {
        // Creating the Embed const
        const newEmbed = new MessageEmbed()
            // ALL EMBED VALUES
            .setColor("#ffdbac")
            .setTitle("Ping")
            .setDescription("Pong! Latency is **" + (Date.now() - message.createdTimestamp) + "ms**. API Latency is **" + message.client.ws.ping + "ms**")
            .setThumbnail(`https://cometiclachlan.github.io/Uploads/pingpong-removebg.png`)
            .setTimestamp()
            .setFooter("v1.2", `https://cometiclachlan.github.io/Uploads/Checkpoint-removebg.png`);

        message.channel.send(newEmbed);
    },
};

只有當(dāng)我還需要顯示主腳本的代碼時(shí),這才是命令的代碼.我會(huì)這樣做的.

That is the code for the command only if I need to show the code for the main script as well. I will do so.

推薦答案

你不能在斜杠命令中使用 Message 你需要把它改成

You Can not use Message in Slash Commands You'l Need to change it to

const { MessageEmbed } = require("discord.js");

// Simple command for the message
module.exports = {
    name: "ping",
    slash: "both",
    testOnly: false,
    description: "Command to figure out what your current ping is. Also shows API Latency",
    // Executing the message command
    callback : ({client, message, cmd, args, Discord}) => {
        if (message) {
        // Creating the Embed const
        const newEmbed = new MessageEmbed()
        // ALL EMBED VALUES
        .setColor("#ffdbac")
        .setTitle("Ping")
        .setDescription("Pong! Latency is **" + (Date.now() - message.createdTimestamp) + "ms**. API Latency is **" + client.ws.ping + "ms**")
        .setThumbnail(`https://cometiclachlan.github.io/Uploads/pingpong-removebg.png`)
        .setTimestamp()
        .setFooter("v1.2", `https://cometiclachlan.github.io/Uploads/Checkpoint-removebg.png`);

        message.channel.send(newEmbed);
        }
        // Slash Command
        const newEmbed = new MessageEmbed()
        ...
        return newEmbed
    }
};

這篇關(guān)于無效的交互應(yīng)用命令(discord.js 斜線命令使用 WOKCommands)的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

【網(wǎng)站聲明】本站部分內(nèi)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請(qǐng)聯(lián)系我們刪除處理,感謝您的支持!

相關(guān)文檔推薦

discord.js v12: How do I await for messages in a DM channel?(discord.js v12:我如何等待 DM 頻道中的消息?)
how to make my bot mention the person who gave that bot command(如何讓我的機(jī)器人提及發(fā)出該機(jī)器人命令的人)
How to fix Must use import to load ES Module discord.js(如何修復(fù)必須使用導(dǎo)入來加載 ES 模塊 discord.js)
How to list all members from a specific server?(如何列出來自特定服務(wù)器的所有成員?)
Discord bot: Fix ‘FFMPEG not found’(Discord bot:修復(fù)“找不到 FFMPEG)
Welcome message when joining discord Server using discord.js(使用 discord.js 加入 discord 服務(wù)器時(shí)的歡迎消息)
主站蜘蛛池模板: 久久久精品一区 | 91热在线| 一级黄色毛片a | 日韩av一区二区在线观看 | 成人国产免费观看 | 青青久久 | 婷婷久久久久 | 日韩伦理电影免费在线观看 | 日韩欧美中文字幕在线视频 | 一区二区日韩 | 免费一级欧美在线观看视频 | 中文字幕在线免费视频 | 久久99久久99 | 国产人成在线观看 | 日本成人久久 | 久久综合入口 | 午夜免费电影 | 亚洲一区二区三区在线 | 国产日韩一区二区 | 成人免费观看男女羞羞视频 | 欧美一区二区三区在线 | 久久久免费电影 | 天堂一区二区三区 | 亚洲精品日日夜夜 | 亚洲91| 欧美日本韩国一区二区三区 | 一级做受毛片免费大片 | 精品欧美一区二区三区久久久 | 国产精品不卡 | 欧洲一区二区三区 | 欧美精品一二三区 | 久久精品欧美一区二区三区不卡 | 在线免费av电影 | 草草草草视频 | 精品久久久久久中文字幕 | 97伦理最新伦理 | 一区二区三区中文字幕 | 欧美第一页 | 精品综合久久 | 日本天堂视频在线观看 | 黑人精品欧美一区二区蜜桃 |