diff --git a/.idea/haugebot.iml b/.idea/haugebot.iml index 619069087d7ed1d3faa2c1c17570711f3bfdfc28..13a13f0c737ba7ff61d8852f8067f26013f14c88 100644 --- a/.idea/haugebot.iml +++ b/.idea/haugebot.iml @@ -16,7 +16,7 @@ <content url="file://$MODULE_DIR$"> <excludeFolder url="file://$MODULE_DIR$/venv" /> </content> - <orderEntry type="inheritedJdk" /> + <orderEntry type="jdk" jdkName="Python 3.9 (haugebot) (2)" jdkType="Python SDK" /> <orderEntry type="sourceFolder" forTests="false" /> </component> <component name="TemplatesService"> diff --git a/.idea/misc.xml b/.idea/misc.xml index e32c50e4fee440929478026307cc206c2ec003d3..60d2706085f962f449dd51dbdbe8a74bb537b286 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -3,5 +3,5 @@ <component name="JavaScriptSettings"> <option name="languageLevel" value="ES6" /> </component> - <component name="ProjectRootManager" version="2" project-jdk-name="Python 3.8 (haugebot)" project-jdk-type="Python SDK" /> + <component name="ProjectRootManager" version="2" project-jdk-name="Python 3.9 (haugebot) (2)" project-jdk-type="Python SDK" /> </project> \ No newline at end of file diff --git a/haugebot_twitch/haugebot.py b/haugebot_twitch/haugebot.py index 8998cc99c3a3d0decb1cd3f74265f03d98990132..b3f71dd732d474e7f1f2ada1f9588c175a3bb895 100644 --- a/haugebot_twitch/haugebot.py +++ b/haugebot_twitch/haugebot.py @@ -34,11 +34,11 @@ class HaugeBot(commands.Bot, ABC): super().__init__(irc_token=IRC_TOKEN, prefix=PREFIX, nick=NICK, initial_channels=[CHANNEL], client_id=CLIENT_ID, client_secret=CLIENT_SECRET) self.info_cog = InfoCog(self) - self.pipi_cog = PipiCog(self) + # self.pipi_cog = PipiCog(self) self.add_cog(GiveawayCog(self)) self.add_cog(VoteCog(self)) self.add_cog(self.info_cog) - self.add_cog(self.pipi_cog) + # self.add_cog(self.pipi_cog) @staticmethod async def send_me(ctx, content, color): @@ -54,8 +54,9 @@ class HaugeBot(commands.Bot, ABC): async def event_ready(self): print('Logged in') + self.info_cog.start_info_loop() asyncio.create_task(self.info_cog.info_loop()) - asyncio.create_task(self.pipi_cog.pipimeter_loop()) + # asyncio.create_task(self.pipi_cog.pipimeter_loop()) @staticmethod def get_percentage(part, total): diff --git a/haugebot_twitch/info_cog.py b/haugebot_twitch/info_cog.py index c3d9233e938efeefc6920b3bdb11f4f7ff1f0333..b638bbcf2fb58f0cf006c1d9d024ba43732915ae 100644 --- a/haugebot_twitch/info_cog.py +++ b/haugebot_twitch/info_cog.py @@ -11,6 +11,10 @@ class InfoCog: def __init__(self, bot): self.bot = bot + def start_info_loop(self): + loop = asyncio.get_event_loop() + loop.create_task(self.info_loop()) + async def info_loop(self): while True: sleep_duration = config.get_int("WusstestDuSchonLoop")