reorganize helpers file

This commit is contained in:
Lili (Tlapka) 2023-01-12 13:20:28 +01:00
parent d3763d51c3
commit 2138650f91
1 changed files with 13 additions and 6 deletions

View File

@ -27,12 +27,6 @@ def send_chat(message):
r = requests.post(url, headers=headers, json={"body": message})
return r.json()
def remove_emoji(message):
return sub(
r'<img class="emoji" alt="(:.*?:)" title=":.*?:" src="/img/emoji/.*?">',
r'\1',
message
)
# # # db stuff # # #
def read_users_points(db, user_id):
@ -230,3 +224,16 @@ def remove_duplicate_usernames(db, user_id, username):
db.commit()
except Error as e:
current_app.logger.error(f"Error occured removing duplicate usernames: {e.args[0]}")
# # # misc. stuff # # #
def remove_emoji(message):
return sub(
r'<img class="emoji" alt="(:.*?:)" title=":.*?:" src="/img/emoji/.*?">',
r'\1',
message
)
def remove_inactive_redeems(redeems):