sebseager / slack-exporter

A Slack bot for exporting content from public and private channels.
GNU General Public License v3.0
132 stars 36 forks source link

Save specific channel with replies doesn't work without json #7

Closed jdyer09 closed 2 years ago

jdyer09 commented 2 years ago

python exporter.py -o dynamic_pricing --ch <channel_id> -r results in:

Traceback (most recent call last):
  File "/<path>/slack-exporter/exporter.py", line 503, in <module>
    save_replies(channel_history(ch_id), ch_id, user_list())
  File "/<path>/slack-exporter/exporter.py", line 454, in save_replies
    ch_name, ch_type = name_from_ch_id(ch_id, ch_list)
NameError: name 'ch_list' is not defined

Adding the --json flag fixes it

I think ch_id should be channel_hist, but I'm not quite sure where ch_list should come from

sebseager commented 2 years ago

Should be fixed by bbb34418fc74d1c28e25fac680961d5eacc8a770. I also updated the save_channel and save_replies signatures for consistency. Please feel free to close if this resolves the issue.

jdyer09 commented 2 years ago

Awesome, that fixed it, thanks!