From: Jiri Vlasak Date: Mon, 7 Nov 2022 15:15:16 +0000 (+0100) Subject: Update top 5 mate stats runnable X-Git-Tag: v0.5.0^2~1 X-Git-Url: https://rtime.felk.cvut.cz/gitweb/hubacji1/coffee-getter.git/commitdiff_plain/464a0e8eeda93bd8d5d77fbf2e22b5e772c10742 Update top 5 mate stats runnable --- diff --git a/run/top5_mate_stats.py b/run/top5_mate_stats.py index 71e2de9..1bdaf7d 100755 --- a/run/top5_mate_stats.py +++ b/run/top5_mate_stats.py @@ -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")