chickenwing
chickenwing
DIAdiscord.js - Imagine an app
Created by chickenwing on 4/10/2024 in #djs-questions
New discord Poll detection
is it possible to detect if a message is actually a poll (new discord poll) via API?
19 replies
DIAdiscord.js - Imagine an app
Created by chickenwing on 7/2/2023 in #djs-questions
Attachment content type support
Hello. Not sure if this is correct place to ask this question. I need a list of what content types are supported for attachments. Does anyone got a list or a link to it, I'd appreciate it. Thank you!
15 replies
DIAdiscord.js - Imagine an app
Created by chickenwing on 11/12/2022 in #djs-questions
Validation Error - Expected a string primitive
Hi. When I add this piece of code to my SlashCommandBuilder
.addIntegerOption(option =>
option
.setMinValue(0)
.setMaxValue(challengesData.length - 1)
.setRequired(false))
.addIntegerOption(option =>
option
.setMinValue(0)
.setMaxValue(challengesData.length - 1)
.setRequired(false))
I get this error
ValidationError: Expected a string primitive
at StringValidator.handle (D:\Projekti\discord-bots\challenger\bot\node_modules\@sapphire\shapeshift\dist\index.js:1654:70)
at StringValidator.parse (D:\Projekti\discord-bots\challenger\bot\node_modules\@sapphire\shapeshift\dist\index.js:113:88)
at validateName (D:\Projekti\discord-bots\challenger\bot\node_modules\@discordjs\builders\dist\interactions\slashCommands\Assertions.cjs:11:17)
at Object.validateRequiredParameters (D:\Projekti\discord-bots\challenger\bot\node_modules\@discordjs\builders\dist\interactions\slashCommands\Assertions.cjs:26:3)
at MixedClass.runRequiredValidations (D:\Projekti\discord-bots\challenger\bot\node_modules\@discordjs\builders\dist\interactions\slashCommands\mixins\ApplicationCommandOptionBase.cjs:19:16)
at MixedClass.toJSON (D:\Projekti\discord-bots\challenger\bot\node_modules\@discordjs\builders\dist\interactions\slashCommands\options\integer.cjs:40:10)
at D:\Projekti\discord-bots\challenger\bot\node_modules\@discordjs\builders\dist\interactions\slashCommands\SlashCommandBuilder.cjs:37:52
at Array.map (<anonymous>)
at MixedClass.toJSON (D:\Projekti\discord-bots\challenger\bot\node_modules\@discordjs\builders\dist\interactions\slashCommands\SlashCommandBuilder.cjs:37:29)
at Object.<anonymous> (D:\Projekti\discord-bots\challenger\bot\deploy-commands.js:11:29) {
validator: 's.string',
given: undefined
}
ValidationError: Expected a string primitive
at StringValidator.handle (D:\Projekti\discord-bots\challenger\bot\node_modules\@sapphire\shapeshift\dist\index.js:1654:70)
at StringValidator.parse (D:\Projekti\discord-bots\challenger\bot\node_modules\@sapphire\shapeshift\dist\index.js:113:88)
at validateName (D:\Projekti\discord-bots\challenger\bot\node_modules\@discordjs\builders\dist\interactions\slashCommands\Assertions.cjs:11:17)
at Object.validateRequiredParameters (D:\Projekti\discord-bots\challenger\bot\node_modules\@discordjs\builders\dist\interactions\slashCommands\Assertions.cjs:26:3)
at MixedClass.runRequiredValidations (D:\Projekti\discord-bots\challenger\bot\node_modules\@discordjs\builders\dist\interactions\slashCommands\mixins\ApplicationCommandOptionBase.cjs:19:16)
at MixedClass.toJSON (D:\Projekti\discord-bots\challenger\bot\node_modules\@discordjs\builders\dist\interactions\slashCommands\options\integer.cjs:40:10)
at D:\Projekti\discord-bots\challenger\bot\node_modules\@discordjs\builders\dist\interactions\slashCommands\SlashCommandBuilder.cjs:37:52
at Array.map (<anonymous>)
at MixedClass.toJSON (D:\Projekti\discord-bots\challenger\bot\node_modules\@discordjs\builders\dist\interactions\slashCommands\SlashCommandBuilder.cjs:37:29)
at Object.<anonymous> (D:\Projekti\discord-bots\challenger\bot\deploy-commands.js:11:29) {
validator: 's.string',
given: undefined
}
I can't figure out why is the error happening. Could anyone assist me on this?
5 replies
DIAdiscord.js - Imagine an app
Created by chickenwing on 11/8/2022 in #djs-questions
Calendar as a command option
Hello. Is it possible to add a calendar as a command option? So when a user types a command, there would be an option, let's say calendar, and when using it, a calendar would pop up to choose the value of that command option.
4 replies