DevBear
DevBear
DIAdiscord.js - Imagine an app
Created by DevBear on 4/16/2023 in #djs-questions
cant get the user option
i have a subcommand with a user option and a string option. Im trying to use autocomplete in the string option. And im trying to get the user option data inside autocomplete() function. but i cant get the user data by interaction.options.getUser(), it return null but when i log interaction.options it logs
CommandInteractionOptionResolver {
_group: null,
_subcommand: 'remove',
_hoistedOptions: [
{ value: '757912235908661299', type: 6, name: 'member' },
{ value: '', type: 3, name: 'warns', focused: true }
]
}
CommandInteractionOptionResolver {
_group: null,
_subcommand: 'remove',
_hoistedOptions: [
{ value: '757912235908661299', type: 6, name: 'member' },
{ value: '', type: 3, name: 'warns', focused: true }
]
}
i can't figure out how i can get { value: '757912235908661299', type: 6, name: 'member' }
14 replies
DIAdiscord.js - Imagine an app
Created by DevBear on 1/29/2023 in #djs-questions
bow do filtet cached members based on their presence
so i tried to filter members based on their presence like
${interaction.guild.members.cache.filter(m => m.presence?.status === "dnd").size}
${interaction.guild.members.cache.filter(m => m.presence?.status === "dnd").size}
but it throws an error saying interaction.guild.members.cache.filter(...) Is not a function
2 replies
DIAdiscord.js - Imagine an app
Created by DevBear on 10/21/2022 in #djs-questions
can we hide slash commands in certain channel?
can we hide slash commands in some certain channels? like if someone types / in a channel the slash commands won't show up
6 replies