sgratzl/slack-cleaner

slacker.Error: not_in_channel

Closed this issue · 2 comments

slack-cleaner --token xoxb-*** --message --channel general --user "*"
Running slack-cleaner v0.7.2
Deleting messages from channel general
Traceback (most recent call last):
  File "C:\Python27\Scripts\slack-cleaner-script.py", line 11, in <module>
    load_entry_point('slack-cleaner==0.7.2', 'console_scripts', 'slack-cleaner')()
  File "c:\python27\lib\site-packages\slack_cleaner\cli.py", line 509, in main
    message_cleaner()
  File "c:\python27\lib\site-packages\slack_cleaner\cli.py", line 438, in message_cleaner
    clean_channel(channel_id, time_range, user_id=_user_id, bot=args.bot)
  File "c:\python27\lib\site-packages\slack_cleaner\cli.py", line 211, in clean_channel
    _clean_messages_impl(list_f, channel_id, time_range, user_id, bot)
  File "c:\python27\lib\site-packages\slack_cleaner\cli.py", line 141, in _clean_messages_impl
    res = list_f(latest, oldest).body
  File "c:\python27\lib\site-packages\slack_cleaner\cli.py", line 209, in list_f
    return slack.conversations.history(channel_id, latest=latest, oldest=oldest, limit=1000)
  File "c:\python27\lib\site-packages\slacker\__init__.py", line 172, in history
    'limit': limit
  File "c:\python27\lib\site-packages\slacker\__init__.py", line 120, in get
    api, **kwargs
  File "c:\python27\lib\site-packages\slacker\__init__.py", line 102, in _request
    raise Error(response.error)
slacker.Error: not_in_channel

not sure what happened here. I have following the instruction carefully. Seems user, not in general channel.

This issue was closed, the app need user permission instead of bot permission
image

yes otherwise the "bot" is just allowed to access the channels it is invited to