discord.js-selfbot-v13
discord.js-selfbot-v13 copied to clipboard
Creating poll/Submit answer
Which package is the feature request for?
The core library
Feature
I would like that they can create a survey directly through the module and not through the api (I didn't test from the api)
Ideal solution or implementation
https://discord.com/api/v9/channels/ChannelId/polls/MessageId/answers/@me
- PUT
https://discord.com/api/v9/channels/ChannelId/messages
- POST
Creating a poll
{
"mobile_network_type": "unknown",
"content": "",
"nonce": "1231317440764313600",
"tts": false,
"flags": 0,
"poll": {
"question": {
"text": "my question"
},
"answers": [
{
"poll_media": {
"text": "my first answer"
}
},
{
"poll_media": {
"text": "my second answer"
}
}
],
"allow_multiselect": false,
"duration": 24,
"layout_type": 1
}
}
Alternative solutions or implementations
maybe create a function like <Channel>.createPoll(question: String, answers: Array[]: String, time: Number, multiSelect: Boolean)
question: Required
answers: Required
time: Optional (1000 * 60 * 60 * 24 by default)
multiSelect: Optional (false/true by default)
Send a Poll Answer
{
"answer_ids": [
"1" // answer_id
]
}
This can be like <Message>.sendAnswer(answerId: String/Array idk)
deleting the answer is []
#1147 yeah I tried implementing this already but got this error
yea i have the same error
v3.2.0 🎉