slack_cleaner2

Python3 module for deleting Slack messages and files using the Slack REST API

MIT License

Downloads
5.1K
Stars
234
Committers
18
slack_cleaner2 - Bugfix release Latest Release

Published by sgratzl over 2 years ago

bug fixes

  • c#77

new features:

  • add SlackMessage.dt and SlackMessage.thread_dt as datetime objects of the timestamps. the default print has also changed to use the dt isoformat
slack_cleaner2 - Release v3.1.1

Published by sgratzl almost 3 years ago

Bugfix Release

the list_files api uses a different type of pagination than other endpoints. This bugfix should make sure the right one is being used

slack_cleaner2 - Release v3.1.0

Published by sgratzl about 3 years ago

Lazy Evaluations and Rate Limit Handling

major refactoring within the code to lazy fetch channels, channel members, and users. This leads to an improved scalability and faster start up time.

  • Users are fetched one by one unless all users are iterated over
  • Channels members are only fetched upon access of the .members attribute
  • Channels are fetched upon access

in addition, there is support for listing and deleting message reactions

slack_cleaner2 - Bugfix Release v3.0.7

Published by sgratzl about 3 years ago

add support for adding team_id for organization wide tokens

slack_cleaner2 - Bugfix Release v3.0.5

Published by sgratzl over 3 years ago

add new "show_files_hidden_by_limit" flag for listing files

slack_cleaner2 - Bugfix Release v3.0.3

Published by sgratzl over 3 years ago

  • workaround for slack error: fetch_members_failed by handling it gracefully and not trying to fetch members of archived channels
slack_cleaner2 - Bugfix Release v3.0.1

Published by sgratzl almost 4 years ago

fixes #41 by adding the missing requests dependency

slack_cleaner2 - Migrate to official slack api package

Published by sgratzl almost 4 years ago

slack_cleaner2 - Bugfix Release v2.4.3

Published by sgratzl about 4 years ago

slack_cleaner2 - Pagination

Published by sgratzl over 4 years ago

  • implements a proper pagination for listing messages, channels, replies, and files
slack_cleaner2 - Better Scope Handling

Published by sgratzl over 4 years ago

  • refactored and cleaned up the required scopes
  • migrated documentation to custom slack app only
  • add error messages with required scope hints
  • make as_user=True default to avoid invalid argument error
slack_cleaner2 - Delete Message Files and Replies

Published by sgratzl over 4 years ago

  • add a new .files field to SlackMessage containing all the files attached to the message
  • add new options to SlackMessage.delete files=True will also delete attached files, replies=True does the same thing for the replies aka. thread.

Thus, deleting everything possible should be reduced to:

s = SlackCleaner2(TOKEN)
for msg in s.msgs():
  msg.delete(files=True, replies=True)
slack_cleaner2 - Message Replies

Published by sgratzl over 4 years ago

fixes #17 and #7 for a better support of message replies.

slack_cleaner2 - Upgrade

Published by sgratzl almost 5 years ago

Upgraded to python 3.7 with mypy typings.