Comments (13)
Odd. Is Slack API Tester the name of your archive bot?
Did you somehow add the bot user to a DM with another user? I didn't think that was possible.
The only path into handle_query
which returns that error is if the message is in a DM channel. It only checks if it's a DM, not who the DM is between. But, as far as I understood, a bot wouldn't be listening to messages in a DM between two other users.
I have a fix that I think would ensure it only responds in DMs to itself, but I don't know how I would test it because I don't know how to get it into another DM, if that is indeed the problem.
from slack-archive-bot.
Thought I answered this earlier. Slack API Tester is a Slack tool that I believe is enabled automatically so that apps can call the Slack API. Name of my archive bot is timescale_ab.
Did not add the bot to private DMs.
from slack-archive-bot.
I don't have Slack API Tester and couldn't find any documentation about it. Do you have any docs that I can see about setting it up?
As I said, I think I have the fix but I can't recreate your issue to test it.
from slack-archive-bot.
I found the issue had to do at least partly with messages being responded too only if the user name wasn't bot, however the user name for my bot seemed to be Slack API Tester
, so the bot would start trying to respond to the same messages it just put out and loop.
from slack-archive-bot.
Oh, how did you create the slack integration? Is it a bot or an app?
from slack-archive-bot.
@docmarionum1 I was setting up the bot following this guide
"Setting up your bot users"
https://api.slack.com/bot-users
So its set up as a bot within an app.
But then, I used the Slack PI Legacy token
https://api.slack.com/custom-integrations/legacy-tokens
from slack-archive-bot.
I'm still baffled by how you two got that. I created a bot using an app as you did. But it still shouldn't be active in DMs between two human users. Is there a way to invite a bot to a DM?
from slack-archive-bot.
@docmarionum1 no, I don't think so. It seems the bot is triggering the API Tester somehow...
from slack-archive-bot.
the issue is still there and it makes the bot unusable. each time you search for something it first gives you search results and then goes to endless "not found" loop. Bot name is "history", The search response goes under app name: "History", capital 'H'.
Also here is what I see in the log:
from slack-archive-bot.
Bot is trying to reply to its own messages. I suggest trying to resolve the issue by changing this line
to
if event['type'] == 'message' and ('subtype' not in event or event['subtype'] != 'bot_message'):
It works on my local :)
from slack-archive-bot.
@maxkan A recent change, #14 allows you to specify the username of the bot, which, I think, will fix that issue. Have you tried this?
If not, try running with the flag -b History
.
I've never actually been able to replicate this issue after setting up the app in a couple of different methods, so I can't verify that it in fact works, but it looks like it should.
from slack-archive-bot.
@docmarionum1 Thanks, your solution works on my env as well. I think it's a little bit confusing that App name should be used as is instead of using its machine name, i.e. if an app name is "Acme Test Bot", the machine name is "acme_test_bot", but parameter -b should be used with "Acme Test Bot".
from slack-archive-bot.
Seems to be fixed.
from slack-archive-bot.
Related Issues (20)
- Fix security vulnerabilities HOT 1
- Thank you HOT 2
- Evaluating this - Does it store attachments/images url's etc? HOT 2
- Archive Files/Links to Files
- Sort argument broken HOT 1
- Import fails silently upon permission denied HOT 1
- style: fix code style issues found by LGTM
- Update for Python 3 and slackclient 2 HOT 3
- Will slack-archive-bot be updated for Slack's Conversations API? HOT 15
- Not meeting the challenge (Running via cpanel) HOT 18
- Not logging threaded replies which are also sent to channel HOT 2
- Server Randomly Stops Responding
- Query results are limited and I can't figure out why HOT 3
- Support reading settings from a config file HOT 2
- Support using MySQL as storage backend HOT 1
- Looking for New Maintainers HOT 2
- Clean up codebase
- Installation instructions HOT 2
- UTF-8 on import HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from slack-archive-bot.