Skip to content

Commit

Permalink
Update utils.py
Browse files Browse the repository at this point in the history
  • Loading branch information
VJBots authored Jul 31, 2024
1 parent 4a5aa4b commit 0d98d30
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ async def get_verify_shorted_link(link):
logger.error(e)
return link
else:
response = requests.get(f"https://{SHORTLINK_URL}/api?api={SHORTLINK_API}&url={link}")
data = response.json()
if data["status"] == "success" or rget.status_code == 200:
return data["shortenedUrl"]
#shortzy = Shortzy(api_key=SHORTLINK_API, base_site=SHORTLINK_URL)
# link = await shortzy.convert(link)
#return link
# response = requests.get(f"https://{SHORTLINK_URL}/api?api={SHORTLINK_API}&url={link}")
# data = response.json()
# if data["status"] == "success" or rget.status_code == 200:
# return data["shortenedUrl"]
shortzy = Shortzy(api_key=SHORTLINK_API, base_site=SHORTLINK_URL)
link = await shortzy.convert(link)
return link

async def check_token(bot, userid, token):
user = await bot.get_users(userid)
Expand Down

0 comments on commit 0d98d30

Please sign in to comment.