changed wording
authorGeorgios Atheridis <atheridis@tutamail.com>
Wed, 11 May 2022 00:54:14 +0000 (00:54 +0000)
committerGeorgios Atheridis <atheridis@tutamail.com>
Wed, 11 May 2022 00:54:14 +0000 (00:54 +0000)
skgyorugo/commands/newteams.py
skgyorugo/commands/teamsize.py

index 6d5b0ffdbda185666e3a711a5a2380ba3f9c36d2..7c449088c17e38ae99958111f5ac5cf30571f508 100644 (file)
@@ -74,6 +74,13 @@ def main(bot: Bot, message: Message):
             reply=message.tags["id"],
         )
 
+    if len(queue_users) < queue_size:
+        bot.send_privmsg(
+            message.channel,
+            f"There aren't enough people in the queue. Current team size is {queue_size} while there are only {len(queue_users)} in queue.",
+            reply=message.tags["id"],
+        )
+
     queue_users: list[ttv_api.users.User] = queue_users[:queue_size]
     random.shuffle(queue_users)
     blue_team: list[ttv_api.users.User] = queue_users[: queue_size // 2]
index cca3cf1d905b096d62200120bbbf26d7cd0064d1..02f7535e563fd3ccbc4395cf564ba79278a34c17 100644 (file)
@@ -16,7 +16,7 @@ logger.addHandler(file_handler)
 
 PERMISSION = 10
 PREFIX = "\\"
-DESCRIPTION = r"Change the queue size"
+DESCRIPTION = r"Change the team size"
 USER_COOLDOWN = 0
 GLOBAL_COOLDOWN = 0
 
@@ -53,7 +53,7 @@ def main(bot: Bot, message: Message):
 
     bot.send_privmsg(
         message.channel,
-        f"Successfully changed queue size to {queue_size}.",
+        f"Successfully changed team size to {queue_size}.",
         reply=message.tags["id"],
     )