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:
@@ -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 -
|
||||
|
||||
@@ -27,8 +26,6 @@
|
||||
d- days
|
||||
Mute user in current chat with time.
|
||||
"""
|
||||
|
||||
|
||||
from pyUltroid.functions.all import ban_time
|
||||
from pyUltroid.functions.mute_db import is_muted, mute, unmute
|
||||
from telethon import events
|
||||
@@ -74,9 +71,7 @@ async def startmute(event):
|
||||
pass
|
||||
else:
|
||||
return await eor(xx, "`No proper admin rights...`", time=5)
|
||||
elif "creator" in vars(chat):
|
||||
pass
|
||||
elif private:
|
||||
elif "creator" in vars(chat) or private:
|
||||
pass
|
||||
else:
|
||||
return await eod(xx, "`No proper admin rights...`", time=5)
|
||||
@@ -90,7 +85,7 @@ async def startmute(event):
|
||||
|
||||
|
||||
@ultroid_cmd(
|
||||
pattern="undmute ?(.*)",
|
||||
pattern="undmute ?(.*)", type=["official", "manager"], ignore_dualmode=True
|
||||
)
|
||||
async def endmute(event):
|
||||
xx = await eor(event, "`Unmuting...`")
|
||||
@@ -125,6 +120,8 @@ async def endmute(event):
|
||||
@ultroid_cmd(
|
||||
pattern="tmute",
|
||||
groups_only=True,
|
||||
type=["official", "manager"],
|
||||
ignore_dualmode=True,
|
||||
)
|
||||
async def _(e):
|
||||
xx = await eor(e, "`Muting...`")
|
||||
@@ -175,6 +172,8 @@ async def _(e):
|
||||
@ultroid_cmd(
|
||||
pattern="unmute ?(.*)",
|
||||
groups_only=True,
|
||||
type=["official", "manager"],
|
||||
ignore_dualmode=True,
|
||||
)
|
||||
async def _(e):
|
||||
xx = await eor(e, "`Unmuting...`")
|
||||
@@ -214,6 +213,8 @@ async def _(e):
|
||||
@ultroid_cmd(
|
||||
pattern="mute ?(.*)",
|
||||
groups_only=True,
|
||||
type=["official", "manager"],
|
||||
ignore_dualmode=True,
|
||||
)
|
||||
async def _(e):
|
||||
xx = await eor(e, "`Muting...`")
|
||||
@@ -246,7 +247,6 @@ async def _(e):
|
||||
await eod(
|
||||
xx,
|
||||
f"`Successfully Muted` [{name}](tg://user?id={userid}) `in {chat.title}`",
|
||||
time=5,
|
||||
)
|
||||
except BaseException as m:
|
||||
await eod(xx, f"`{str(m)}`")
|
||||
|
||||
Reference in New Issue
Block a user