v0.0.9 18/07/2021

Co-authored-by: New-dev0 <New-dev0@users.noreply.github.com>
Co-authored-by: Aditya <me@xditya.me>
Co-authored-by: Amit Sharma <48654350+buddhhu@users.noreply.github.com>
Co-authored-by: sppidy <sppidy@users.noreply.github.com>
Co-authored-by: Arnab Paryali <Arnabxd@users.noreply.github.com>
Co-authored-by: divkix <divkix@users.noreply.github.com>
Co-authored-by: hellboi_atul <hellboi-atul@users.noreply.github.com>
Co-authored-by: Programming Error <error@notavailable.live>
This commit is contained in:
1Danish-00
2021-07-18 17:47:15 +05:30
parent 71fddc8844
commit 386eff647c
140 changed files with 3363 additions and 3068 deletions

View File

@@ -4,7 +4,6 @@
# This file is a part of < https://github.com/TeamUltroid/Ultroid/ >
# PLease read the GNU Affero General Public License in
# <https://www.github.com/TeamUltroid/Ultroid/blob/main/LICENSE/>.
"""
✘ Commands Available -
@@ -32,7 +31,6 @@
Get translated message.
"""
import os
import time
from asyncio.exceptions import TimeoutError
@@ -51,9 +49,7 @@ from . import *
from . import humanbytes as hb
@ultroid_cmd(
pattern="tr",
)
@ultroid_cmd(pattern="tr", type=["official", "manager"], ignore_dualmode=True)
async def _(event):
if len(event.text) > 3:
if not event.text[3] == " ":
@@ -79,9 +75,7 @@ async def _(event):
await eod(xx, str(exc), time=10)
@ultroid_cmd(
pattern="id ?(.*)",
)
@ultroid_cmd(pattern="id ?(.*)", type=["official", "manager"], ignore_dualmode=True)
async def _(event):
if event.reply_to_msg_id:
await event.get_input_chat()
@@ -119,14 +113,11 @@ async def _(event):
@ultroid_cmd(
pattern="bots ?(.*)",
groups_only=True,
type=["official", "manager"],
ignore_dualmode=True,
)
async def _(ult):
await ult.edit("`...`")
if ult.is_private:
user = await ult.get_chat()
if not user.bot:
return await ult.edit("`Seariously ?`")
mentions = "**Bots in this Chat**: \n"
input_str = ult.pattern_match.group(1)
to_write_chat = await ult.get_input_chat()
@@ -136,12 +127,12 @@ async def _(ult):
else:
mentions = f"**Bots in **{input_str}: \n"
try:
chat = await ultroid_bot.get_entity(input_str)
chat = await ult.client.get_entity(input_str)
except Exception as e:
await eor(ult, str(e))
return None
try:
async for x in ultroid_bot.iter_participants(
async for x in ult.client.iter_participants(
chat,
filter=ChannelParticipantsBots,
):
@@ -367,7 +358,7 @@ async def lastname(steal):
id = f"/search_id {user_id}"
lol = await eor(steal, "`Processing !...`")
try:
async with ultroid_bot.conversation(chat) as conv:
async with steal.client.conversation(chat) as conv:
try:
msg = await conv.send_message(id)
response = await conv.get_response()