why didnt top try this lol

master
Aevann 2023-08-20 04:06:52 +03:00
parent c89bcc3f43
commit 1854b38d32
1 changed files with 13 additions and 11 deletions

View File

@ -217,46 +217,48 @@ def execute_blackjack(v, target, body, kind):
return True return True
def find_all_emote_endings(word): def find_all_emote_endings(word):
endings = list() endings = []
curr_word = word
if path.isfile(f'files/assets/images/emojis/{word}.webp'):
return endings, word
is_non_ending_found = False is_non_ending_found = False
while not is_non_ending_found: while not is_non_ending_found:
if curr_word.endswith('pat'): if word.endswith('pat'):
if 'pat' in endings: if 'pat' in endings:
is_non_ending_found = True is_non_ending_found = True
continue continue
endings.append('pat') endings.append('pat')
curr_word = curr_word[:-3] word = word[:-3]
continue continue
if curr_word.endswith('talking'): if word.endswith('talking'):
if 'talking' in endings: if 'talking' in endings:
is_non_ending_found = True is_non_ending_found = True
continue continue
endings.append('talking') endings.append('talking')
curr_word = curr_word[:-7] word = word[:-7]
continue continue
if curr_word.endswith('genocide'): if word.endswith('genocide'):
if 'genocide' in endings: if 'genocide' in endings:
is_non_ending_found = True is_non_ending_found = True
continue continue
endings.append('genocide') endings.append('genocide')
curr_word = curr_word[:-8] word = word[:-8]
continue continue
if curr_word.endswith('love'): if word.endswith('love'):
if 'love' in endings: if 'love' in endings:
is_non_ending_found = True is_non_ending_found = True
continue continue
endings.append('love') endings.append('love')
curr_word = curr_word[:-4] word = word[:-4]
continue continue
is_non_ending_found = True is_non_ending_found = True
return endings, curr_word return endings, word
def render_emoji(html, regexp, golden, emojis_used, b=False, is_title=False): def render_emoji(html, regexp, golden, emojis_used, b=False, is_title=False):