Ultroid v0.2.1 [Fixes]
Co-authored-by: Devesh Pal <New-dev0@users.noreply.github.com> Co-authored-by: Amit Sharma <48654350+buddhhu@users.noreply.github.com> Co-authored-by: M̲αραт <marat2509@users.noreply.github.com>
This commit is contained in:
12
.github/PULL_REQUEST_TEMPLATE/pull_request_template.md
vendored
Normal file
12
.github/PULL_REQUEST_TEMPLATE/pull_request_template.md
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
# Title
|
||||
|
||||
### Detailed Description [Optional] :
|
||||
detailed_description_here
|
||||
|
||||
### Issue Number [Optional] :
|
||||
Issue Number here if your pull request close any issue or is linked to.
|
||||
|
||||
----
|
||||
### What defines you?
|
||||
- [ ] Hacktoberfest Participant.
|
||||
- [ ] Contributor
|
||||
16
.github/workflows/greetings.yml
vendored
16
.github/workflows/greetings.yml
vendored
@@ -1,16 +0,0 @@
|
||||
name: Greetings
|
||||
|
||||
on: [pull_request, issues]
|
||||
|
||||
jobs:
|
||||
greeting:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
issues: write
|
||||
pull-requests: write
|
||||
steps:
|
||||
- uses: actions/first-interaction@v1
|
||||
with:
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
issue-message: 'Thanks for Opening This Issue, we will look into it soon!'
|
||||
pr-message: 'Thanks for Your Contribution. It will be reviewed soon, Useless Prs are Closed Immediately'
|
||||
@@ -1125,6 +1125,7 @@ async def chbot(event):
|
||||
[Button.inline("Cʜᴀᴛ Bᴏᴛ Oғғ", data="ofchbot")],
|
||||
[Button.inline("Bᴏᴛ Wᴇʟᴄᴏᴍᴇ", data="bwel")],
|
||||
[Button.inline("Bᴏᴛ Wᴇʟᴄᴏᴍᴇ Mᴇᴅɪᴀ", data="botmew")],
|
||||
[Button.inline("Bᴏᴛ Iɴғᴏ Tᴇxᴛ", data="botinfe")],
|
||||
[Button.inline("Fᴏʀᴄᴇ Sᴜʙsᴄʀɪʙᴇ", data="pmfs")],
|
||||
[Button.inline("« Bᴀᴄᴋ", data="setter")],
|
||||
],
|
||||
@@ -1132,6 +1133,21 @@ async def chbot(event):
|
||||
)
|
||||
|
||||
|
||||
@callback("botinfe", owner=True)
|
||||
async def hhh(e):
|
||||
async with e.client.conversation(e.chat_id) as conv:
|
||||
await conv.send_message(
|
||||
"Send message to set to Display, when user Press Info button in Bot Welcome!\n\nsend `False` to completely remove that button.."
|
||||
)
|
||||
msg = await conv.get_response()
|
||||
if msg.media or msg.text.startswith("/"):
|
||||
return await conv.send_message(
|
||||
"Terminated!", buttons=get_back_button("chatbot")
|
||||
)
|
||||
udB.set("BOT_INFO_START", msg.text)
|
||||
await conv.send_message("Done!", buttons=get_back_button("chatbot"))
|
||||
|
||||
|
||||
@callback("pmfs", owner=True)
|
||||
async def heheh(event):
|
||||
Ll = []
|
||||
|
||||
@@ -9,6 +9,7 @@ from datetime import datetime
|
||||
|
||||
from pytz import timezone as tz
|
||||
from pyUltroid.dB.asst_fns import *
|
||||
from pyUltroid.dB.sudos import is_fullsudo
|
||||
from pyUltroid.functions.helper import inline_mention
|
||||
from pyUltroid.misc import owner_and_sudos
|
||||
from telethon import Button, events
|
||||
@@ -86,7 +87,7 @@ async def ultroid(event):
|
||||
await event.client.send_message(
|
||||
int(udB["LOG_CHANNEL"]), msg, buttons=buttons
|
||||
)
|
||||
if str(event.sender_id) not in owner_and_sudos():
|
||||
if (event.sender_id != OWNER_ID) and not is_fullsudo(event.sender_id):
|
||||
ok = ""
|
||||
u = await event.client.get_entity(event.chat_id)
|
||||
if not udB.get("STARTMSG"):
|
||||
@@ -153,8 +154,7 @@ async def bdcast(event):
|
||||
await conv.send_message(
|
||||
"Enter your broadcast message.\nUse /cancel to stop the broadcast.",
|
||||
)
|
||||
response = conv.wait_event(events.NewMessage(chats=OWNER_ID))
|
||||
response = await response
|
||||
response = await conv.get_response()
|
||||
if response.message == "/cancel":
|
||||
return await conv.send_message("Cancelled!!")
|
||||
success = 0
|
||||
|
||||
@@ -26,6 +26,7 @@ from telethon.tl import functions, types
|
||||
from strings import get_string
|
||||
|
||||
Redis = udB.get
|
||||
client = bot = ultroid_bot
|
||||
|
||||
OWNER_NAME = ultroid_bot.me.first_name
|
||||
OWNER_ID = ultroid_bot.me.id
|
||||
|
||||
@@ -435,7 +435,7 @@ async def on_plug_in_callback_query_handler(event):
|
||||
)
|
||||
buttons.append(
|
||||
[
|
||||
Button.inline("« Bᴀᴄᴋ", data="buck"),
|
||||
Button.inline("« Bᴀᴄᴋ", data="back"),
|
||||
]
|
||||
)
|
||||
try:
|
||||
@@ -622,7 +622,7 @@ async def ibuild(e):
|
||||
txt = ok.get("msg") or None
|
||||
pic = ok.get("media") or None
|
||||
btn = ok.get("button") or None
|
||||
if not (pic and txt):
|
||||
if not (pic or txt):
|
||||
txt = "Hey!"
|
||||
if pic:
|
||||
try:
|
||||
|
||||
@@ -25,7 +25,7 @@ from ._inline import something
|
||||
|
||||
@ultroid_cmd(pattern="button")
|
||||
async def butt(event):
|
||||
media, text = None, None
|
||||
media, wut, text = None, None, None
|
||||
if event.reply_to:
|
||||
wt = await event.get_reply_message()
|
||||
if wt.text:
|
||||
|
||||
@@ -35,7 +35,7 @@ async def im_lonely_chat_with_me(event):
|
||||
message = event.text.split(" ", 1)[1]
|
||||
except IndexError:
|
||||
return await eod(event, get_string("tban_1"), time=10)
|
||||
reply_ = get_chatbot_reply(event, message=message)
|
||||
reply_ = await get_chatbot_reply(message=message)
|
||||
await eor(event, reply_)
|
||||
|
||||
|
||||
|
||||
@@ -85,7 +85,7 @@ async def _(e):
|
||||
f'mediainfo --fullscan """{file.name}""" | grep "Frame count"'
|
||||
)
|
||||
total_frames = x.split(":")[1].split("\n")[0]
|
||||
progress = "progress.txt"
|
||||
progress = f"progress-{c_time}.txt"
|
||||
with open(progress, "w") as fk:
|
||||
pass
|
||||
proce = await asyncio.create_subprocess_shell(
|
||||
|
||||
@@ -35,19 +35,8 @@ except ImportError:
|
||||
|
||||
from PIL import Image
|
||||
from telegraph import upload_file as uf
|
||||
from telethon.tl.types import MessageMediaPhoto as photu
|
||||
|
||||
from . import (
|
||||
bash,
|
||||
downloader,
|
||||
eod,
|
||||
eor,
|
||||
get_paste,
|
||||
get_string,
|
||||
udB,
|
||||
ultroid_cmd,
|
||||
uploader,
|
||||
)
|
||||
from . import bash, downloader, eor, get_paste, get_string, udB, ultroid_cmd, uploader
|
||||
|
||||
opn = []
|
||||
|
||||
@@ -57,11 +46,7 @@ opn = []
|
||||
)
|
||||
async def _(e):
|
||||
r = await e.get_reply_message()
|
||||
if not (r or r.file):
|
||||
return await eod(e, get_string("cvt_4"))
|
||||
if not r.file.media.thumbs:
|
||||
return await eod(e, get_string("cvt_5"))
|
||||
if isinstance(r.media, photu):
|
||||
if r.photo:
|
||||
dl = await r.download_media()
|
||||
elif r.document and r.document.thumbs:
|
||||
dl = await r.download_media(thumb=-1)
|
||||
|
||||
@@ -213,15 +213,15 @@ if sett == "True":
|
||||
),
|
||||
)
|
||||
async def permitpm(event):
|
||||
t_in = Redis("INLINE_PM")
|
||||
inline_pm = t_in == "True"
|
||||
inline_pm = False
|
||||
if Redis("INLINE_PM") and Redis("INLINE_PM") == "True":
|
||||
inline_pm = not inline_pm
|
||||
user = await event.get_sender()
|
||||
if user.bot or user.is_self or user.verified:
|
||||
return
|
||||
if user.id in DEVLIST:
|
||||
return
|
||||
apprv = is_approved(user.id)
|
||||
if not apprv and event.text != UND:
|
||||
if not is_approved(user.id) and event.text != UND:
|
||||
if Redis("MOVE_ARCHIVE") == "True":
|
||||
try:
|
||||
await ultroid_bot.edit_folder(user.id, folder=1)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# Important Requirements here.
|
||||
|
||||
https://github.com/New-dev0/Telethon/archive/Tarzan.zip
|
||||
py-Ultroid==2021.10.10
|
||||
py-Ultroid==2021.10.11.1
|
||||
pytgcalls==3.0.0.dev19
|
||||
|
||||
@@ -5,6 +5,7 @@ aiohttp==3.7.4.post0
|
||||
akinator.py
|
||||
apscheduler
|
||||
bs4
|
||||
cairosvg
|
||||
enhancer==0.1.8
|
||||
gdown
|
||||
gingerit
|
||||
|
||||
Reference in New Issue
Block a user