from aptbot.bot import Message, Commands, Bot
-COOLDOWN = 60 * 60
+COOLDOWN = 120 * 60
END_TIME = 0
COOLDOWN = 180
END_TIME = COOLDOWN * 5
-STREAM_SCHEDULE = dt.time(17, 30)
+STREAM_SCHEDULE = dt.time(18, 30)
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:]:
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}."
USER_COOLDOWN = 15
GLOBAL_COOLDOWN = 5
-STREAM_SCHEDULE = dt.time(17, 30)
+STREAM_SCHEDULE = dt.time(18, 30)
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(
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()