askia / askia-slack-poll Goto Github PK
View Code? Open in Web Editor NEWSlack slash command to create polls
Home Page: https://bot.askia.com
License: GNU General Public License v3.0
Slack slash command to create polls
Home Page: https://bot.askia.com
License: GNU General Public License v3.0
Sometimes there is an error when trying to create a poll, but the error message is cryptic. For example:
/askia failed with the error “dispatch_unknown_error”
The --expires
option does not work at the moment.
Steps to reproduce:
Poll error
The ability to vote to this poll has expired
This should be fixed by changing Line 134 in vote.js. At the moment the test returns always true (because the second part of the comparison just calculates poll.expires
, a positive value). The right test seems to be date.getTime() < new Date.getTime()
because the poll is expired when the expiration date lies in the past.
There doesn't seem to be a way to delete a poll, once it's been created, even as the author.
'Delete Message' doesn't appear in the context-menu, unlike for other types of messages.
I'm launching the application like this:
export SLACK_APP_OAUTH=xoxp-myoauth
export SLACK_APP_TOKEN=myapptoken
export PORT=443
export SSL_KEY=/path/to/privkey.pem
export SSL_CERT=/path/to/cert.pem
export SSL_CHAIN=/path/to/chain.pem
export SLACK_CLIENT_ID=myid
export SLACK_CLIENT_SECRET=mysecret
node index.js
and I'm receiving this error in the terminal when I attempt to run the slash command in Slack:
{ Error: An API error occurred: not_authed
at Object.platformErrorFromResult (/root/repos/askia-slack-poll/node_modules/@slack/web-api/dist/errors.js:50:33)
at WebClient.apiCall (/root/repos/askia-slack-poll/node_modules/@slack/web-api/dist/WebClient.js:374:28)
at process._tickCallback (internal/process/next_tick.js:68:7)
code: 'slack_webapi_platform_error',
data:
{ ok: false,
error: 'not_authed',
response_metadata: { acceptedScopes: [Array] } } }
Am I missing something?
Add an option to hide poll results to respondents and display them to the poll author only (either via DM or private inline message).
Slack requires that the user installs the app to be usable in DM or private groups but it's not obvious for users. Then if an user use and got a not_authed
error the app should propose the install link to that user.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.