From af366e70a2f043f8845d905be6dee4d25797edd3 Mon Sep 17 00:00:00 2001 From: New-dev0 Date: Wed, 19 Feb 2025 18:38:36 +0530 Subject: [PATCH 1/2] Ultroid 2025 --- .gitignore | 1 + Dockerfile | 2 +- assistant/__init__.py | 2 +- assistant/callbackstuffs.py | 2 +- assistant/games.py | 3 +- assistant/initial.py | 2 +- assistant/inlinestuff.py | 2 +- assistant/localization.py | 2 +- assistant/manager/__init__.py | 2 +- assistant/manager/_help.py | 2 +- assistant/manager/_on_adds.py | 2 +- assistant/manager/admins.py | 2 +- assistant/manager/afk.py | 2 +- assistant/manager/misc.py | 2 +- assistant/manager/stickermanager.py | 2 +- assistant/pmbot.py | 2 +- assistant/start.py | 2 +- assistant/ytdl.py | 2 +- install-termux | 2 +- plugins/__init__.py | 2 +- plugins/_chatactions.py | 2 +- plugins/_help.py | 2 +- plugins/_inline.py | 2 +- plugins/_ultroid.py | 2 +- plugins/_userlogs.py | 2 +- plugins/_wspr.py | 2 +- plugins/admintools.py | 2 +- plugins/afk.py | 2 +- plugins/aiwrapper.py | 396 ++++++++++++++++++++++++++++ plugins/antiflood.py | 2 +- plugins/asstcmd.py | 2 +- plugins/audiotools.py | 2 +- plugins/autoban.py | 2 +- plugins/autopic.py | 2 +- plugins/beautify.py | 2 +- plugins/blacklist.py | 2 +- plugins/bot.py | 2 +- plugins/broadcast.py | 2 +- plugins/button.py | 2 +- plugins/calculator.py | 2 +- plugins/channelhacks.py | 2 +- plugins/chatbot.py | 2 +- plugins/chats.py | 2 +- plugins/cleanaction.py | 2 +- plugins/compressor.py | 2 +- plugins/converter.py | 2 +- plugins/core.py | 2 +- plugins/database.py | 2 +- plugins/devtools.py | 2 +- plugins/downloadupload.py | 2 +- plugins/echo.py | 2 +- plugins/extra.py | 2 +- plugins/fakeaction.py | 2 +- plugins/fileshare.py | 2 +- plugins/filter.py | 2 +- plugins/fontgen.py | 2 +- plugins/forcesubscribe.py | 2 +- plugins/gdrive.py | 2 +- plugins/giftools.py | 2 +- plugins/glitch.py | 2 +- plugins/globaltools.py | 2 +- plugins/greetings.py | 2 +- plugins/imagetools.py | 2 +- plugins/locks.py | 2 +- plugins/logo.py | 2 +- plugins/mediatools.py | 2 +- plugins/mute.py | 2 +- plugins/nightmode.py | 2 +- plugins/notes.py | 2 +- plugins/nsfwfilter.py | 2 +- plugins/other.py | 2 +- plugins/pdftools.py | 2 +- plugins/pmpermit.py | 2 +- plugins/polls.py | 2 +- plugins/profanityfilter.py | 2 +- plugins/profile.py | 2 +- plugins/qrcode.py | 2 +- plugins/resize.py | 2 +- plugins/schedulemsg.py | 2 +- plugins/search.py | 2 +- plugins/snips.py | 2 +- plugins/specialtools.py | 2 +- plugins/stickertools.py | 2 +- plugins/sudo.py | 2 +- plugins/tag.py | 2 +- plugins/tools.py | 28 +- plugins/twitter.py | 203 ++++++++++++++ plugins/unsplash.py | 2 +- plugins/usage.py | 2 +- plugins/utilities.py | 2 +- plugins/variables.py | 4 +- plugins/vctools.py | 2 +- plugins/videotools.py | 2 +- plugins/warn.py | 2 +- plugins/webupload.py | 2 +- plugins/words.py | 2 +- plugins/writer.py | 2 +- plugins/youtube.py | 2 +- plugins/ziptools.py | 2 +- pyUltroid/__init__.py | 2 +- pyUltroid/__main__.py | 2 +- pyUltroid/_misc/__init__.py | 2 +- pyUltroid/_misc/_assistant.py | 2 +- pyUltroid/_misc/_decorators.py | 2 +- pyUltroid/_misc/_supporter.py | 2 +- pyUltroid/_misc/_wrappers.py | 2 +- pyUltroid/configs.py | 2 +- pyUltroid/dB/_core.py | 2 +- pyUltroid/dB/afk_db.py | 2 +- pyUltroid/dB/antiflood_db.py | 2 +- pyUltroid/dB/asstcmd_db.py | 2 +- pyUltroid/dB/blacklist_db.py | 2 +- pyUltroid/dB/botchat_db.py | 2 +- pyUltroid/dB/echo_db.py | 2 +- pyUltroid/dB/filestore_db.py | 2 +- pyUltroid/dB/filter_db.py | 2 +- pyUltroid/dB/forcesub_db.py | 2 +- pyUltroid/dB/gban_mute_db.py | 2 +- pyUltroid/dB/greetings_db.py | 2 +- pyUltroid/dB/mute_db.py | 2 +- pyUltroid/dB/notes_db.py | 2 +- pyUltroid/dB/nsfw_db.py | 2 +- pyUltroid/dB/snips_db.py | 2 +- pyUltroid/dB/vc_sudos.py | 2 +- pyUltroid/dB/warn_db.py | 2 +- pyUltroid/exceptions.py | 2 +- pyUltroid/fns/FastTelethon.py | 2 +- pyUltroid/fns/__init__.py | 2 +- pyUltroid/fns/admins.py | 2 +- pyUltroid/fns/gDrive.py | 2 +- pyUltroid/fns/helper.py | 2 +- pyUltroid/fns/info.py | 2 +- pyUltroid/fns/misc.py | 2 +- pyUltroid/fns/tools.py | 2 +- pyUltroid/fns/ytdl.py | 2 +- pyUltroid/loader.py | 2 +- pyUltroid/startup/BaseClient.py | 2 +- pyUltroid/startup/__init__.py | 2 +- pyUltroid/startup/_database.py | 2 +- pyUltroid/startup/_extra.py | 2 +- pyUltroid/startup/connections.py | 2 +- pyUltroid/startup/funcs.py | 2 +- pyUltroid/startup/loader.py | 2 +- pyUltroid/startup/utils.py | 2 +- pyUltroid/version.py | 4 +- resources/session/session.sh | 2 +- resources/session/ssgen.py | 2 +- resources/startup/_termux.py | 2 +- resources/startup/locals.py | 2 +- sessiongen | 2 +- startup | 2 +- strings/strings/jp.yml | 2 +- 152 files changed, 752 insertions(+), 177 deletions(-) create mode 100644 plugins/aiwrapper.py create mode 100644 plugins/twitter.py diff --git a/.gitignore b/.gitignore index 794eba8b5a..ce5d8ae1e0 100644 --- a/.gitignore +++ b/.gitignore @@ -17,6 +17,7 @@ target/npmlist.json package-lock.json ultroid.json resources/extras/thumbnail.jpg +resources/auth/ # Directories addons/ diff --git a/Dockerfile b/Dockerfile index ada30cbf09..813c1cb202 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # Ultroid - UserBot -# Copyright (C) 2021-2023 TeamUltroid +# Copyright (C) 2021-2025 TeamUltroid # This file is a part of < https://github.com/TeamUltroid/Ultroid/ > # PLease read the GNU Affero General Public License in . diff --git a/assistant/__init__.py b/assistant/__init__.py index cba67e1dc9..2a2a775b4d 100644 --- a/assistant/__init__.py +++ b/assistant/__init__.py @@ -1,5 +1,5 @@ # Ultroid - UserBot -# Copyright (C) 2021-2023 TeamUltroid +# Copyright (C) 2021-2025 TeamUltroid # # This file is a part of < https://github.com/TeamUltroid/Ultroid/ > # PLease read the GNU Affero General Public License in diff --git a/assistant/callbackstuffs.py b/assistant/callbackstuffs.py index 3cdd332044..0495c8246b 100644 --- a/assistant/callbackstuffs.py +++ b/assistant/callbackstuffs.py @@ -1,5 +1,5 @@ # Ultroid - UserBot -# Copyright (C) 2021-2023 TeamUltroid +# Copyright (C) 2021-2025 TeamUltroid # # This file is a part of < https://github.com/TeamUltroid/Ultroid/ > # PLease read the GNU Affero General Public License in diff --git a/assistant/games.py b/assistant/games.py index 85ea88ebf6..fef75c0cba 100644 --- a/assistant/games.py +++ b/assistant/games.py @@ -1,5 +1,5 @@ # Ultroid - UserBot -# Copyright (C) 2021-2024 TeamUltroid +# Copyright (C) 2021-2025 TeamUltroid # # This file is a part of < https://github.com/TeamUltroid/Ultroid/ > # PLease read the GNU Affero General Public License in @@ -15,6 +15,7 @@ import asyncio import re +from random import choice, shuffle from akipy.async_akipy import Akinator, akipyLOGS from telethon.errors.rpcerrorlist import BotMethodInvalidError diff --git a/assistant/initial.py b/assistant/initial.py index eb57a0308c..c126bbcf19 100644 --- a/assistant/initial.py +++ b/assistant/initial.py @@ -1,5 +1,5 @@ # Ultroid - UserBot -# Copyright (C) 2021-2023 TeamUltroid +# Copyright (C) 2021-2025 TeamUltroid # # This file is a part of < https://github.com/TeamUltroid/Ultroid/ > # PLease read the GNU Affero General Public License in diff --git a/assistant/inlinestuff.py b/assistant/inlinestuff.py index 16a45f522b..ae097f119a 100644 --- a/assistant/inlinestuff.py +++ b/assistant/inlinestuff.py @@ -1,5 +1,5 @@ # Ultroid - UserBot -# Copyright (C) 2021-2023 TeamUltroid +# Copyright (C) 2021-2025 TeamUltroid # # This file is a part of < https://github.com/TeamUltroid/Ultroid/ > # PLease read the GNU Affero General Public License in diff --git a/assistant/localization.py b/assistant/localization.py index 0fc8538cdb..9f1c18ab5b 100644 --- a/assistant/localization.py +++ b/assistant/localization.py @@ -1,5 +1,5 @@ # Ultroid - UserBot -# Copyright (C) 2021-2023 TeamUltroid +# Copyright (C) 2021-2025 TeamUltroid # # This file is a part of < https://github.com/TeamUltroid/Ultroid/ > # PLease read the GNU Affero General Public License in diff --git a/assistant/manager/__init__.py b/assistant/manager/__init__.py index 69b49061e9..ca0dfd62ba 100644 --- a/assistant/manager/__init__.py +++ b/assistant/manager/__init__.py @@ -1,5 +1,5 @@ # Ultroid - UserBot -# Copyright (C) 2021-2023 TeamUltroid +# Copyright (C) 2021-2025 TeamUltroid # # This file is a part of < https://github.com/TeamUltroid/Ultroid/ > # PLease read the GNU Affero General Public License in diff --git a/assistant/manager/_help.py b/assistant/manager/_help.py index f071301e91..bd3fe06d7d 100644 --- a/assistant/manager/_help.py +++ b/assistant/manager/_help.py @@ -1,5 +1,5 @@ # Ultroid - UserBot -# Copyright (C) 2021-2023 TeamUltroid +# Copyright (C) 2021-2025 TeamUltroid # # This file is a part of < https://github.com/TeamUltroid/Ultroid/ > # PLease read the GNU Affero General Public License in diff --git a/assistant/manager/_on_adds.py b/assistant/manager/_on_adds.py index c54cf14442..d788f37ae9 100644 --- a/assistant/manager/_on_adds.py +++ b/assistant/manager/_on_adds.py @@ -1,5 +1,5 @@ # Ultroid - UserBot -# Copyright (C) 2021-2023 TeamUltroid +# Copyright (C) 2021-2025 TeamUltroid # # This file is a part of < https://github.com/TeamUltroid/Ultroid/ > # PLease read the GNU Affero General Public License in diff --git a/assistant/manager/admins.py b/assistant/manager/admins.py index 168e14e680..d8b896543c 100644 --- a/assistant/manager/admins.py +++ b/assistant/manager/admins.py @@ -1,5 +1,5 @@ # Ultroid - UserBot -# Copyright (C) 2021-2023 TeamUltroid +# Copyright (C) 2021-2025 TeamUltroid # # This file is a part of < https://github.com/TeamUltroid/Ultroid/ > # PLease read the GNU Affero General Public License in diff --git a/assistant/manager/afk.py b/assistant/manager/afk.py index ceb45a3fd2..505a81d958 100644 --- a/assistant/manager/afk.py +++ b/assistant/manager/afk.py @@ -1,5 +1,5 @@ # Ultroid - UserBot -# Copyright (C) 2021-2023 TeamUltroid +# Copyright (C) 2021-2025 TeamUltroid # # This file is a part of < https://github.com/TeamUltroid/Ultroid/ > # PLease read the GNU Affero General Public License in diff --git a/assistant/manager/misc.py b/assistant/manager/misc.py index 093c9c7438..0133df8bfd 100644 --- a/assistant/manager/misc.py +++ b/assistant/manager/misc.py @@ -1,5 +1,5 @@ # Ultroid - UserBot -# Copyright (C) 2021-2023 TeamUltroid +# Copyright (C) 2021-2025 TeamUltroid # # This file is a part of < https://github.com/TeamUltroid/Ultroid/ > # PLease read the GNU Affero General Public License in diff --git a/assistant/manager/stickermanager.py b/assistant/manager/stickermanager.py index 18529bb34d..1d8e5fe26a 100644 --- a/assistant/manager/stickermanager.py +++ b/assistant/manager/stickermanager.py @@ -1,5 +1,5 @@ # Ultroid - UserBot -# Copyright (C) 2021-2023 TeamUltroid +# Copyright (C) 2021-2025 TeamUltroid # # This file is a part of < https://github.com/TeamUltroid/Ultroid/ > # PLease read the GNU Affero General Public License in diff --git a/assistant/pmbot.py b/assistant/pmbot.py index 316f8eae6d..961c2956ec 100644 --- a/assistant/pmbot.py +++ b/assistant/pmbot.py @@ -1,5 +1,5 @@ # Ultroid - UserBot -# Copyright (C) 2021-2023 TeamUltroid +# Copyright (C) 2021-2025 TeamUltroid # # This file is a part of < https://github.com/TeamUltroid/Ultroid/ > # PLease read the GNU Affero General Public License in diff --git a/assistant/start.py b/assistant/start.py index c8dcb3c700..3dd246dc35 100644 --- a/assistant/start.py +++ b/assistant/start.py @@ -1,5 +1,5 @@ # Ultroid - UserBot -# Copyright (C) 2021-2023 TeamUltroid +# Copyright (C) 2021-2025 TeamUltroid # # This file is a part of < https://github.com/TeamUltroid/Ultroid/ > # PLease read the GNU Affero General Public License in diff --git a/assistant/ytdl.py b/assistant/ytdl.py index 9a65b37679..1099690996 100644 --- a/assistant/ytdl.py +++ b/assistant/ytdl.py @@ -1,5 +1,5 @@ # Ultroid - UserBot -# Copyright (C) 2021-2023 TeamUltroid +# Copyright (C) 2021-2025 TeamUltroid # # This file is a part of < https://github.com/TeamUltroid/Ultroid/ > # PLease read the GNU Affero General Public License in diff --git a/install-termux b/install-termux index 7817ddc69e..ee02e5b295 100644 --- a/install-termux +++ b/install-termux @@ -1,6 +1,6 @@ #!/usr/bin/env bash # Ultroid - UserBot -# Copyright (C) 2021-2023 TeamUltroid +# Copyright (C) 2021-2025 TeamUltroid # # This file is a part of < https://github.com/TeamUltroid/Ultroid/ > # PLease read the GNU Affero General Public License in . diff --git a/plugins/__init__.py b/plugins/__init__.py index 9b98484c1e..173db5398a 100644 --- a/plugins/__init__.py +++ b/plugins/__init__.py @@ -1,5 +1,5 @@ # Ultroid - UserBot -# Copyright (C) 2021-2023 TeamUltroid +# Copyright (C) 2021-2025 TeamUltroid # # This file is a part of < https://github.com/TeamUltroid/Ultroid/ > # PLease read the GNU Affero General Public License in diff --git a/plugins/_chatactions.py b/plugins/_chatactions.py index 8f1a9d3baa..3ae1c90111 100644 --- a/plugins/_chatactions.py +++ b/plugins/_chatactions.py @@ -1,5 +1,5 @@ # Ultroid - UserBot -# Copyright (C) 2021-2023 TeamUltroid +# Copyright (C) 2021-2025 TeamUltroid # # This file is a part of < https://github.com/TeamUltroid/Ultroid/ > # PLease read the GNU Affero General Public License in diff --git a/plugins/_help.py b/plugins/_help.py index b36101e7f5..1f7d4e6e52 100644 --- a/plugins/_help.py +++ b/plugins/_help.py @@ -1,5 +1,5 @@ # Ultroid - UserBot -# Copyright (C) 2021-2023 TeamUltroid +# Copyright (C) 2021-2025 TeamUltroid # # This file is a part of < https://github.com/TeamUltroid/Ultroid/ > # PLease read the GNU Affero General Public License in diff --git a/plugins/_inline.py b/plugins/_inline.py index 99e9aefd42..93cc81e4a7 100644 --- a/plugins/_inline.py +++ b/plugins/_inline.py @@ -1,5 +1,5 @@ # Ultroid - UserBot -# Copyright (C) 2021-2023 TeamUltroid +# Copyright (C) 2021-2025 TeamUltroid # # This file is a part of < https://github.com/TeamUltroid/Ultroid/ > # PLease read the GNU Affero General Public License in diff --git a/plugins/_ultroid.py b/plugins/_ultroid.py index b2a3e2a6fb..3d7261a3e7 100644 --- a/plugins/_ultroid.py +++ b/plugins/_ultroid.py @@ -1,5 +1,5 @@ # Ultroid - UserBot -# Copyright (C) 2021-2023 TeamUltroid +# Copyright (C) 2021-2025 TeamUltroid # # This file is a part of < https://github.com/TeamUltroid/Ultroid/ > # PLease read the GNU Affero General Public License in diff --git a/plugins/_userlogs.py b/plugins/_userlogs.py index 0696ce5b2e..bea7c63426 100644 --- a/plugins/_userlogs.py +++ b/plugins/_userlogs.py @@ -1,5 +1,5 @@ # Ultroid - UserBot -# Copyright (C) 2021-2023 TeamUltroid +# Copyright (C) 2021-2025 TeamUltroid # # This file is a part of < https://github.com/TeamUltroid/Ultroid/ > # PLease read the GNU Affero General Public License in diff --git a/plugins/_wspr.py b/plugins/_wspr.py index f46def7dad..462a34e696 100644 --- a/plugins/_wspr.py +++ b/plugins/_wspr.py @@ -1,5 +1,5 @@ # Ultroid - UserBot -# Copyright (C) 2021-2023 TeamUltroid +# Copyright (C) 2021-2025 TeamUltroid # # This file is a part of < https://github.com/TeamUltroid/Ultroid/ > # PLease read the GNU Affero General Public License in diff --git a/plugins/admintools.py b/plugins/admintools.py index 0d402ff2d6..557597377f 100644 --- a/plugins/admintools.py +++ b/plugins/admintools.py @@ -1,5 +1,5 @@ # Ultroid - UserBot -# Copyright (C) 2021-2023 TeamUltroid +# Copyright (C) 2021-2025 TeamUltroid # # This file is a part of < https://github.com/TeamUltroid/Ultroid/ > # PLease read the GNU Affero General Public License in diff --git a/plugins/afk.py b/plugins/afk.py index 830136a449..67f5d08ede 100644 --- a/plugins/afk.py +++ b/plugins/afk.py @@ -1,5 +1,5 @@ # Ultroid - UserBot -# Copyright (C) 2021-2023 TeamUltroid +# Copyright (C) 2021-2025 TeamUltroid # # This file is a part of < https://github.com/TeamUltroid/Ultroid/ > # PLease read the GNU Affero General Public License in diff --git a/plugins/aiwrapper.py b/plugins/aiwrapper.py new file mode 100644 index 0000000000..c5fa34cf76 --- /dev/null +++ b/plugins/aiwrapper.py @@ -0,0 +1,396 @@ +# Ultroid - UserBot +# Copyright (C) 2021-2025 TeamUltroid +# +# This file is a part of < https://github.com/TeamUltroid/Ultroid/ > +# PLease read the GNU Affero General Public License in +# . + +""" +✘ Commands Available - + +• `{i}gemini ` + Get response from Google Gemini. + +• `{i}antr ` + Get response from Anthropic Claude. + +• `{i}gpt ` + Get response from OpenAI GPT. + +• `{i}deepseek ` + Get response from DeepSeek AI. + +Set custom models using: + • OPENAI_MODEL + • ANTHROPIC_MODEL + • GEMINI_MODEL + • DEEPSEEK_MODEL +""" + +import json +from . import LOGS, eor, get_string, udB, ultroid_cmd, async_searcher +import aiohttp +import asyncio + + +ENDPOINTS = { + "gpt": "https://api.openai.com/v1/chat/completions", + "antr": "https://api.anthropic.com/v1/messages", + "gemini": "https://generativelanguage.googleapis.com/v1/models/gemini-pro:generateContent", + "deepseek": "https://api.deepseek.com/chat/completions" +} + +DEFAULT_MODELS = { + "gpt": "gpt-3.5-turbo", + "antr": "claude-3-opus-20240229", + "gemini": "gemini-pro", + "deepseek": "deepseek-chat" +} + + +def get_model(provider): + """Get model name from database or use default""" + model_keys = { + "gpt": "OPENAI_MODEL", + "antr": "ANTHROPIC_MODEL", + "gemini": "GEMINI_MODEL", + "deepseek": "DEEPSEEK_MODEL" + } + return udB.get_key(model_keys[provider]) or DEFAULT_MODELS[provider] + + +async def stream_response(msg, text): + """Stream response by editing message""" + current = "" + # Split into chunks of ~100 characters at word boundaries + words = text.split() + chunks = [] + current_chunk = [] + + for word in words: + current_chunk.append(word) + if len(" ".join(current_chunk)) > 100: + chunks.append(" ".join(current_chunk[:-1])) + current_chunk = [word] + if current_chunk: + chunks.append(" ".join(current_chunk)) + + for chunk in chunks: + current += chunk + " " + try: + await msg.edit(current) + except Exception: + pass + await asyncio.sleep(0.5) + return current + + +async def get_ai_response(provider, prompt, api_key, stream=False): + """Get response from AI provider""" + try: + headers = {"Content-Type": "application/json"} + model = get_model(provider) + + if provider == "gpt": + headers["Authorization"] = f"Bearer {api_key}" + data = { + "model": model, + "messages": [{"role": "user", "content": prompt}], + "stream": stream + } + if not stream: + response = await async_searcher( + ENDPOINTS[provider], + headers=headers, + post=True, + json=data, + re_json=True + ) + yield response["choices"][0]["message"]["content"] + return + + async with aiohttp.ClientSession() as session: + async with session.post( + ENDPOINTS[provider], + headers=headers, + json=data + ) as resp: + async for line in resp.content: + if line: + try: + json_line = json.loads(line.decode('utf-8').strip().strip('data:').strip()) + if 'choices' in json_line and json_line['choices']: + content = json_line['choices'][0].get('delta', {}).get('content', '') + if content: + yield content + except Exception: + continue + + elif provider == "antr": + headers["x-api-key"] = api_key + headers["anthropic-version"] = "2023-06-01" + data = { + "model": model, + "messages": [{"role": "user", "content": prompt}], + "stream": stream + } + if not stream: + response = await async_searcher( + ENDPOINTS[provider], + headers=headers, + post=True, + json=data, + re_json=True + ) + yield response["content"][0]["text"] + return + + async with aiohttp.ClientSession() as session: + async with session.post( + ENDPOINTS[provider], + headers=headers, + json=data + ) as resp: + async for line in resp.content: + if line: + try: + json_line = json.loads(line.decode('utf-8').strip()) + if 'content' in json_line: + content = json_line['content'][0]['text'] + if content: + yield content + except Exception: + continue + + elif provider == "gemini": + params = {"key": api_key} + data = { + "contents": [{ + "parts": [{"text": prompt}] + }] + } + response = await async_searcher( + ENDPOINTS[provider], + params=params, + headers=headers, + post=True, + json=data, + re_json=True + ) + text = response["candidates"][0]["content"]["parts"][0]["text"] + if not stream: + yield text + return + + # Simulate streaming by yielding chunks + words = text.split() + buffer = [] + for word in words: + buffer.append(word) + if len(' '.join(buffer)) > 20: # Adjust chunk size as needed + yield ' '.join(buffer) + ' ' + buffer = [] + if buffer: + yield ' '.join(buffer) + + elif provider == "deepseek": + headers["Authorization"] = f"Bearer {api_key}" + data = { + "model": model, + "messages": [{"role": "user", "content": prompt}], + "stream": stream + } + if not stream: + response = await async_searcher( + ENDPOINTS[provider], + headers=headers, + post=True, + json=data, + re_json=True + ) + yield response["choices"][0]["message"]["content"] + return + + async with aiohttp.ClientSession() as session: + async with session.post( + ENDPOINTS[provider], + headers=headers, + json=data + ) as resp: + async for line in resp.content: + if line: + try: + json_line = json.loads(line.decode('utf-8').strip()) + if 'choices' in json_line and json_line['choices']: + content = json_line['choices'][0].get('delta', {}).get('content', '') + if content: + yield content + except Exception: + continue + + except Exception as e: + LOGS.exception(e) + yield f"Error: {str(e)}" + + +@ultroid_cmd(pattern="gemini( (.*)|$)") +async def gemini_ai(event): + """Use Google Gemini""" + prompt = event.pattern_match.group(1).strip() + if not prompt: + return await event.eor("❌ Please provide a prompt!") + + api_key = udB.get_key("GEMINI_API_KEY") + if not api_key: + return await event.eor("⚠️ Please set Gemini API key using `setdb GEMINI_API_KEY your_api_key`") + + msg = await event.eor("🤔 Thinking...") + model = get_model("gemini") + + header = ( + "🤖 **Google Gemini**\n" + f"**Model:** `{model}`\n" + "➖➖➖➖➖➖➖➖➖➖\n\n" + f"**🔍 Prompt:**\n{prompt}\n\n" + "**💡 Response:**\n" + ) + + if event.client.me.bot: + await msg.edit(header) + response = "" + async for chunk in get_ai_response("gemini", prompt, api_key, stream=True): + response += chunk + try: + await msg.edit(header + response) + except Exception: + pass + else: + response = "" + async for chunk in get_ai_response("gemini", prompt, api_key, stream=True): + response += chunk + try: + await msg.edit(header + response) + except Exception: + pass + +@ultroid_cmd(pattern="antr( (.*)|$)") +async def anthropic_ai(event): + """Use Anthropic Claude""" + prompt = event.pattern_match.group(1).strip() + if not prompt: + return await event.eor("❌ Please provide a prompt!") + + api_key = udB.get_key("ANTHROPIC_KEY") + if not api_key: + return await event.eor("⚠️ Please set Anthropic API key using `setdb ANTHROPIC_KEY your_api_key`") + + msg = await event.eor("🤔 Thinking...") + model = get_model("antr") + + formatted_response = ( + "🧠 **Anthropic Claude**\n" + f"**Model:** `{model}`\n" + "➖➖➖➖➖➖➖➖➖➖\n\n" + f"**🔍 Prompt:**\n{prompt}\n\n" + f"**💡 Response:**\n" + ) + + if event.client.me.bot: + await msg.edit(formatted_response) + response = "" + async for chunk in get_ai_response("antr", prompt, api_key, stream=True): + response += chunk + try: + await msg.edit(formatted_response + response) + except Exception: + pass + else: + response = "" + async for chunk in get_ai_response("antr", prompt, api_key, stream=True): + response += chunk + try: + await msg.edit(formatted_response + response) + except Exception: + pass + +@ultroid_cmd(pattern="gpt( (.*)|$)") +async def openai_ai(event): + """Use OpenAI GPT""" + prompt = event.pattern_match.group(1).strip() + if not prompt: + return await event.eor("❌ Please provide a prompt!") + + api_key = udB.get_key("OPENAI_API_KEY") + if not api_key: + return await event.eor("⚠️ Please set GPT API key using `setdb OPENAI_API_KEY your_api_key`") + + msg = await event.eor("🤔 Thinking...") + model = get_model("gpt") + + header = ( + "🌟 **OpenAI GPT**\n" + f"**Model:** `{model}`\n" + "➖➖➖➖➖➖➖➖➖➖\n\n" + f"**🔍 Prompt:**\n{prompt}\n\n" + "**💡 Response:**\n" + ) + + if event.client.me.bot: + await msg.edit(header) + response = "" + async for chunk in get_ai_response("gpt", prompt, api_key, stream=True): + response += chunk + try: + await msg.edit(header + response) + except Exception: + pass + else: + response ="" + async for chunk in get_ai_response("gpt", prompt, api_key, stream=True): + response += chunk + try: + await msg.edit(header + response) + except Exception: + pass + +@ultroid_cmd(pattern="deepseek( (.*)|$)") +async def deepseek_ai(event): + """Use DeepSeek AI""" + prompt = event.pattern_match.group(1).strip() + if not prompt: + return await event.eor("❌ Please provide a prompt!") + + api_key = udB.get_key("DEEPSEEK_API_KEY") + if not api_key: + return await event.eor("⚠️ Please set DeepSeek API key using `setdb DEEPSEEK_API_KEY your_api_key`") + + msg = await event.eor("🤔 Thinking...") + model = get_model("deepseek") + + formatted_response = ( + "🤖 **DeepSeek AI**\n" + f"**Model:** `{model}`\n" + "➖➖➖➖➖➖➖➖➖➖\n\n" + f"**🔍 Prompt:**\n{prompt}\n\n" + f"**💡 Response:**\n" + ) + + if event.client.me.bot: + await msg.edit(formatted_response) + response = "" + async for chunk in get_ai_response("deepseek", prompt, api_key, stream=True): + response += chunk + try: + await msg.edit(formatted_response + response) + except Exception: + pass + else: + response = "" + async for chunk in get_ai_response("deepseek", prompt, api_key, stream=True): + response += chunk + + try: + await msg.edit(formatted_response + response) + except Exception: + pass + diff --git a/plugins/antiflood.py b/plugins/antiflood.py index 82225c1695..3eb9d19dc0 100644 --- a/plugins/antiflood.py +++ b/plugins/antiflood.py @@ -1,5 +1,5 @@ # Ultroid - UserBot -# Copyright (C) 2021-2023 TeamUltroid +# Copyright (C) 2021-2025 TeamUltroid # # This file is a part of < https://github.com/TeamUltroid/Ultroid/ > # PLease read the GNU Affero General Public License in diff --git a/plugins/asstcmd.py b/plugins/asstcmd.py index b88446ef7d..b84c717bc9 100644 --- a/plugins/asstcmd.py +++ b/plugins/asstcmd.py @@ -1,5 +1,5 @@ # Ultroid - UserBot -# Copyright (C) 2021-2023 TeamUltroid +# Copyright (C) 2021-2025 TeamUltroid # # This file is a part of < https://github.com/TeamUltroid/Ultroid/ > # PLease read the GNU Affero General Public License in diff --git a/plugins/audiotools.py b/plugins/audiotools.py index f8c0b52558..2ae4e99212 100644 --- a/plugins/audiotools.py +++ b/plugins/audiotools.py @@ -1,5 +1,5 @@ # Ultroid - UserBot -# Copyright (C) 2021-2023 TeamUltroid +# Copyright (C) 2021-2025 TeamUltroid # # This file is a part of < https://github.com/TeamUltroid/Ultroid/ > # PLease read the GNU Affero General Public License in diff --git a/plugins/autoban.py b/plugins/autoban.py index 597323213b..ab002ba64a 100644 --- a/plugins/autoban.py +++ b/plugins/autoban.py @@ -1,5 +1,5 @@ # Ultroid - UserBot -# Copyright (C) 2021-2023 TeamUltroid +# Copyright (C) 2021-2025 TeamUltroid # # This file is a part of < https://github.com/TeamUltroid/Ultroid/ > # PLease read the GNU Affero General Public License in diff --git a/plugins/autopic.py b/plugins/autopic.py index f6e5127662..e206a98094 100644 --- a/plugins/autopic.py +++ b/plugins/autopic.py @@ -1,5 +1,5 @@ # Ultroid - UserBot -# Copyright (C) 2021-2023 TeamUltroid +# Copyright (C) 2021-2025 TeamUltroid # # This file is a part of < https://github.com/TeamUltroid/Ultroid/ > # PLease read the GNU Affero General Public License in diff --git a/plugins/beautify.py b/plugins/beautify.py index 903ab13197..3ee92ff2c4 100644 --- a/plugins/beautify.py +++ b/plugins/beautify.py @@ -1,5 +1,5 @@ # Ultroid - UserBot -# Copyright (C) 2021-2023 TeamUltroid +# Copyright (C) 2021-2025 TeamUltroid # # This file is a part of < https://github.com/TeamUltroid/Ultroid/ > # PLease read the GNU Affero General Public License in diff --git a/plugins/blacklist.py b/plugins/blacklist.py index 78f2d42afe..e621a37e8f 100644 --- a/plugins/blacklist.py +++ b/plugins/blacklist.py @@ -1,5 +1,5 @@ # Ultroid - UserBot -# Copyright (C) 2021-2023 TeamUltroid +# Copyright (C) 2021-2025 TeamUltroid # # This file is a part of < https://github.com/TeamUltroid/Ultroid/ > # PLease read the GNU Affero General Public License in diff --git a/plugins/bot.py b/plugins/bot.py index f8d5367e08..bd3146d289 100644 --- a/plugins/bot.py +++ b/plugins/bot.py @@ -1,5 +1,5 @@ # Ultroid - UserBot -# Copyright (C) 2021-2023 TeamUltroid +# Copyright (C) 2021-2025 TeamUltroid # # This file is a part of < https://github.com/TeamUltroid/Ultroid/ > # PLease read the GNU Affero General Public License in diff --git a/plugins/broadcast.py b/plugins/broadcast.py index f8aedf2f08..4eb1d36721 100644 --- a/plugins/broadcast.py +++ b/plugins/broadcast.py @@ -1,5 +1,5 @@ # Ultroid - UserBot -# Copyright (C) 2021-2023 TeamUltroid +# Copyright (C) 2021-2025 TeamUltroid # # This file is a part of < https://github.com/TeamUltroid/Ultroid/ > # PLease read the GNU Affero General Public License in diff --git a/plugins/button.py b/plugins/button.py index b3d616d709..ef61d2990f 100644 --- a/plugins/button.py +++ b/plugins/button.py @@ -1,5 +1,5 @@ # Ultroid - UserBot -# Copyright (C) 2021-2023 TeamUltroid +# Copyright (C) 2021-2025 TeamUltroid # # This file is a part of < https://github.com/TeamUltroid/Ultroid/ > # PLease read the GNU Affero General Public License in diff --git a/plugins/calculator.py b/plugins/calculator.py index 28f2bae144..3514c2963e 100644 --- a/plugins/calculator.py +++ b/plugins/calculator.py @@ -1,5 +1,5 @@ # Ultroid - UserBot -# Copyright (C) 2021-2023 TeamUltroid +# Copyright (C) 2021-2025 TeamUltroid # # This file is a part of < https://github.com/TeamUltroid/Ultroid/ > # PLease read the GNU Affero General Public License in diff --git a/plugins/channelhacks.py b/plugins/channelhacks.py index d333249a0f..561517a435 100644 --- a/plugins/channelhacks.py +++ b/plugins/channelhacks.py @@ -1,5 +1,5 @@ # Ultroid - UserBot -# Copyright (C) 2021-2023 TeamUltroid +# Copyright (C) 2021-2025 TeamUltroid # # This file is a part of < https://github.com/TeamUltroid/Ultroid/ > # PLease read the GNU Affero General Public License in diff --git a/plugins/chatbot.py b/plugins/chatbot.py index f050be1955..00c96e03e5 100644 --- a/plugins/chatbot.py +++ b/plugins/chatbot.py @@ -1,5 +1,5 @@ # Ultroid - UserBot -# Copyright (C) 2021-2023 TeamUltroid +# Copyright (C) 2021-2025 TeamUltroid # # This file is a part of < https://github.com/TeamUltroid/Ultroid/ > # PLease read the GNU Affero General Public License in diff --git a/plugins/chats.py b/plugins/chats.py index 2ef171b1de..0651cd7d72 100644 --- a/plugins/chats.py +++ b/plugins/chats.py @@ -1,5 +1,5 @@ # Ultroid - UserBot -# Copyright (C) 2021-2023 TeamUltroid +# Copyright (C) 2021-2025 TeamUltroid # # This file is a part of < https://github.com/TeamUltroid/Ultroid/ > # PLease read the GNU Affero General Public License in diff --git a/plugins/cleanaction.py b/plugins/cleanaction.py index ebc65752f3..361e094762 100644 --- a/plugins/cleanaction.py +++ b/plugins/cleanaction.py @@ -1,5 +1,5 @@ # Ultroid - UserBot -# Copyright (C) 2021-2023 TeamUltroid +# Copyright (C) 2021-2025 TeamUltroid # # This file is a part of < https://github.com/TeamUltroid/Ultroid/ > # PLease read the GNU Affero General Public License in diff --git a/plugins/compressor.py b/plugins/compressor.py index 4161a9f4fa..abd6d157e3 100644 --- a/plugins/compressor.py +++ b/plugins/compressor.py @@ -1,5 +1,5 @@ # Ultroid - UserBot -# Copyright (C) 2021-2023 TeamUltroid +# Copyright (C) 2021-2025 TeamUltroid # # This file is a part of < https://github.com/TeamUltroid/Ultroid/ > # PLease read the GNU Affero General Public License in diff --git a/plugins/converter.py b/plugins/converter.py index 0ed3e36037..b68dd27361 100644 --- a/plugins/converter.py +++ b/plugins/converter.py @@ -1,5 +1,5 @@ # Ultroid - UserBot -# Copyright (C) 2021-2023 TeamUltroid +# Copyright (C) 2021-2025 TeamUltroid # # This file is a part of < https://github.com/TeamUltroid/Ultroid/ > # PLease read the GNU Affero General Public License in diff --git a/plugins/core.py b/plugins/core.py index 6664fa5800..b93f659a2f 100644 --- a/plugins/core.py +++ b/plugins/core.py @@ -1,5 +1,5 @@ # Ultroid - UserBot -# Copyright (C) 2021-2023 TeamUltroid +# Copyright (C) 2021-2025 TeamUltroid # # This file is a part of < https://github.com/TeamUltroid/Ultroid/ > # PLease read the GNU Affero General Public License in diff --git a/plugins/database.py b/plugins/database.py index 8c50ea2a3a..0e6c79e33a 100644 --- a/plugins/database.py +++ b/plugins/database.py @@ -1,5 +1,5 @@ # Ultroid - UserBot -# Copyright (C) 2021-2023 TeamUltroid +# Copyright (C) 2021-2025 TeamUltroid # # This file is a part of < https://github.com/TeamUltroid/Ultroid/ > # PLease read the GNU Affero General Public License in diff --git a/plugins/devtools.py b/plugins/devtools.py index bc44b10cfe..fb3f72b4bc 100644 --- a/plugins/devtools.py +++ b/plugins/devtools.py @@ -1,5 +1,5 @@ # Ultroid - UserBot -# Copyright (C) 2021-2023 TeamUltroid +# Copyright (C) 2021-2025 TeamUltroid # # This file is a part of < https://github.com/TeamUltroid/Ultroid/ > # PLease read the GNU Affero General Public License in diff --git a/plugins/downloadupload.py b/plugins/downloadupload.py index 003da9fad7..d5f5e304f8 100644 --- a/plugins/downloadupload.py +++ b/plugins/downloadupload.py @@ -1,5 +1,5 @@ # Ultroid - UserBot -# Copyright (C) 2021-2023 TeamUltroid +# Copyright (C) 2021-2025 TeamUltroid # # This file is a part of < https://github.com/TeamUltroid/Ultroid/ > # PLease read the GNU Affero General Public License in diff --git a/plugins/echo.py b/plugins/echo.py index 03c4d0e860..bda8fff45e 100644 --- a/plugins/echo.py +++ b/plugins/echo.py @@ -1,5 +1,5 @@ # Ultroid - UserBot -# Copyright (C) 2021-2023 TeamUltroid +# Copyright (C) 2021-2025 TeamUltroid # # This file is a part of < https://github.com/TeamUltroid/Ultroid/ > # PLease read the GNU Affero General Public License in diff --git a/plugins/extra.py b/plugins/extra.py index f9abda572a..7fa9ac8177 100644 --- a/plugins/extra.py +++ b/plugins/extra.py @@ -1,5 +1,5 @@ # Ultroid - UserBot -# Copyright (C) 2021-2023 TeamUltroid +# Copyright (C) 2021-2025 TeamUltroid # # This file is a part of < https://github.com/TeamUltroid/Ultroid/ > # PLease read the GNU Affero General Public License in diff --git a/plugins/fakeaction.py b/plugins/fakeaction.py index 0f4b25492e..7e88941959 100644 --- a/plugins/fakeaction.py +++ b/plugins/fakeaction.py @@ -1,5 +1,5 @@ # Ultroid - UserBot -# Copyright (C) 2021-2023 TeamUltroid +# Copyright (C) 2021-2025 TeamUltroid # # This file is a part of < https://github.com/TeamUltroid/Ultroid/ > # PLease read the GNU Affero General Public License in diff --git a/plugins/fileshare.py b/plugins/fileshare.py index 430e8cd5be..62497d5813 100644 --- a/plugins/fileshare.py +++ b/plugins/fileshare.py @@ -1,5 +1,5 @@ # Ultroid - UserBot -# Copyright (C) 2021-2023 TeamUltroid +# Copyright (C) 2021-2025 TeamUltroid # # This file is a part of < https://github.com/TeamUltroid/Ultroid/ > # PLease read the GNU Affero General Public License in diff --git a/plugins/filter.py b/plugins/filter.py index 84ab5931ef..95294b01ad 100644 --- a/plugins/filter.py +++ b/plugins/filter.py @@ -1,5 +1,5 @@ # Ultroid - UserBot -# Copyright (C) 2021-2023 TeamUltroid +# Copyright (C) 2021-2025 TeamUltroid # # This file is a part of < https://github.com/TeamUltroid/Ultroid/ > # PLease read the GNU Affero General Public License in diff --git a/plugins/fontgen.py b/plugins/fontgen.py index 1cce172bef..d686c75f1f 100644 --- a/plugins/fontgen.py +++ b/plugins/fontgen.py @@ -1,5 +1,5 @@ # Ultroid - UserBot -# Copyright (C) 2021-2023 TeamUltroid +# Copyright (C) 2021-2025 TeamUltroid # # This file is a part of < https://github.com/TeamUltroid/Ultroid/ > # PLease read the GNU Affero General Public License in diff --git a/plugins/forcesubscribe.py b/plugins/forcesubscribe.py index 9804b28687..bc0a01f85f 100644 --- a/plugins/forcesubscribe.py +++ b/plugins/forcesubscribe.py @@ -1,5 +1,5 @@ # Ultroid - UserBot -# Copyright (C) 2021-2023 TeamUltroid +# Copyright (C) 2021-2025 TeamUltroid # # This file is a part of < https://github.com/TeamUltroid/Ultroid/ > # PLease read the GNU Affero General Public License in diff --git a/plugins/gdrive.py b/plugins/gdrive.py index fbadce6768..bafffbd293 100644 --- a/plugins/gdrive.py +++ b/plugins/gdrive.py @@ -1,5 +1,5 @@ # Ultroid - UserBot -# Copyright (C) 2021-2023 TeamUltroid +# Copyright (C) 2021-2025 TeamUltroid # # This file is a part of < https://github.com/TeamUltroid/Ultroid/ > # PLease read the GNU Affero General Public License in diff --git a/plugins/giftools.py b/plugins/giftools.py index 38fdb1f79e..5c8d0d2283 100644 --- a/plugins/giftools.py +++ b/plugins/giftools.py @@ -1,5 +1,5 @@ # Ultroid - UserBot -# Copyright (C) 2021-2023 TeamUltroid +# Copyright (C) 2021-2025 TeamUltroid # # This file is a part of < https://github.com/TeamUltroid/Ultroid/ > # PLease read the GNU Affero General Public License in diff --git a/plugins/glitch.py b/plugins/glitch.py index a612e959e5..e4ee4df41b 100644 --- a/plugins/glitch.py +++ b/plugins/glitch.py @@ -1,5 +1,5 @@ # Ultroid - UserBot -# Copyright (C) 2021-2023 TeamUltroid +# Copyright (C) 2021-2025 TeamUltroid # # This file is a part of < https://github.com/TeamUltroid/Ultroid/ > # PLease read the GNU Affero General Public License in diff --git a/plugins/globaltools.py b/plugins/globaltools.py index 087db364c4..a81744abd9 100644 --- a/plugins/globaltools.py +++ b/plugins/globaltools.py @@ -1,5 +1,5 @@ # Ultroid - UserBot -# Copyright (C) 2021-2023 TeamUltroid +# Copyright (C) 2021-2025 TeamUltroid # # This file is a part of < https://github.com/TeamUltroid/Ultroid/ > # PLease read the GNU Affero General Public License in diff --git a/plugins/greetings.py b/plugins/greetings.py index 6254a6be53..7f126e1a51 100644 --- a/plugins/greetings.py +++ b/plugins/greetings.py @@ -1,5 +1,5 @@ # Ultroid - UserBot -# Copyright (C) 2021-2023 TeamUltroid +# Copyright (C) 2021-2025 TeamUltroid # # This file is a part of < https://github.com/TeamUltroid/Ultroid/ > # PLease read the GNU Affero General Public License in diff --git a/plugins/imagetools.py b/plugins/imagetools.py index ef633427e4..a0757bcff7 100644 --- a/plugins/imagetools.py +++ b/plugins/imagetools.py @@ -1,5 +1,5 @@ # Ultroid - UserBot -# Copyright (C) 2021-2023 TeamUltroid +# Copyright (C) 2021-2025 TeamUltroid # # This file is a part of < https://github.com/TeamUltroid/Ultroid/ > # PLease read the GNU Affero General Public License in diff --git a/plugins/locks.py b/plugins/locks.py index 849c242164..edbdc6b48d 100644 --- a/plugins/locks.py +++ b/plugins/locks.py @@ -1,5 +1,5 @@ # Ultroid - UserBot -# Copyright (C) 2021-2023 TeamUltroid +# Copyright (C) 2021-2025 TeamUltroid # # This file is a part of < https://github.com/TeamUltroid/Ultroid/ > # PLease read the GNU Affero General Public License in diff --git a/plugins/logo.py b/plugins/logo.py index 92531bb1bf..551104f6d5 100644 --- a/plugins/logo.py +++ b/plugins/logo.py @@ -1,5 +1,5 @@ # Ultroid - UserBot -# Copyright (C) 2021-2023 TeamUltroid +# Copyright (C) 2021-2025 TeamUltroid # # This file is a part of < https://github.com/TeamUltroid/Ultroid/ > # PLease read the GNU Affero General Public License in diff --git a/plugins/mediatools.py b/plugins/mediatools.py index 91773026da..fd0ab43b48 100644 --- a/plugins/mediatools.py +++ b/plugins/mediatools.py @@ -1,5 +1,5 @@ # Ultroid - UserBot -# Copyright (C) 2021-2023 TeamUltroid +# Copyright (C) 2021-2025 TeamUltroid # # This file is a part of < https://github.com/TeamUltroid/Ultroid/ > # PLease read the GNU Affero General Public License in diff --git a/plugins/mute.py b/plugins/mute.py index 2939908fa0..cb7c3d6937 100644 --- a/plugins/mute.py +++ b/plugins/mute.py @@ -1,5 +1,5 @@ # Ultroid - UserBot -# Copyright (C) 2021-2023 TeamUltroid +# Copyright (C) 2021-2025 TeamUltroid # # This file is a part of < https://github.com/TeamUltroid/Ultroid/ > # PLease read the GNU Affero General Public License in diff --git a/plugins/nightmode.py b/plugins/nightmode.py index 5719cd7dc1..4a0edd9a8f 100644 --- a/plugins/nightmode.py +++ b/plugins/nightmode.py @@ -1,5 +1,5 @@ # Ultroid - UserBot -# Copyright (C) 2021-2023 TeamUltroid +# Copyright (C) 2021-2025 TeamUltroid # # This file is a part of < https://github.com/TeamUltroid/Ultroid/ > # PLease read the GNU Affero General Public License in diff --git a/plugins/notes.py b/plugins/notes.py index 38f353fe83..5553782f76 100644 --- a/plugins/notes.py +++ b/plugins/notes.py @@ -1,5 +1,5 @@ # Ultroid - UserBot -# Copyright (C) 2021-2023 TeamUltroid +# Copyright (C) 2021-2025 TeamUltroid # # This file is a part of < https://github.com/TeamUltroid/Ultroid/ > # PLease read the GNU Affero General Public License in diff --git a/plugins/nsfwfilter.py b/plugins/nsfwfilter.py index 3bfe62494c..ae40d5113e 100644 --- a/plugins/nsfwfilter.py +++ b/plugins/nsfwfilter.py @@ -1,5 +1,5 @@ # Ultroid - UserBot -# Copyright (C) 2021-2023 TeamUltroid +# Copyright (C) 2021-2025 TeamUltroid # # This file is a part of < https://github.com/TeamUltroid/Ultroid/ > # PLease read the GNU Affero General Public License in diff --git a/plugins/other.py b/plugins/other.py index b781162941..affa75b67c 100644 --- a/plugins/other.py +++ b/plugins/other.py @@ -1,5 +1,5 @@ # Ultroid - UserBot -# Copyright (C) 2021-2023 TeamUltroid +# Copyright (C) 2021-2025 TeamUltroid # # This file is a part of < https://github.com/TeamUltroid/Ultroid/ > # PLease read the GNU Affero General Public License in diff --git a/plugins/pdftools.py b/plugins/pdftools.py index e19cbc7a17..6be4c3319d 100644 --- a/plugins/pdftools.py +++ b/plugins/pdftools.py @@ -1,5 +1,5 @@ # Ultroid - UserBot -# Copyright (C) 2021-2023 TeamUltroid +# Copyright (C) 2021-2025 TeamUltroid # # This file is a part of < https://github.com/TeamUltroid/Ultroid/ > # PLease read the GNU Affero General Public License in diff --git a/plugins/pmpermit.py b/plugins/pmpermit.py index caed12a934..0d0cbf7a61 100644 --- a/plugins/pmpermit.py +++ b/plugins/pmpermit.py @@ -1,5 +1,5 @@ # Ultroid - UserBot -# Copyright (C) 2021-2023 TeamUltroid +# Copyright (C) 2021-2025 TeamUltroid # # This file is a part of < https://github.com/TeamUltroid/Ultroid/ > # PLease read the GNU Affero General Public License in diff --git a/plugins/polls.py b/plugins/polls.py index 2b875329b5..2fb71e5dc8 100644 --- a/plugins/polls.py +++ b/plugins/polls.py @@ -1,5 +1,5 @@ # Ultroid - UserBot -# Copyright (C) 2021-2023 TeamUltroid +# Copyright (C) 2021-2025 TeamUltroid # # This file is a part of < https://github.com/TeamUltroid/Ultroid/ > # PLease read the GNU Affero General Public License in diff --git a/plugins/profanityfilter.py b/plugins/profanityfilter.py index d7562a0ebc..ccc96bbf56 100644 --- a/plugins/profanityfilter.py +++ b/plugins/profanityfilter.py @@ -1,5 +1,5 @@ # Ultroid - UserBot -# Copyright (C) 2021-2023 TeamUltroid +# Copyright (C) 2021-2025 TeamUltroid # # This file is a part of < https://github.com/TeamUltroid/Ultroid/ > # PLease read the GNU Affero General Public License in diff --git a/plugins/profile.py b/plugins/profile.py index 90b85e5e8b..32f9207023 100644 --- a/plugins/profile.py +++ b/plugins/profile.py @@ -1,5 +1,5 @@ # Ultroid - UserBot -# Copyright (C) 2021-2023 TeamUltroid +# Copyright (C) 2021-2025 TeamUltroid # # This file is a part of < https://github.com/TeamUltroid/Ultroid/ > # PLease read the GNU Affero General Public License in diff --git a/plugins/qrcode.py b/plugins/qrcode.py index 2e7d64ba90..f31b337744 100644 --- a/plugins/qrcode.py +++ b/plugins/qrcode.py @@ -1,5 +1,5 @@ # Ultroid - UserBot -# Copyright (C) 2021-2023 TeamUltroid +# Copyright (C) 2021-2025 TeamUltroid # # This file is a part of < https://github.com/TeamUltroid/Ultroid/ > # PLease read the GNU Affero General Public License in diff --git a/plugins/resize.py b/plugins/resize.py index f70fe31001..e346a75b69 100644 --- a/plugins/resize.py +++ b/plugins/resize.py @@ -1,5 +1,5 @@ # Ultroid - UserBot -# Copyright (C) 2021-2023 TeamUltroid +# Copyright (C) 2021-2025 TeamUltroid # # This file is a part of < https://github.com/TeamUltroid/Ultroid/ > # PLease read the GNU Affero General Public License in diff --git a/plugins/schedulemsg.py b/plugins/schedulemsg.py index b531f02db8..5a6f0dde22 100644 --- a/plugins/schedulemsg.py +++ b/plugins/schedulemsg.py @@ -1,5 +1,5 @@ # Ultroid - UserBot -# Copyright (C) 2021-2023 TeamUltroid +# Copyright (C) 2021-2025 TeamUltroid # # This file is a part of < https://github.com/TeamUltroid/Ultroid/ > # PLease read the GNU Affero General Public License in diff --git a/plugins/search.py b/plugins/search.py index 3224f9271c..b80e34f044 100644 --- a/plugins/search.py +++ b/plugins/search.py @@ -1,5 +1,5 @@ # Ultroid - UserBot -# Copyright (C) 2021-2023 TeamUltroid +# Copyright (C) 2021-2025 TeamUltroid # # This file is a part of < https://github.com/TeamUltroid/Ultroid/ > # PLease read the GNU Affero General Public License in diff --git a/plugins/snips.py b/plugins/snips.py index eba0d2df8f..6b11f27ec1 100644 --- a/plugins/snips.py +++ b/plugins/snips.py @@ -1,5 +1,5 @@ # Ultroid - UserBot -# Copyright (C) 2021-2023 TeamUltroid +# Copyright (C) 2021-2025 TeamUltroid # # This file is a part of < https://github.com/TeamUltroid/Ultroid/ > # PLease read the GNU Affero General Public License in diff --git a/plugins/specialtools.py b/plugins/specialtools.py index 45bd03bb94..6971c58fff 100644 --- a/plugins/specialtools.py +++ b/plugins/specialtools.py @@ -1,5 +1,5 @@ # Ultroid - UserBot -# Copyright (C) 2021-2023 TeamUltroid +# Copyright (C) 2021-2025 TeamUltroid # # This file is a part of < https://github.com/TeamUltroid/Ultroid/ > # PLease read the GNU Affero General Public License in diff --git a/plugins/stickertools.py b/plugins/stickertools.py index 9191aa90e6..96e92c670f 100644 --- a/plugins/stickertools.py +++ b/plugins/stickertools.py @@ -1,5 +1,5 @@ # Ultroid - UserBot -# Copyright (C) 2021-2023 TeamUltroid +# Copyright (C) 2021-2025 TeamUltroid # # This file is a part of < https://github.com/TeamUltroid/Ultroid/ > # PLease read the GNU Affero General Public License in diff --git a/plugins/sudo.py b/plugins/sudo.py index 523bbb9884..6d092e318c 100644 --- a/plugins/sudo.py +++ b/plugins/sudo.py @@ -1,5 +1,5 @@ # Ultroid - UserBot -# Copyright (C) 2021-2023 TeamUltroid +# Copyright (C) 2021-2025 TeamUltroid # # This file is a part of < https://github.com/TeamUltroid/Ultroid/ > # PLease read the GNU Affero General Public License in diff --git a/plugins/tag.py b/plugins/tag.py index 8d1c9eba79..141e5feac1 100644 --- a/plugins/tag.py +++ b/plugins/tag.py @@ -1,5 +1,5 @@ # Ultroid - UserBot -# Copyright (C) 2021-2023 TeamUltroid +# Copyright (C) 2021-2025 TeamUltroid # # This file is a part of < https://github.com/TeamUltroid/Ultroid/ > # PLease read the GNU Affero General Public License in diff --git a/plugins/tools.py b/plugins/tools.py index a1f3628236..7da413a66f 100644 --- a/plugins/tools.py +++ b/plugins/tools.py @@ -1,5 +1,5 @@ # Ultroid - UserBot -# Copyright (C) 2021-2023 TeamUltroid +# Copyright (C) 2021-2025 TeamUltroid # # This file is a part of < https://github.com/TeamUltroid/Ultroid/ > # PLease read the GNU Affero General Public License in @@ -32,9 +32,6 @@ • `{i}webshot ` Get a screenshot of the webpage. - -• `{i}shorturl ` - shorten any url... """ import glob import io @@ -436,26 +433,3 @@ async def webss(event): os.remove(pic) await xx.delete() - -@ultroid_cmd(pattern="shorturl") -async def magic(event): - try: - match = event.text.split(maxsplit=1)[1].strip() - except IndexError: - return await event.eor("`Provide url to turn into tiny...`") - data = { - "url": match.split()[0], - "id": match[1] if len(match) > 1 else secrets.token_urlsafe(6), - } - data = await async_searcher( - "https://tiny.ultroid.tech/api/new", - data=data, - post=True, - re_json=True, - ) - response = data.get("response", {}) - if not response.get("status"): - return await event.eor(f'**ERROR :** `{response["message"]}`') - await event.eor( - f"• **Ultroid Tiny**\n• Given Url : {url}\n• Shorten Url : {data['response']['tinyUrl']}" - ) diff --git a/plugins/twitter.py b/plugins/twitter.py new file mode 100644 index 0000000000..81dbe534a4 --- /dev/null +++ b/plugins/twitter.py @@ -0,0 +1,203 @@ +# Ultroid - UserBot +# Copyright (C) 2021-2025 TeamUltroid +# +# This file is a part of < https://github.com/TeamUltroid/Ultroid/ > +# PLease read the GNU Affero General Public License in +# . + +""" +✘ Commands Available - + +• `{i}tw ` + Tweet the text. + +• `{i}twr ` + Get tweet details with reply/quote/comment count. + +• `{i}twuser ` + Get user details of the Twitter account. + +• `{i}twl ` + Upload the tweet media to telegram. + +""" + +import os +from twikit import Client +from . import LOGS, eor, get_string, udB, ultroid_cmd + +# Store client globally +twitter_client = None + +# Get path to cookies file +COOKIES_FILE = "resources/auth/twitter_cookies.json" + +async def get_client(): + global twitter_client + if twitter_client: + return twitter_client + + if not all(udB.get_key(key) for key in ["TWITTER_USERNAME", "TWITTER_EMAIL", "TWITTER_PASSWORD"]): + raise Exception("Set TWITTER_USERNAME, TWITTER_EMAIL and TWITTER_PASSWORD in vars first!") + + # Create auth directory if it doesn't exist + os.makedirs(os.path.dirname(COOKIES_FILE), exist_ok=True) + + client = Client() + await client.login( + auth_info_1=udB.get_key("TWITTER_USERNAME"), + auth_info_2=udB.get_key("TWITTER_EMAIL"), + password=udB.get_key("TWITTER_PASSWORD"), + cookies_file=COOKIES_FILE + ) + twitter_client = client + return client + + + +@ultroid_cmd(pattern="tw( (.*)|$)") +async def tweet_cmd(event): + """Post a tweet""" + text = event.pattern_match.group(1).strip() + if not text: + return await event.eor("🚫 `Give some text to tweet!`") + + msg = await event.eor("🕊 `Tweeting...`") + try: + client = await get_client() + tweet = await client.create_tweet(text=text) + await msg.edit(f"✨ **Successfully Posted!**\n\n🔗 https://x.com/{tweet.user.screen_name}/status/{tweet.id}") + except Exception as e: + await msg.edit(f"❌ **Error:**\n`{str(e)}`") + + +@ultroid_cmd(pattern="twdetail( (.*)|$)") +async def twitter_details(event): + """Get tweet details""" + match = event.pattern_match.group(1).strip() + if not match: + return await event.eor("🚫 `Give tweet ID/link to get details!`") + + msg = await event.eor("🔍 `Getting tweet details...`") + try: + client = await get_client() + if "twitter.com" in match or "x.com" in match: + tweet_id = match.split("/")[-1].split("?")[0] + else: + tweet_id = match + + tweet = await client.get_tweet_by_id(tweet_id) + text = "🐦 **Tweet Details**\n\n" + text += f"📝 **Content:** `{tweet.text}`\n\n" + if hasattr(tweet, "metrics"): + text += f"❤️ **Likes:** `{tweet.metrics.likes}`\n" + text += f"🔄 **Retweets:** `{tweet.metrics.retweets}`\n" + text += f"💬 **Replies:** `{tweet.metrics.replies}`\n" + text += f"👁 **Views:** `{tweet.metrics.views}`\n" + + await msg.edit(text) + except Exception as e: + await msg.edit(f"❌ **Error:**\n`{str(e)}`") + + +@ultroid_cmd(pattern="twuser( (.*)|$)") +async def twitter_user(event): + """Get user details""" + match = event.pattern_match.group(1).strip() + if not match: + return await event.eor("🚫 `Give username to get details!`") + + msg = await event.eor("🔍 `Getting user details...`") + try: + client = await get_client() + user = await client.get_user_by_screen_name(match) + text = "👤 **Twitter User Details**\n\n" + text += f"📛 **Name:** `{user.name}`\n" + text += f"🔖 **Username:** `@{user.screen_name}`\n" + text += f"📝 **Bio:** `{user.description}`\n\n" + text += f"👥 **Followers:** `{user.followers_count}`\n" + text += f"👣 **Following:** `{user.following_count}`\n" + text += f"🐦 **Total Tweets:** `{user.statuses_count}`\n" + text += f"📍 **Location:** `{user.location or 'Not Set'}`\n" + text += f"✅ **Verified:** `{user.verified}`\n" + + if user.profile_image_url: + image_url = user.profile_image_url.replace("_normal.", ".") + await event.client.send_file( + event.chat_id, + file=image_url, + caption=text, + force_document=False + ) + await msg.delete() + else: + await msg.edit(text) + + except Exception as e: + await msg.edit(f"❌ **Error:**\n`{str(e)}`") + + +@ultroid_cmd(pattern="twl( (.*)|$)") +async def twitter_media(event): + """Download tweet media""" + match = event.pattern_match.group(1).strip() + if not match: + return await event.eor("🚫 `Give tweet link to download media!`") + + msg = await event.eor("📥 `Downloading media...`") + try: + client = await get_client() + if "twitter.com" in match or "x.com" in match: + tweet_id = match.split("/")[-1].split("?")[0] + else: + tweet_id = match + + tweet = await client.get_tweet_by_id(tweet_id) + + if not hasattr(tweet, "media"): + return await msg.edit("😕 `No media found in tweet!`") + + # Prepare caption with tweet text + caption = f"🐦 **Tweet by @{tweet.user.screen_name}**\n\n" + caption += f"{tweet.text}\n\n" + if hasattr(tweet, "metrics"): + caption += f"❤️ `{tweet.metrics.likes}` 🔄 `{tweet.metrics.retweets}` 💬 `{tweet.metrics.replies}`" + + media_count = 0 + for media in tweet.media: + if media.type == "photo": + await event.client.send_file( + event.chat_id, + media.url, + caption=caption if media_count == 0 else None # Only add caption to first media + ) + media_count += 1 + elif media.type == "video": + if hasattr(media, "video_info") and isinstance(media.video_info, dict): + variants = media.video_info.get("variants", []) + mp4_variants = [ + v for v in variants + if v.get("content_type") == "video/mp4" and "bitrate" in v + ] + if mp4_variants: + best_video = max(mp4_variants, key=lambda x: x["bitrate"]) + video_caption = caption if media_count == 0 else "" # Only add tweet text to first media + if video_caption: + video_caption += f"\n🎥 Video Quality: {best_video['bitrate']/1000:.0f}kbps" + else: + video_caption = f"🎥 Video Quality: {best_video['bitrate']/1000:.0f}kbps" + + await event.client.send_file( + event.chat_id, + best_video["url"], + caption=video_caption + ) + media_count += 1 + + if media_count > 0: + await msg.edit(f"✅ Successfully downloaded {media_count} media items!") + await msg.delete() + else: + await msg.edit("😕 `No media could be downloaded!`") + except Exception as e: + await msg.edit(f"❌ **Error:**\n`{str(e)}`") diff --git a/plugins/unsplash.py b/plugins/unsplash.py index b3974965cc..4393009fe7 100644 --- a/plugins/unsplash.py +++ b/plugins/unsplash.py @@ -1,5 +1,5 @@ # Ultroid - UserBot -# Copyright (C) 2021-2023 TeamUltroid +# Copyright (C) 2021-2025 TeamUltroid # # This file is a part of < https://github.com/TeamUltroid/Ultroid/ > # PLease read the GNU Affero General Public License in diff --git a/plugins/usage.py b/plugins/usage.py index 86a5eac162..32d6a0445d 100644 --- a/plugins/usage.py +++ b/plugins/usage.py @@ -1,5 +1,5 @@ # Ultroid - UserBot -# Copyright (C) 2021-2023 TeamUltroid +# Copyright (C) 2021-2025 TeamUltroid # # This file is a part of < https://github.com/TeamUltroid/Ultroid/ > # PLease read the GNU Affero General Public License in diff --git a/plugins/utilities.py b/plugins/utilities.py index fd26be0ca8..4d34ebc5d7 100644 --- a/plugins/utilities.py +++ b/plugins/utilities.py @@ -1,5 +1,5 @@ # Ultroid - UserBot -# Copyright (C) 2021-2023 TeamUltroid +# Copyright (C) 2021-2025 TeamUltroid # # This file is a part of < https://github.com/TeamUltroid/Ultroid/ > # PLease read the GNU Affero General Public License in diff --git a/plugins/variables.py b/plugins/variables.py index 79d79ea0f6..5c4bb79090 100644 --- a/plugins/variables.py +++ b/plugins/variables.py @@ -1,5 +1,5 @@ # Ultroid - UserBot -# Copyright (C) 2021-2023 TeamUltroid +# Copyright (C) 2021-2025 TeamUltroid # # This file is a part of < https://github.com/TeamUltroid/Ultroid/ > # PLease read the GNU Affero General Public License in @@ -22,7 +22,7 @@ import os -from . import eor, get_string, udB, ultroid_cmd +from . import eor, get_string, udB, ultroid_cmd, HNDLR @ultroid_cmd(pattern="get($| (.*))", fullsudo=True) diff --git a/plugins/vctools.py b/plugins/vctools.py index 432af0bb0c..f7bd69d482 100644 --- a/plugins/vctools.py +++ b/plugins/vctools.py @@ -1,5 +1,5 @@ # Ultroid - UserBot -# Copyright (C) 2021-2023 TeamUltroid +# Copyright (C) 2021-2025 TeamUltroid # # This file is a part of < https://github.com/TeamUltroid/Ultroid/ > # PLease read the GNU Affero General Public License in diff --git a/plugins/videotools.py b/plugins/videotools.py index 508a141a08..b25081bd88 100644 --- a/plugins/videotools.py +++ b/plugins/videotools.py @@ -1,5 +1,5 @@ # Ultroid - UserBot -# Copyright (C) 2021-2023 TeamUltroid +# Copyright (C) 2021-2025 TeamUltroid # # This file is a part of < https://github.com/TeamUltroid/Ultroid/ > # PLease read the GNU Affero General Public License in diff --git a/plugins/warn.py b/plugins/warn.py index b6ffcc108f..dd50014171 100644 --- a/plugins/warn.py +++ b/plugins/warn.py @@ -1,5 +1,5 @@ # Ultroid - UserBot -# Copyright (C) 2021-2023 TeamUltroid +# Copyright (C) 2021-2025 TeamUltroid # # This file is a part of < https://github.com/TeamUltroid/Ultroid/ > # PLease read the GNU Affero General Public License in diff --git a/plugins/webupload.py b/plugins/webupload.py index 2a6c5f57ee..cfb040d1ae 100644 --- a/plugins/webupload.py +++ b/plugins/webupload.py @@ -1,5 +1,5 @@ # Ultroid - UserBot -# Copyright (C) 2021-2023 TeamUltroid +# Copyright (C) 2021-2025 TeamUltroid # # This file is a part of < https://github.com/TeamUltroid/Ultroid/ > # PLease read the GNU Affero General Public License in diff --git a/plugins/words.py b/plugins/words.py index 66f680d7d6..22e5f8d73f 100644 --- a/plugins/words.py +++ b/plugins/words.py @@ -1,5 +1,5 @@ # Ultroid - UserBot -# Copyright (C) 2021-2023 TeamUltroid +# Copyright (C) 2021-2025 TeamUltroid # # This file is a part of < https://github.com/TeamUltroid/Ultroid/ > # PLease read the GNU Affero General Public License in diff --git a/plugins/writer.py b/plugins/writer.py index e5da48d884..4e9f812ffd 100644 --- a/plugins/writer.py +++ b/plugins/writer.py @@ -1,5 +1,5 @@ # Ultroid - UserBot -# Copyright (C) 2021-2023 TeamUltroid +# Copyright (C) 2021-2025 TeamUltroid # # This file is a part of < https://github.com/TeamUltroid/Ultroid/ > # PLease read the GNU Affero General Public License in diff --git a/plugins/youtube.py b/plugins/youtube.py index c0eb34f796..fc129c0d48 100644 --- a/plugins/youtube.py +++ b/plugins/youtube.py @@ -1,5 +1,5 @@ # Ultroid - UserBot -# Copyright (C) 2021-2023 TeamUltroid +# Copyright (C) 2021-2025 TeamUltroid # # This file is a part of < https://github.com/TeamUltroid/Ultroid/ > # PLease read the GNU Affero General Public License in diff --git a/plugins/ziptools.py b/plugins/ziptools.py index 95e400170a..c7006dad7f 100644 --- a/plugins/ziptools.py +++ b/plugins/ziptools.py @@ -1,5 +1,5 @@ # Ultroid - UserBot -# Copyright (C) 2021-2023 TeamUltroid +# Copyright (C) 2021-2025 TeamUltroid # # This file is a part of < https://github.com/TeamUltroid/Ultroid/ > # PLease read the GNU Affero General Public License in diff --git a/pyUltroid/__init__.py b/pyUltroid/__init__.py index 36c727889a..c20629b7f1 100644 --- a/pyUltroid/__init__.py +++ b/pyUltroid/__init__.py @@ -1,5 +1,5 @@ # Ultroid - UserBot -# Copyright (C) 2021-2023 TeamUltroid +# Copyright (C) 2021-2025 TeamUltroid # # This file is a part of < https://github.com/TeamUltroid/Ultroid/ > # PLease read the GNU Affero General Public License in diff --git a/pyUltroid/__main__.py b/pyUltroid/__main__.py index 70100e01d0..c4d4375cad 100644 --- a/pyUltroid/__main__.py +++ b/pyUltroid/__main__.py @@ -1,5 +1,5 @@ # Ultroid - UserBot -# Copyright (C) 2021-2023 TeamUltroid +# Copyright (C) 2021-2025 TeamUltroid # # This file is a part of < https://github.com/TeamUltroid/Ultroid/ > # PLease read the GNU Affero General Public License in diff --git a/pyUltroid/_misc/__init__.py b/pyUltroid/_misc/__init__.py index 0efdf629cc..e144459931 100644 --- a/pyUltroid/_misc/__init__.py +++ b/pyUltroid/_misc/__init__.py @@ -1,5 +1,5 @@ # Ultroid - UserBot -# Copyright (C) 2021-2023 TeamUltroid +# Copyright (C) 2021-2025 TeamUltroid # # This file is a part of < https://github.com/TeamUltroid/Ultroid/ > # PLease read the GNU Affero General Public License in diff --git a/pyUltroid/_misc/_assistant.py b/pyUltroid/_misc/_assistant.py index 1ec817671f..bdc02b21f9 100644 --- a/pyUltroid/_misc/_assistant.py +++ b/pyUltroid/_misc/_assistant.py @@ -1,5 +1,5 @@ # Ultroid - UserBot -# Copyright (C) 2021-2023 TeamUltroid +# Copyright (C) 2021-2025 TeamUltroid # # This file is a part of < https://github.com/TeamUltroid/Ultroid/ > # PLease read the GNU Affero General Public License in diff --git a/pyUltroid/_misc/_decorators.py b/pyUltroid/_misc/_decorators.py index 4422097d47..94cea82976 100644 --- a/pyUltroid/_misc/_decorators.py +++ b/pyUltroid/_misc/_decorators.py @@ -1,5 +1,5 @@ # Ultroid - UserBot -# Copyright (C) 2021-2023 TeamUltroid +# Copyright (C) 2021-2025 TeamUltroid # # This file is a part of < https://github.com/TeamUltroid/Ultroid/ > # PLease read the GNU Affero General Public License in diff --git a/pyUltroid/_misc/_supporter.py b/pyUltroid/_misc/_supporter.py index f098d76dc5..1be92f7f29 100644 --- a/pyUltroid/_misc/_supporter.py +++ b/pyUltroid/_misc/_supporter.py @@ -1,5 +1,5 @@ # Ultroid - UserBot -# Copyright (C) 2021-2023 TeamUltroid +# Copyright (C) 2021-2025 TeamUltroid # # This file is a part of < https://github.com/TeamUltroid/Ultroid/ > # PLease read the GNU Affero General Public License in diff --git a/pyUltroid/_misc/_wrappers.py b/pyUltroid/_misc/_wrappers.py index a1475fdf71..6625ec4d84 100644 --- a/pyUltroid/_misc/_wrappers.py +++ b/pyUltroid/_misc/_wrappers.py @@ -1,5 +1,5 @@ # Ultroid - UserBot -# Copyright (C) 2021-2023 TeamUltroid +# Copyright (C) 2021-2025 TeamUltroid # # This file is a part of < https://github.com/TeamUltroid/Ultroid/ > # PLease read the GNU Affero General Public License in diff --git a/pyUltroid/configs.py b/pyUltroid/configs.py index 6ecf115606..ddf6f05a71 100644 --- a/pyUltroid/configs.py +++ b/pyUltroid/configs.py @@ -1,5 +1,5 @@ # Ultroid - UserBot -# Copyright (C) 2021-2023 TeamUltroid +# Copyright (C) 2021-2025 TeamUltroid # # This file is a part of < https://github.com/TeamUltroid/Ultroid/ > # PLease read the GNU Affero General Public License in diff --git a/pyUltroid/dB/_core.py b/pyUltroid/dB/_core.py index e330e6e3f8..de1c3cdfc2 100644 --- a/pyUltroid/dB/_core.py +++ b/pyUltroid/dB/_core.py @@ -1,5 +1,5 @@ # Ultroid - UserBot -# Copyright (C) 2021-2023 TeamUltroid +# Copyright (C) 2021-2025 TeamUltroid # # This file is a part of < https://github.com/TeamUltroid/Ultroid/ > # PLease read the GNU Affero General Public License in diff --git a/pyUltroid/dB/afk_db.py b/pyUltroid/dB/afk_db.py index 54c9c67242..e6da109fd9 100644 --- a/pyUltroid/dB/afk_db.py +++ b/pyUltroid/dB/afk_db.py @@ -1,5 +1,5 @@ # Ultroid - UserBot -# Copyright (C) 2021-2023 TeamUltroid +# Copyright (C) 2021-2025 TeamUltroid # # This file is a part of < https://github.com/TeamUltroid/Ultroid/ > # PLease read the GNU Affero General Public License in diff --git a/pyUltroid/dB/antiflood_db.py b/pyUltroid/dB/antiflood_db.py index 5cdc7ee112..7c68d25f2a 100644 --- a/pyUltroid/dB/antiflood_db.py +++ b/pyUltroid/dB/antiflood_db.py @@ -1,5 +1,5 @@ # Ultroid - UserBot -# Copyright (C) 2021-2023 TeamUltroid +# Copyright (C) 2021-2025 TeamUltroid # # This file is a part of < https://github.com/TeamUltroid/Ultroid/ > # PLease read the GNU Affero General Public License in diff --git a/pyUltroid/dB/asstcmd_db.py b/pyUltroid/dB/asstcmd_db.py index 421eac857f..9faa4f9cd2 100644 --- a/pyUltroid/dB/asstcmd_db.py +++ b/pyUltroid/dB/asstcmd_db.py @@ -1,5 +1,5 @@ # Ultroid - UserBot -# Copyright (C) 2021-2023 TeamUltroid +# Copyright (C) 2021-2025 TeamUltroid # # This file is a part of < https://github.com/TeamUltroid/Ultroid/ > # PLease read the GNU Affero General Public License in diff --git a/pyUltroid/dB/blacklist_db.py b/pyUltroid/dB/blacklist_db.py index c0d0e5bbdd..f7d9d24098 100644 --- a/pyUltroid/dB/blacklist_db.py +++ b/pyUltroid/dB/blacklist_db.py @@ -1,5 +1,5 @@ # Ultroid - UserBot -# Copyright (C) 2021-2023 TeamUltroid +# Copyright (C) 2021-2025 TeamUltroid # # This file is a part of < https://github.com/TeamUltroid/Ultroid/ > # PLease read the GNU Affero General Public License in diff --git a/pyUltroid/dB/botchat_db.py b/pyUltroid/dB/botchat_db.py index 7b70b574b6..56d7c6f367 100644 --- a/pyUltroid/dB/botchat_db.py +++ b/pyUltroid/dB/botchat_db.py @@ -1,5 +1,5 @@ # Ultroid - UserBot -# Copyright (C) 2021-2023 TeamUltroid +# Copyright (C) 2021-2025 TeamUltroid # # This file is a part of < https://github.com/TeamUltroid/Ultroid/ > # PLease read the GNU Affero General Public License in diff --git a/pyUltroid/dB/echo_db.py b/pyUltroid/dB/echo_db.py index e83e38c5e2..638a64ae49 100644 --- a/pyUltroid/dB/echo_db.py +++ b/pyUltroid/dB/echo_db.py @@ -1,5 +1,5 @@ # Ultroid - UserBot -# Copyright (C) 2021-2023 TeamUltroid +# Copyright (C) 2021-2025 TeamUltroid # # This file is a part of < https://github.com/TeamUltroid/Ultroid/ > # PLease read the GNU Affero General Public License in diff --git a/pyUltroid/dB/filestore_db.py b/pyUltroid/dB/filestore_db.py index ed3db8a46b..90ed5de099 100644 --- a/pyUltroid/dB/filestore_db.py +++ b/pyUltroid/dB/filestore_db.py @@ -1,5 +1,5 @@ # Ultroid - UserBot -# Copyright (C) 2021-2023 TeamUltroid +# Copyright (C) 2021-2025 TeamUltroid # # This file is a part of < https://github.com/TeamUltroid/Ultroid/ > # PLease read the GNU Affero General Public License in diff --git a/pyUltroid/dB/filter_db.py b/pyUltroid/dB/filter_db.py index a76a68ec8e..f70772affa 100644 --- a/pyUltroid/dB/filter_db.py +++ b/pyUltroid/dB/filter_db.py @@ -1,5 +1,5 @@ # Ultroid - UserBot -# Copyright (C) 2021-2023 TeamUltroid +# Copyright (C) 2021-2025 TeamUltroid # # This file is a part of < https://github.com/TeamUltroid/Ultroid/ > # PLease read the GNU Affero General Public License in diff --git a/pyUltroid/dB/forcesub_db.py b/pyUltroid/dB/forcesub_db.py index 650d8d3c22..10b271543d 100644 --- a/pyUltroid/dB/forcesub_db.py +++ b/pyUltroid/dB/forcesub_db.py @@ -1,5 +1,5 @@ # Ultroid - UserBot -# Copyright (C) 2021-2023 TeamUltroid +# Copyright (C) 2021-2025 TeamUltroid # # This file is a part of < https://github.com/TeamUltroid/Ultroid/ > # PLease read the GNU Affero General Public License in diff --git a/pyUltroid/dB/gban_mute_db.py b/pyUltroid/dB/gban_mute_db.py index 6ab7388877..0cd8a8dc99 100644 --- a/pyUltroid/dB/gban_mute_db.py +++ b/pyUltroid/dB/gban_mute_db.py @@ -1,5 +1,5 @@ # Ultroid - UserBot -# Copyright (C) 2021-2023 TeamUltroid +# Copyright (C) 2021-2025 TeamUltroid # # This file is a part of < https://github.com/TeamUltroid/Ultroid/ > # PLease read the GNU Affero General Public License in diff --git a/pyUltroid/dB/greetings_db.py b/pyUltroid/dB/greetings_db.py index 157d269d04..37d3bf6d45 100644 --- a/pyUltroid/dB/greetings_db.py +++ b/pyUltroid/dB/greetings_db.py @@ -1,5 +1,5 @@ # Ultroid - UserBot -# Copyright (C) 2021-2023 TeamUltroid +# Copyright (C) 2021-2025 TeamUltroid # # This file is a part of < https://github.com/TeamUltroid/Ultroid/ > # PLease read the GNU Affero General Public License in diff --git a/pyUltroid/dB/mute_db.py b/pyUltroid/dB/mute_db.py index f9d8e1f02b..1390d1c60c 100644 --- a/pyUltroid/dB/mute_db.py +++ b/pyUltroid/dB/mute_db.py @@ -1,5 +1,5 @@ # Ultroid - UserBot -# Copyright (C) 2021-2023 TeamUltroid +# Copyright (C) 2021-2025 TeamUltroid # # This file is a part of < https://github.com/TeamUltroid/Ultroid/ > # PLease read the GNU Affero General Public License in diff --git a/pyUltroid/dB/notes_db.py b/pyUltroid/dB/notes_db.py index 68c8bde6b0..a2443dbb00 100644 --- a/pyUltroid/dB/notes_db.py +++ b/pyUltroid/dB/notes_db.py @@ -1,5 +1,5 @@ # Ultroid - UserBot -# Copyright (C) 2021-2023 TeamUltroid +# Copyright (C) 2021-2025 TeamUltroid # # This file is a part of < https://github.com/TeamUltroid/Ultroid/ > # PLease read the GNU Affero General Public License in diff --git a/pyUltroid/dB/nsfw_db.py b/pyUltroid/dB/nsfw_db.py index eb39cf4ab4..9a157da368 100644 --- a/pyUltroid/dB/nsfw_db.py +++ b/pyUltroid/dB/nsfw_db.py @@ -1,5 +1,5 @@ # Ultroid - UserBot -# Copyright (C) 2021-2023 TeamUltroid +# Copyright (C) 2021-2025 TeamUltroid # # This file is a part of < https://github.com/TeamUltroid/Ultroid/ > # PLease read the GNU Affero General Public License in diff --git a/pyUltroid/dB/snips_db.py b/pyUltroid/dB/snips_db.py index 8443bd7076..1d945f72c6 100644 --- a/pyUltroid/dB/snips_db.py +++ b/pyUltroid/dB/snips_db.py @@ -1,5 +1,5 @@ # Ultroid - UserBot -# Copyright (C) 2021-2023 TeamUltroid +# Copyright (C) 2021-2025 TeamUltroid # # This file is a part of < https://github.com/TeamUltroid/Ultroid/ > # PLease read the GNU Affero General Public License in diff --git a/pyUltroid/dB/vc_sudos.py b/pyUltroid/dB/vc_sudos.py index 8535db5278..1eb3c8baca 100644 --- a/pyUltroid/dB/vc_sudos.py +++ b/pyUltroid/dB/vc_sudos.py @@ -1,5 +1,5 @@ # Ultroid - UserBot -# Copyright (C) 2021-2023 TeamUltroid +# Copyright (C) 2021-2025 TeamUltroid # # This file is a part of < https://github.com/TeamUltroid/Ultroid/ > # PLease read the GNU Affero General Public License in diff --git a/pyUltroid/dB/warn_db.py b/pyUltroid/dB/warn_db.py index 72eae237cd..622f986435 100644 --- a/pyUltroid/dB/warn_db.py +++ b/pyUltroid/dB/warn_db.py @@ -1,5 +1,5 @@ # Ultroid - UserBot -# Copyright (C) 2021-2023 TeamUltroid +# Copyright (C) 2021-2025 TeamUltroid # # This file is a part of < https://github.com/TeamUltroid/Ultroid/ > # PLease read the GNU Affero General Public License in diff --git a/pyUltroid/exceptions.py b/pyUltroid/exceptions.py index b898a4115b..bdba015f0e 100644 --- a/pyUltroid/exceptions.py +++ b/pyUltroid/exceptions.py @@ -1,5 +1,5 @@ # Ultroid - UserBot -# Copyright (C) 2021-2023 TeamUltroid +# Copyright (C) 2021-2025 TeamUltroid # # This file is a part of < https://github.com/TeamUltroid/Ultroid/ > # PLease read the GNU Affero General Public License in diff --git a/pyUltroid/fns/FastTelethon.py b/pyUltroid/fns/FastTelethon.py index 8aa001dd17..d400a20b45 100644 --- a/pyUltroid/fns/FastTelethon.py +++ b/pyUltroid/fns/FastTelethon.py @@ -1,5 +1,5 @@ # copied from https://github.com/tulir/mautrix-telegram/blob/master/mautrix_telegram/util/parallel_file_transfer.py -# Copyright (C) 2021-2023 Tulir Asokan +# Copyright (C) 2021-2025 Tulir Asokan import asyncio import hashlib diff --git a/pyUltroid/fns/__init__.py b/pyUltroid/fns/__init__.py index f352fdd397..390aec9a64 100644 --- a/pyUltroid/fns/__init__.py +++ b/pyUltroid/fns/__init__.py @@ -1,5 +1,5 @@ # Ultroid - UserBot -# Copyright (C) 2021-2023 TeamUltroid +# Copyright (C) 2021-2025 TeamUltroid # # This file is a part of < https://github.com/TeamUltroid/Ultroid/ > # PLease read the GNU Affero General Public License in diff --git a/pyUltroid/fns/admins.py b/pyUltroid/fns/admins.py index 9c26ced4ef..eb9551bae2 100644 --- a/pyUltroid/fns/admins.py +++ b/pyUltroid/fns/admins.py @@ -1,5 +1,5 @@ # Ultroid - UserBot -# Copyright (C) 2021-2023 TeamUltroid +# Copyright (C) 2021-2025 TeamUltroid # # This file is a part of < https://github.com/TeamUltroid/Ultroid/ > # PLease read the GNU Affero General Public License in diff --git a/pyUltroid/fns/gDrive.py b/pyUltroid/fns/gDrive.py index 238d3717b7..a9a6eeba17 100644 --- a/pyUltroid/fns/gDrive.py +++ b/pyUltroid/fns/gDrive.py @@ -1,5 +1,5 @@ # Ultroid - UserBot -# Copyright (C) 2021-2023 TeamUltroid +# Copyright (C) 2021-2025 TeamUltroid # # This file is a part of < https://github.com/TeamUltroid/Ultroid/ > # PLease read the GNU Affero General Public License in diff --git a/pyUltroid/fns/helper.py b/pyUltroid/fns/helper.py index 16d00ea177..105208bd13 100644 --- a/pyUltroid/fns/helper.py +++ b/pyUltroid/fns/helper.py @@ -1,5 +1,5 @@ # Ultroid - UserBot -# Copyright (C) 2021-2023 TeamUltroid +# Copyright (C) 2021-2025 TeamUltroid # # This file is a part of < https://github.com/TeamUltroid/Ultroid/ > # PLease read the GNU Affero General Public License in diff --git a/pyUltroid/fns/info.py b/pyUltroid/fns/info.py index ebb64b91dd..326f680dfb 100644 --- a/pyUltroid/fns/info.py +++ b/pyUltroid/fns/info.py @@ -1,5 +1,5 @@ # Ultroid - UserBot -# Copyright (C) 2021-2023 TeamUltroid +# Copyright (C) 2021-2025 TeamUltroid # # This file is a part of < https://github.com/TeamUltroid/Ultroid/ > # PLease read the GNU Affero General Public License in diff --git a/pyUltroid/fns/misc.py b/pyUltroid/fns/misc.py index ffaa142c20..69ce9e94a7 100644 --- a/pyUltroid/fns/misc.py +++ b/pyUltroid/fns/misc.py @@ -1,5 +1,5 @@ # Ultroid - UserBot -# Copyright (C) 2021-2023 TeamUltroid +# Copyright (C) 2021-2025 TeamUltroid # # This file is a part of < https://github.com/TeamUltroid/Ultroid/ > # PLease read the GNU Affero General Public License in diff --git a/pyUltroid/fns/tools.py b/pyUltroid/fns/tools.py index 334838b7cb..0caedad1a3 100644 --- a/pyUltroid/fns/tools.py +++ b/pyUltroid/fns/tools.py @@ -1,5 +1,5 @@ # Ultroid - UserBot -# Copyright (C) 2021-2023 TeamUltroid +# Copyright (C) 2021-2025 TeamUltroid # # This file is a part of < https://github.com/TeamUltroid/Ultroid/ > # PLease read the GNU Affero General Public License in diff --git a/pyUltroid/fns/ytdl.py b/pyUltroid/fns/ytdl.py index f8c05f043a..c4d97d107d 100644 --- a/pyUltroid/fns/ytdl.py +++ b/pyUltroid/fns/ytdl.py @@ -1,5 +1,5 @@ # Ultroid - UserBot -# Copyright (C) 2021-2023 TeamUltroid +# Copyright (C) 2021-2025 TeamUltroid # # This file is a part of < https://github.com/TeamUltroid/Ultroid/ > # PLease read the GNU Affero General Public License in diff --git a/pyUltroid/loader.py b/pyUltroid/loader.py index a3aaa54937..a5b4c52580 100644 --- a/pyUltroid/loader.py +++ b/pyUltroid/loader.py @@ -1,5 +1,5 @@ # Ultroid - UserBot -# Copyright (C) 2021-2023 TeamUltroid +# Copyright (C) 2021-2025 TeamUltroid # # This file is a part of < https://github.com/TeamUltroid/Ultroid/ > # PLease read the GNU Affero General Public License in diff --git a/pyUltroid/startup/BaseClient.py b/pyUltroid/startup/BaseClient.py index 609e16d7a1..763159ce00 100644 --- a/pyUltroid/startup/BaseClient.py +++ b/pyUltroid/startup/BaseClient.py @@ -1,5 +1,5 @@ # Ultroid - UserBot -# Copyright (C) 2021-2023 TeamUltroid +# Copyright (C) 2021-2025 TeamUltroid # # This file is a part of < https://github.com/TeamUltroid/Ultroid/ > # PLease read the GNU Affero General Public License in diff --git a/pyUltroid/startup/__init__.py b/pyUltroid/startup/__init__.py index ff62baf3c2..8d8063a535 100644 --- a/pyUltroid/startup/__init__.py +++ b/pyUltroid/startup/__init__.py @@ -1,5 +1,5 @@ # Ultroid - UserBot -# Copyright (C) 2021-2023 TeamUltroid +# Copyright (C) 2021-2025 TeamUltroid # # This file is a part of < https://github.com/TeamUltroid/Ultroid/ > # PLease read the GNU Affero General Public License in diff --git a/pyUltroid/startup/_database.py b/pyUltroid/startup/_database.py index 782b2ea28d..f7bc274524 100644 --- a/pyUltroid/startup/_database.py +++ b/pyUltroid/startup/_database.py @@ -1,5 +1,5 @@ # Ultroid - UserBot -# Copyright (C) 2021-2023 TeamUltroid +# Copyright (C) 2021-2025 TeamUltroid # # This file is a part of < https://github.com/TeamUltroid/Ultroid/ > # PLease read the GNU Affero General Public License in diff --git a/pyUltroid/startup/_extra.py b/pyUltroid/startup/_extra.py index bb5dadd287..e71907f841 100644 --- a/pyUltroid/startup/_extra.py +++ b/pyUltroid/startup/_extra.py @@ -1,5 +1,5 @@ # Ultroid - UserBot -# Copyright (C) 2021-2023 TeamUltroid +# Copyright (C) 2021-2025 TeamUltroid # # This file is a part of < https://github.com/TeamUltroid/Ultroid/ > # PLease read the GNU Affero General Public License in diff --git a/pyUltroid/startup/connections.py b/pyUltroid/startup/connections.py index c848653e15..005f199218 100644 --- a/pyUltroid/startup/connections.py +++ b/pyUltroid/startup/connections.py @@ -1,5 +1,5 @@ # Ultroid - UserBot -# Copyright (C) 2021-2023 TeamUltroid +# Copyright (C) 2021-2025 TeamUltroid # # This file is a part of < https://github.com/TeamUltroid/Ultroid/ > # PLease read the GNU Affero General Public License in diff --git a/pyUltroid/startup/funcs.py b/pyUltroid/startup/funcs.py index 60458f9b79..593a8808e2 100644 --- a/pyUltroid/startup/funcs.py +++ b/pyUltroid/startup/funcs.py @@ -1,5 +1,5 @@ # Ultroid - UserBot -# Copyright (C) 2021-2023 TeamUltroid +# Copyright (C) 2021-2025 TeamUltroid # # This file is a part of < https://github.com/TeamUltroid/Ultroid/ > # PLease read the GNU Affero General Public License in diff --git a/pyUltroid/startup/loader.py b/pyUltroid/startup/loader.py index 03c87bb2c9..5f49114a2e 100644 --- a/pyUltroid/startup/loader.py +++ b/pyUltroid/startup/loader.py @@ -1,5 +1,5 @@ # Ultroid - UserBot -# Copyright (C) 2021-2023 TeamUltroid +# Copyright (C) 2021-2025 TeamUltroid # # This file is a part of < https://github.com/TeamUltroid/Ultroid/ > # PLease read the GNU Affero General Public License in diff --git a/pyUltroid/startup/utils.py b/pyUltroid/startup/utils.py index 0472ba13db..5445dbf534 100644 --- a/pyUltroid/startup/utils.py +++ b/pyUltroid/startup/utils.py @@ -1,5 +1,5 @@ # Ultroid - UserBot -# Copyright (C) 2021-2023 TeamUltroid +# Copyright (C) 2021-2025 TeamUltroid # # This file is a part of < https://github.com/TeamUltroid/Ultroid/ > # PLease read the GNU Affero General Public License in diff --git a/pyUltroid/version.py b/pyUltroid/version.py index 3bf4e47bf0..2bd0e369e0 100644 --- a/pyUltroid/version.py +++ b/pyUltroid/version.py @@ -1,2 +1,2 @@ -__version__ = "2023.02.20" -ultroid_version = "0.9" +__version__ = "2025.02.19" +ultroid_version = "2.0" diff --git a/resources/session/session.sh b/resources/session/session.sh index bd09927ed9..bec7c794c5 100644 --- a/resources/session/session.sh +++ b/resources/session/session.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash # Ultroid - UserBot -# Copyright (C) 2021-2023 TeamUltroid +# Copyright (C) 2021-2025 TeamUltroid # # This file is a part of < https://github.com/TeamUltroid/Ultroid/ > # PLease read the GNU Affero General Public License in . diff --git a/resources/session/ssgen.py b/resources/session/ssgen.py index f41260b921..e3522cf150 100644 --- a/resources/session/ssgen.py +++ b/resources/session/ssgen.py @@ -1,6 +1,6 @@ #!/usr/bin/python3 # Ultroid - UserBot -# Copyright (C) 2021-2023 TeamUltroid +# Copyright (C) 2021-2025 TeamUltroid # # This file is a part of < https://github.com/TeamUltroid/Ultroid/ > # PLease read the GNU Affero General Public License in diff --git a/resources/startup/_termux.py b/resources/startup/_termux.py index d89aee2cc5..95a6527dc6 100644 --- a/resources/startup/_termux.py +++ b/resources/startup/_termux.py @@ -1,6 +1,6 @@ # /usr/bin/python3 # Ultroid - UserBot -# Copyright (C) 2021-2023 TeamUltroid +# Copyright (C) 2021-2025 TeamUltroid # # This file is a part of < https://github.com/TeamUltroid/Ultroid/ > # Please read the GNU Affero General Public License in diff --git a/resources/startup/locals.py b/resources/startup/locals.py index 6d6fc55d9a..94b1f68af0 100644 --- a/resources/startup/locals.py +++ b/resources/startup/locals.py @@ -1,6 +1,6 @@ # /usr/bin/python3 # Ultroid - UserBot -# Copyright (C) 2021-2023 TeamUltroid +# Copyright (C) 2021-2025 TeamUltroid # # This file is a part of < https://github.com/TeamUltroid/Ultroid/ > # Please read the GNU Affero General Public License in diff --git a/sessiongen b/sessiongen index b5032ac61c..c25ce25665 100644 --- a/sessiongen +++ b/sessiongen @@ -1,6 +1,6 @@ #!/usr/bin/env bash # Ultroid - UserBot -# Copyright (C) 2021-2023 TeamUltroid +# Copyright (C) 2021-2025 TeamUltroid # # This file is a part of < https://github.com/TeamUltroid/Ultroid/ > # PLease read the GNU Affero General Public License in . diff --git a/startup b/startup index 2e25faa2e2..4c75a102ea 100644 --- a/startup +++ b/startup @@ -1,6 +1,6 @@ #!/usr/bin/env bash # Ultroid - UserBot -# Copyright (C) 2021-2023 TeamUltroid +# Copyright (C) 2021-2025 TeamUltroid # # This file is a part of < https://github.com/TeamUltroid/Ultroid/ > # PLease read the GNU Affero General Public License in . diff --git a/strings/strings/jp.yml b/strings/strings/jp.yml index fcd9913299..b796ae1a1c 100644 --- a/strings/strings/jp.yml +++ b/strings/strings/jp.yml @@ -232,7 +232,7 @@ cvt_8: "`読み取り可能なファイルではありません。` " # eventsofday eod_1: "🎊**今日のイベント** \n \n" -eod_2: "•** {} / 2021-2023のイベント** \n \n" +eod_2: "•** {} / 2021-2025のイベント** \n \n" # core core_1: "モジュールが見つかりました" From 90199a4a802bf9c43b218dc07cce49fa20d9aa8d Mon Sep 17 00:00:00 2001 From: Devesh Pal Date: Fri, 21 Feb 2025 23:03:57 +0530 Subject: [PATCH 2/2] Update optional-requirements.txt --- resources/startup/optional-requirements.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/resources/startup/optional-requirements.txt b/resources/startup/optional-requirements.txt index 2876b6cee8..224c30080a 100644 --- a/resources/startup/optional-requirements.txt +++ b/resources/startup/optional-requirements.txt @@ -24,6 +24,7 @@ pypdf2>=1.26.0 pytz qrcode requests +twikit tabulate telegraph tgcrypto