opgg now works with @ symbol too
authorGeorgios Atheridis <georgios@atheridis.org>
Sun, 22 Jan 2023 21:33:11 +0000 (21:33 +0000)
committerGeorgios Atheridis <georgios@atheridis.org>
Sun, 22 Jan 2023 21:38:12 +0000 (21:38 +0000)
ihaspeks/commands/opgg.py

index c6fd15ec5c0318c2f467cec5c74e38c31863848e..5f955c7c7f67430a1c91c272264ce41ce06d1ebd 100644 (file)
@@ -46,6 +46,8 @@ def main(bot: Bot, message: Message):
             ttv_api.users.get_users(user_logins=[message.channel]),
         )
     else:
+        if twitch_user.startswith("@"):
+            twitch_user = twitch_user[1:]
         twitch_id = ttv_api.users.get_users(user_logins=[twitch_user])
 
     if not twitch_id: