From d27f4dece30aee4a69642ff203f53fc50864ff46 Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Sat, 28 Mar 2020 14:35:33 -0400 Subject: Added post summary to Discord message Also added config file command line argument --- taucheck.rb | 7 ++++--- 1 file 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 end def handle_post(post) - puts post["post_url"] - @discord.send_message(@channel_id, post["post_url"]) + body = post["summary"] + "\n" + post["post_url"] + puts body + @discord.send_message(@channel_id, body) end end -config = YAML.load_file("config.yml") +config = YAML.load_file(ARGV[0] || "config.yml") checker = Checker.new(config) checker.run -- cgit 1.4.1