How to make an autocomplete list from mongodb entries
So I have an array of objects, i want to display the name field of each object in a list, and then once an option is clicked delete that object. How should i go about that? Or even better display them in a dropdown
DT
d.js toolkit•92d ago
- What's your exact discord.js
npm list discord.js
and node node -v
version?
- Not a discord.js issue? Check out #other-js-ts.
- Consider reading #how-to-get-help to improve your question!
- Explain what exactly your issue is.
- Post the full error stack trace, not just the top part!
- Show your code!
- Issue solved? Press the button!B
brncray•92d ago
Yes, so I actually need to do both, one that autocompletes in a slash command option, and then a dropdown that's attatched to an embed
my main focus is the autocompleting in the slash cmd, dropdown is just a benefit if i manage to get it working
A
Aryxst•87d ago
This will work. About the slash command the database items that will be inserted in the autocomplete will be only the ones available at bot's startup. So they wouldn't be updated automatically
Unless there is a special function in djs that I'm not aware of
DD
d.js docs•87d ago
Support server for discord.js, a Node.js module to interact with the Discord bot API.
58KMembers
View on DiscordWant results from more Discord servers?
More PostsSend message to specific channelHow can I send a message to a specific channel of my guild?Ticket SupportWhy when i run the bot, the terminal gave me this error?Can someone help to complete this command?I have a ticket command here, but I don't know how to make a channel that opens from a button:Webhook send channelId optionIs it possible to parse a channel ID on the webhook.send method for it to send to a thread rather thIssue with Select MenuHello, I'm new with select menus, I tried them today but the bot isn't responding to them. The consoinvalid from body```DiscordAPIError[50035]: Invalid Form Body
14.options[3][APPLICATION_COMMAND_OPTIONS_TYPE_INVALID]invalid from body```DiscordAPIError[50035]: Invalid Form Body
14.options[3][APPLICATION_COMMAND_OPTIONS_TYPE_INVALID]LatencyAfter I created shards for bot, latency went from 8-10 to 200 and this happens sometimesmodal submit unknown interaction```js
await interaction.showModal(modal); //ButtonInteraction
const filter = (i) =>
MODALhey, how can add textlabel in modal please?Add points to multiple users at onceI want to make 3 optional options to add points to multiple users at once, How can I achieve that wiAuthentication failed at WebSocketShard.onCloseI get this error once every few weeks and discord resets my bot's token.
```Unhandled rejection: AutFor some reason my collecter won't work?It doesn't give me an error or anything and ive been debugging for about 6 hours now. Any pointers aEmbed is only sending once every time the slash command is ran every active sessionBy every active session I mean every time the bot is online.
I have a slash command that is like an