diff options
author | Kelly Rauchenberger <fefferburbia@gmail.com> | 2020-03-28 14:35:33 -0400 |
---|---|---|
committer | Kelly Rauchenberger <fefferburbia@gmail.com> | 2020-03-28 14:35:33 -0400 |
commit | d27f4dece30aee4a69642ff203f53fc50864ff46 (patch) | |
tree | be3217fab67bf2080c27425ad55ccc3a2c73b973 | |
parent | 9f28e08e022a9cdc688422184442060374849e47 (diff) | |
download | taucheck-d27f4dece30aee4a69642ff203f53fc50864ff46.tar.gz taucheck-d27f4dece30aee4a69642ff203f53fc50864ff46.tar.bz2 taucheck-d27f4dece30aee4a69642ff203f53fc50864ff46.zip |
Also added config file command line argument
-rw-r--r-- | taucheck.rb | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/taucheck.rb b/taucheck.rb index 6033f56..0fcd74e 100644 --- a/taucheck.rb +++ b/taucheck.rb | |||
@@ -40,11 +40,12 @@ class Checker | |||
40 | end | 40 | end |
41 | 41 | ||
42 | def handle_post(post) | 42 | def handle_post(post) |
43 | puts post["post_url"] | 43 | body = post["summary"] + "\n" + post["post_url"] |
44 | @discord.send_message(@channel_id, post["post_url"]) | 44 | puts body |
45 | @discord.send_message(@channel_id, body) | ||
45 | end | 46 | end |
46 | end | 47 | end |
47 | 48 | ||
48 | config = YAML.load_file("config.yml") | 49 | config = YAML.load_file(ARGV[0] || "config.yml") |
49 | checker = Checker.new(config) | 50 | checker = Checker.new(config) |
50 | checker.run | 51 | checker.run |