If you have a coding question, you can use stackoverflow with the tag 'errbot' and 'python'
sijis on master
Update README.md with new URL (… (compare)
18:05:39 DEBUG slack_sdk.socket_mode.bui on_message invoked: (message: {"envelope_id":"123...","payload":{...})
18:05:39 DEBUG slack_sdk.socket_mode.bui A new message enqueued (current queue size: 1)
18:05:39 DEBUG slack_sdk.socket_mode.bui A message dequeued (current queue size: 0)
18:05:39 DEBUG slack_sdk.socket_mode.bui Message processing started (type: events_api, envelope_id: 123...)
18:05:39 DEBUG errbot.backends.slackv3 Event type: events_api
Envelope ID: 123...
Accept Response Payload: False
Retry Attempt: 0
Retry Reason:
18:05:39 DEBUG slack_sdk.socket_mode.bui Sending a message (session id: 99999, message: {"envelope_id": "123..."})
18:05:39 DEBUG errbot.backends.slackv3 Received event: {'event': {'type': 'message', 'text': '!channel mv <#C123|chan1> #chan2', }
18:05:39 DEBUG errbot.backends.slackv3 building an identifier from <#C123|chan1>.
18:05:39 DEBUG slack_sdk.web.base_client Sending a request - url: https://www.slack.com/api/conversations.info, }
18:05:39 DEBUG slack_sdk.web.base_client Received the following response - status: 200, headers: ..
18:05:39 DEBUG errbot.backends.slackv3 Someone mentioned channel #chan1
18:05:39 DEBUG errbot.backends.slackv3 Event type message not supported.
Hi. I have a restricted command chat_rm
that I define like this:
ACCESS_CONTROLS = {
.....
"chat_rm": {"allowusers": BOT_ADMINS},
}
Given a slackV3
backend,
What's the correct way to specify bot admins? I tried 2 options, and in both cases when I try to run the command as a bot admin I get denied.
Using: BOT_ADMINS = ('@flast1', '@flast2')
logs:
12:27:09 INFO errbot.plugins.ACLs Matching ACL {'allowusers': ('@flast1', '@flast2')} against username UQQQQQQ for command MyTools:chat_rm.
12:27:09 INFO errbot.core Command None blocked or deferred.
Using: BOT_ADMINS = ('@First1 Last1', '@First2 Last2')
logs:
12:27:09 INFO errbot.plugins.ACLs Matching ACL {'allowusers': ('@First1 Last1', '@First2 Last2')} against username UQQQQQQ for command MyTools:chat_rm.
12:27:09 INFO errbot.core Command None blocked or deferred.
@display_name
is no longer guaranteed to be unique, which means if someone sets their display name to be the same as an admins display name, they get admin rights to the bot.
plugins
directory? in a flows
directory? (I've tried both, but not sure).flow
file should be called myflows.flow
like the myflows.py
file?_slack_upload
which calls Slack's files_upload
API. If the backend doesn't support the method directly, the SlackSDK module is avilable through the backend object as slack_web
. There's a method called api_call
which was carried forward from the original slack
backend that calls SlackSDK's api_call
method. It's a thin wrapper giving access to calling the Slack API directly. That might be another way of getting to the functionality you need.
Hai,
I'm facing the problem on my errbot recently, which is running fine from quite long time. We haven't done any changes in the recent time, all of sudden it started failing.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/errbot/backends/base.py", line 861, in serve_forever
if self.serve_once():
File "backends/err-backend-slackv3/slackv3.py", line 256, in serve_once
self.auth = self.slack_web.auth_test()
File "/usr/local/lib/python3.9/site-packages/slack_sdk/web/client.py", line 1512, in auth_test
return self.api_call("auth.test", params=kwargs)
File "/usr/local/lib/python3.9/site-packages/slack_sdk/web/base_client.py", line 145, in api_call
return self._sync_send(api_url=api_url, req_args=req_args)
File "/usr/local/lib/python3.9/site-packages/slack_sdk/web/base_client.py", line 182, in _sync_send
return self._urllib_api_call(
File "/usr/local/lib/python3.9/site-packages/slack_sdk/web/base_client.py", line 297, in _urllib_api_call
response = self._perform_urllib_http_request(url=url, args=request_args)
File "/usr/local/lib/python3.9/site-packages/slack_sdk/web/base_client.py", line 504, in _perform_urllib_http_request
raise err
File "/usr/local/lib/python3.9/site-packages/slack_sdk/web/base_client.py", line 412, in _perform_urllib_http_request
resp = self._perform_urllib_http_request_internal(url, req)
File "/usr/local/lib/python3.9/site-packages/slack_sdk/web/base_client.py", line 537, in _perform_urllib_http_request_internal
resp = urlopen( # skipcq: BAN-B310
File "/usr/local/lib/python3.9/urllib/request.py", line 214, in urlopen
return opener.open(url, data, timeout)
File "/usr/local/lib/python3.9/urllib/request.py", line 517, in open
response = self._open(req, data)
File "/usr/local/lib/python3.9/urllib/request.py", line 534, in _open
result = self._call_chain(self.handle_open, protocol, protocol +
File "/usr/local/lib/python3.9/urllib/request.py", line 494, in _call_chain
result = func(*args)
File "/usr/local/lib/python3.9/urllib/request.py", line 1389, in https_open
return self.do_open(http.client.HTTPSConnection, req,
File "/usr/local/lib/python3.9/urllib/request.py", line 1349, in do_open
raise URLError(err)
urllib.error.URLError: <urlopen error [Errno -3] Try again>
2022-03-11 20:51:22,049 INFO errbot.backends.base Reconnecting in 601 seconds (10 attempted reconnections so far).