From 81244e219083d98169b4f42a2d3624d97b9df52d Mon Sep 17 00:00:00 2001 From: Holly Date: Wed, 10 Mar 2021 03:18:44 +0000 Subject: [PATCH] don't allow search queries so long the api spits in my face about it --- mtgcardlookup.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mtgcardlookup.py b/mtgcardlookup.py index fbf5d7a..2ad6ccd 100755 --- a/mtgcardlookup.py +++ b/mtgcardlookup.py @@ -106,7 +106,7 @@ async def get_cards(card_names): for name in card_names: try: - c = scrython.cards.Named(fuzzy=name) + c = scrython.cards.Named(fuzzy=name[:499]) cards.append(c) responses.append(f'{c.name()} - {c.scryfall_uri()}') except scrython.foundation.ScryfallError: @@ -145,7 +145,7 @@ async def update_followers(c, me): to_unfollow = accounts_i_follow - accounts_following_me if to_follow: - # Note that the bot listens for follows and tries to follow + # Note that the bot listens for follows and tries to follow # back instantly. This is /usually/ dead code but it's a failsafe # in case someone followed while the bot was down or something. log(f'{len(to_follow)} accounts to follow:')