implemented 0 position to always show who plays with, removed DST
authorGeorgios Atheridis <atheridis@tutamail.com>
Wed, 2 Nov 2022 19:08:55 +0000 (19:08 +0000)
committerGeorgios Atheridis <georgios@atheridis.org>
Mon, 16 Jan 2023 04:31:23 +0000 (04:31 +0000)
skgyorugo/auto_messages/give_permission.py
skgyorugo/auto_messages/latege.py
skgyorugo/commands/Q.py
skgyorugo/commands/latege.py
skgyorugo/commands/opgg.py

index f85bc9b144be1218e01cab222696ca4c060df6a7..23478764666b6c36461f85ed0fa9159a20e9af89 100644 (file)
@@ -1,6 +1,6 @@
 from aptbot.bot import Message, Commands, Bot
 
-COOLDOWN = 60 * 60
+COOLDOWN = 120 * 60
 END_TIME = 0
 
 
index 52fbf158a49c16132553d9706e3e15fe0c2d584c..3011a2dad08ac8c9886bfdbd9d19e65a3f1f9ffe 100644 (file)
@@ -6,7 +6,7 @@ import tools.smart_start_stream_time
 COOLDOWN = 180
 END_TIME = COOLDOWN * 5
 
-STREAM_SCHEDULE = dt.time(17, 30)
+STREAM_SCHEDULE = dt.time(18, 30)
 
 
 def main(bot: Bot, message: Message):
index 282e530e50bb170f9e4ddc94f945b508d4642776..b7f4fd0313cdcee18d0bc50c5adcab777a4f1cf6 100644 (file)
@@ -110,7 +110,7 @@ def main(bot: Bot, message: Message):
                 reply=message.tags["id"],
             )
 
-    play_list = [user.display_name for user in queue_users[1:queue_size]]
+    play_list = [user.display_name for user in queue_users[0:queue_size]]
     prio_queue = []
     wait_list = []
     for user in queue_users[queue_size:]:
@@ -121,9 +121,9 @@ def main(bot: Bot, message: Message):
                 wait_list.append(user.display_name)
 
     if prio_queue:
-        msg = f"These people are playing with {message.channel}: {play_list} | These people are in Priority Queue: {prio_queue} | These people are in the Wait List: {wait_list}."
+        msg = f"These people are playing with {play_list[0]}: {play_list[1:]} | These people are in Priority Queue: {prio_queue} | These people are in the Wait List: {wait_list}."
     else:
-        msg = f"These people are playing with {message.channel}: {play_list} | These people are in the Wait List: {wait_list}."
+        msg = f"These people are playing with {play_list[0]}: {play_list[1:]} | These people are in the Wait List: {wait_list}."
 
     if unavailable_users:
         msg += f" | These people are also not here: {unavailable_users}."
index 7eae2040ca4e0393a5473c0e2efb3923598052b9..71732d2ee6de61cf54f3d114f8d727bd1e065244 100644 (file)
@@ -9,7 +9,7 @@ DESCRIPTION = ""
 USER_COOLDOWN = 15
 GLOBAL_COOLDOWN = 5
 
-STREAM_SCHEDULE = dt.time(17, 30)
+STREAM_SCHEDULE = dt.time(18, 30)
 
 
 def main(bot: Bot, message: Message):
index 420a0d081cf8507136a6588ae3d7f19a79ccfbfc..6964cd9cbd76df6f4b8570fac4dff73e939b113c 100644 (file)
@@ -60,6 +60,12 @@ def main(bot: Bot, message: Message):
         (twitch_id,),
     )
     fetched = c.fetchall()
+    c.execute(
+        """
+        SELECT twitch_id, summoner_id FROM accounts;
+        """,
+    )
+    fetched_all = c.fetchall()
 
     if not fetched:
         smart_privmsg.send(
@@ -89,10 +95,19 @@ def main(bot: Bot, message: Message):
         conn.close()
         return
 
+    play_with = []
+    for summoner in info.participants:
+        for f in fetched_all:
+            if summoner.summoner_id == f[1] and summoner.summoner_id != fetched[0][0]:
+                play_with.append(ttv_api.users.get_users(user_ids=[f[0]])[0].display_name),
+                break
+    msg = f"{twitch_user} is currently playing a game on: {summoner_names[-1]}"
+    if play_with:
+        msg += f" and is playing with {play_with}."
     smart_privmsg.send(
         bot,
         message,
-        f"{twitch_user} is currently playing a game on: {summoner_names[-1]}",
+        msg,
         reply=message.tags["id"],
     )
     conn.close()