Skip to content

Commit

Permalink
Adjusted RegEx filter and minimum query length
Browse files Browse the repository at this point in the history
  • Loading branch information
WaterBoiledPizza committed Mar 12, 2023
1 parent 36e4660 commit 15f0b3d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion plugin/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
class SevenTVEmotes(Flox):

def query(self, query):
valid = re.findall("[-_A-Za-z(!?&)$+:0-9]{2,100}", query)
valid = re.findall("[-_A-Za-z(!?&)$+:0-9]{1,100}", query)
query = valid[0] if valid else ""
if len(query) >= seventv.MIN_QUERY_LEN:
emotes = seventv.search_emotes(query)
Expand Down
2 changes: 1 addition & 1 deletion plugin/seventv.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
REST_URL = "https://7tv.io/v3/emotes/{id}"
CDN_URL = 'https://cdn.7tv.app/emote/{id}/{size}.{ext}'
EMOTE_URL = 'https://7tv.app/emotes/{id}'
MIN_QUERY_LEN = 2
MIN_QUERY_LEN = 1


def get_img_url(emote, size='1x'):
Expand Down

0 comments on commit 15f0b3d

Please sign in to comment.