Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Channel, direct message or private group not found #71

Open
alanmetzz opened this issue Dec 13, 2018 · 2 comments
Open

Channel, direct message or private group not found #71

alanmetzz opened this issue Dec 13, 2018 · 2 comments

Comments

@alanmetzz
Copy link

alanmetzz commented Dec 13, 2018

When trying to erase all messages from a private channel, but get this result:

Channel, direct message or private group not found

I used:
slack-cleaner --token TOKEN --message --group name_of_channel --before 20181101

I also used it:
slack-cleaner --token TOKEN --message --channel name_of_channel --before 20181101

I don't think it works with a Private Channel.
Can anyone tell me?

Thank's.

@alanmetzz
Copy link
Author

I find a solution.

Follows bellow :

Line 288 of /usr/lib/python[version]/slacker/init.py ~~ Edit the argument channels to conversations, create a new variable with 'private_channel', and add params 'types' : pvc.

def list(self, exclude_archived=None, exclude_members=None, pvc='private_channel'):
        return self.get('conversations.list',
                        params={'exclude_archived': exclude_archived,
                                'exclude_members': exclude_members, 'types':pvc})
    def history(self, channel, latest=None, oldest=None, count=None,
                inclusive=False, unreads=False):
        return self.get('conversations.history',
                        params={
                            'channel': channel,
                            'latest': latest,
                            'oldest': oldest,
                            'count': count,
                            'inclusive': int(inclusive),
                            'unreads': int(unreads)
                        })

Note: If you edit the code, it not works with public_channel, it is necessary to change the variable.

Thank's

@alanmetzz alanmetzz reopened this Dec 14, 2018
@sgratzl
Copy link

sgratzl commented Jan 4, 2019

have you tried to reproduce the problem in my fork at https://github.com/sgratzl/slack-cleaner ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants