slack-api

Slack slash command is not working in public channels unless manually added to them

旧城冷巷雨未停 提交于 2020-12-12 11:35:41
问题 I'm not sure how much detail to provide, but I'll try to put everything that I feel is relevant. I have a slash command that I do some logic with through AWS Lambda and API Gateway. I'm using the python slackclient module and through that I'm sending messages back into slack with the WebClient. To clarify, I'm using the new bot token system Slack has come up with, not the classic bot one. From my understanding, using a webhook to send messages in all channels in a workspace is very painful,

Slack api conversations.history returns error: not_in_channel

怎甘沉沦 提交于 2020-11-27 04:47:51
问题 I'm starting out with the slack API and trying to just get a list of messages. Here are my steps: Created a slack app and gave it channels:read and channels:history scope (also re-installed it) Queryied the list of channels with conversations.list (this worked fine) From the output of conversations.list, Found a channel that I use and copied the id Used the conversations.history api with the channelid from step 3 result: { "ok": false, "error": "not_in_channel" } I'm not at all sure what is

Building a slack bot in node.js, throwing an error I can't make sense of. Has anyone seen this before?

隐身守侯 提交于 2020-08-27 07:39:05
问题 I am trying to build a slack bot, and I have come across an error I can't make sense of. This is the error: /Users/maecapozzi/Desktop/maebot/node_modules/vow/lib/vow.js:104 throw e; ^ Error: [Slack Bot Error] undefined at assert (/Users/maecapozzi/Desktop/maebot/node_modules/slackbots/libs/utils.js:15:15) at /Users/maecapozzi/Desktop/maebot/node_modules/slackbots/index.js:42:9 at Array.<anonymous> (/Users/maecapozzi/Desktop/maebot/node_modules/vow/lib/vow.js:712:56) at Immediate.callFns [as

Run function asynchronously in Google Apps Script

空扰寡人 提交于 2020-07-22 06:01:44
问题 I'm making a Slack bot that calls a GAS function. Everything is working except Slack shows an error message because it only waits 3 seconds for a response when calling an API. Can anyone help me to work out how to run everyDay2 asynchronously so that I can return the response before it's finished. I've tried Promises and callbacks but I can't solve it. function doPost(e){ const promise = new Promise(everyDay2); return ContentService.createTextOutput('thinking...'); } 回答1: Promises doesn't