From e781bdd6ea84a9401f4d74042369166a5e3cdbef Mon Sep 17 00:00:00 2001 From: prono69 Date: Thu, 3 Oct 2024 01:13:38 +0530 Subject: [PATCH] hmm --- userbot/plugins/nekos.py | 3 ++- userbot/plugins/speedtest.py | 2 +- userbot/plugins/spotify.py | 11 +++++------ 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/userbot/plugins/nekos.py b/userbot/plugins/nekos.py index 87ffa9ee33..b92812175a 100644 --- a/userbot/plugins/nekos.py +++ b/userbot/plugins/nekos.py @@ -97,10 +97,11 @@ async def neko(event): nohorny = await event.client.send_file( event.chat_id, file=target, caption=f"**{choose}**", reply_to=reply_to ) + await unsavegif(event, nohorny) except Exception as e: await edit_delete(event, f"`{e}`") - await unsavegif(event, nohorny) + # await unsavegif(event, nohorny) @catub.cat_cmd( diff --git a/userbot/plugins/speedtest.py b/userbot/plugins/speedtest.py index fc0016159b..aad7941db5 100644 --- a/userbot/plugins/speedtest.py +++ b/userbot/plugins/speedtest.py @@ -61,7 +61,7 @@ async def _(event): event, "`Calculating my internet speed. Please wait!`" ) start = time() - s = speedtest.Speedtest() + s = speedtest.Speedtest(secure=True) s.get_best_server() s.download() s.upload() diff --git a/userbot/plugins/spotify.py b/userbot/plugins/spotify.py index 675b016870..78a57f0cbc 100644 --- a/userbot/plugins/spotify.py +++ b/userbot/plugins/spotify.py @@ -25,7 +25,6 @@ import requests import ujson from PIL import Image, ImageEnhance, ImageFilter -from telegraph import upload_file from telethon import Button, events from telethon.errors import AboutTooLongError, FloodWaitError from telethon.errors.rpcerrorlist import YouBlockedUserError @@ -46,10 +45,10 @@ ) from ..helpers.utils import reply_id from ..sql_helper import global_collectionjson as glob_db -from . import BOTLOG, BOTLOG_CHATID, LyricsGen, catub +from . import BOTLOG, BOTLOG_CHATID, LyricsGen, catub, gvarstatus, upload_to_catbox -SPOTIFY_CLIENT_ID = Config.SPOTIFY_CLIENT_ID -SPOTIFY_CLIENT_SECRET = Config.SPOTIFY_CLIENT_SECRET +SPOTIFY_CLIENT_ID = gvarstatus("SPOTIFY_CLIENT_ID") or Config.SPOTIFY_CLIENT_ID +SPOTIFY_CLIENT_SECRET = gvarstatus("SPOTIFY_CLIENT_SECRET") or Config.SPOTIFY_CLIENT_SECRET LOGS = logging.getLogger(__name__) @@ -665,10 +664,10 @@ async def get_spotify(response): dic["duration"], ) lyrics, symbol = await telegraph_lyrics(tittle, dic["interpret"]) - url = upload_file(thumb) + url = upload_to_catbox(thumb) if os.path.exists(thumb): os.remove(thumb) - return f"https://graph.org{url[0]}", tittle, dic, lyrics, symbol + return f"{url}", tittle, dic, lyrics, symbol async def spotify_inline_article():