Skip to content

Delete Message Files and Replies

Compare
Choose a tag to compare
@sgratzl sgratzl released this 30 Apr 09:01
  • 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)