]> rtime.felk.cvut.cz Git - hubacji1/coffee-getter.git/commitdiff
Update top 5 mate stats runnable
authorJiri Vlasak <jiri.vlasak.2@cvut.cz>
Mon, 7 Nov 2022 15:15:16 +0000 (16:15 +0100)
committerJiri Vlasak <jiri.vlasak.2@cvut.cz>
Mon, 7 Nov 2022 15:15:16 +0000 (16:15 +0100)
run/top5_mate_stats.py

index 71e2de94d796124b41122c62ee0a599a5fee7f86..1bdaf7d6503a776b32e6c01065b8f0a05c408849 100755 (executable)
@@ -1,13 +1,12 @@
 #!/usr/bin/env python3
-# -*- coding: utf-8 -*-
 """Get top 5 mate drinkers and post it to Slack."""
-from cbgetter import CoffeebotGetter
+from coffee_getter.bot import Bot
 
 if __name__ == "__main__":
-    g = CoffeebotGetter()
-    g.loadTopMateDrinkers()
-    if len(g.top) >= 3:
-        g.sendMsgToSlack()
-    g.load_top_tea_drinkers()
-    if len(g.top) >= 3:
-        g.sendMsgToSlack()
+    b = Bot()
+    b.load_top_mate_drinkers()
+    if len(b.top) >= 3:
+        b.send_msg_to("slack")
+    b.load_top_tea_drinkers()
+    if len(b.top) >= 3:
+        b.send_msg_to("slack")