admin管理员组文章数量:1315792
I have been trying to fix this issue for a while and cant find the right answer this is my code,
const { SlashCommandBuilder } = require("@discordjs/builders");
module.exports = {
data: new SlashCommandBuilder()
.setName('test')
.setDescription('Get info about a user or a server!')
.addStringOption(option =>
option.setName('category')
.setDescription('The gif category')
.setRequired(true)
.addChoices(
{ name: 'Funny', value: 'funny is funny' },
{ name: 'Meme', value: 'Meme is a meme' },
{ name: 'Movie', value: 'Movie is a Movie' },
))
,
async execute(interaction) {
interaction.options.getString('category');
}
}
Heres a pic of whats happening
I have been trying to fix this issue for a while and cant find the right answer this is my code,
const { SlashCommandBuilder } = require("@discordjs/builders");
module.exports = {
data: new SlashCommandBuilder()
.setName('test')
.setDescription('Get info about a user or a server!')
.addStringOption(option =>
option.setName('category')
.setDescription('The gif category')
.setRequired(true)
.addChoices(
{ name: 'Funny', value: 'funny is funny' },
{ name: 'Meme', value: 'Meme is a meme' },
{ name: 'Movie', value: 'Movie is a Movie' },
))
,
async execute(interaction) {
interaction.options.getString('category');
}
}
Heres a pic of whats happening
Share Improve this question edited Jun 11, 2022 at 0:09 Matthew M. 1,10711 silver badges18 bronze badges asked Jun 10, 2022 at 18:03 boss manboss man 711 silver badge2 bronze badges 3- I am also having this issue. It started when I added a string option to my slash mand, but was working perfectly fine before that – kaitlynmm569 Commented Sep 21, 2022 at 22:01
- Similar here, though I'm not sure what I did to break it. :( It's been hours now and has not fixed itself. – dreeves Commented May 8, 2023 at 11:37
- It should take at most an hour to sync. If it's been over an hour that sounds like a discord bug. – Glenn Willen Commented Oct 23, 2023 at 22:17
1 Answer
Reset to default 7I've seen this happen time to time. Discord takes some amount of time for slash mands to work their way into the system when you start up your code. If your code hits lots of guilds, it could take an hour. If you only specify one guild, it is usually fairly instant but in some cases it may take 5 min. Let your code run for 5-10 min and check back, it will probably fix this error.
本文标签:
版权声明:本文标题:javascript - Discord commands 'This command is outdated, please try again in a few minutes' - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741984774a2408610.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论