我的代码:
\n// not very relevant stuff\nconst {\n SlashCommandBuilder\n} = require('@discordjs/builders');\nconst {\n MessageEmbed\n} = require('discord.js');\nconst tip = require('../../tips/randomtip')\nconst fs = require('fs')\n\n{\n const status = require('./status')\n if(status.inUsed = true){\n status.inUsed = false\n fs.writeFileSync( './commands/music/status.json', JSON.stringify(status,null,2))\n }\n}\n\n\n// very relevant stuff\nmodule.exports = {\n data: new SlashCommandBuilder()\n .setName('join')\n .setDescription('Join the voice channel you are in'),\n async execute(interaction) {\n\n const voice = interaction.member.voice\n // console.log(voice)\n console.log(voice.channel)\n },\n};\nRun Code Online (Sandbox Code Playgroud)\n问题是 voice.channel 保持不变(我没有\xe2\x80\x99t 检查它们是否完全相同,但通道名称和通道是相同的,因为这很重要)
\n我\xe2\x80\x99m使用discord.jsv13最新版本所以不要\xe2\x80\x99甚至问我
如果交互(例如按钮点击)没有得到回复,discord 会在客户端显示 \xe2\x80\x9cinteraction failed\xe2\x80\x9d
\n他们希望你做什么:inter.reply(\xe2\x80\x98stuff\xe2\x80\x99)
我想做的事:inter.channel.send(\xe2\x80\x98stuff\xe2\x80\x99)
这不是一个错误,我只是想阻止 \xe2\x80\x9cinteraction failed\xe2\x80\x9d 显示,有办法做到这一点吗?
\n