Example #1
0
    allow_channels=False,
    allow_private=False,
    allow_via_bot=False,
    only_admins=True,
)
@check_vc_perm
async def vc_title(message: Message):
    """Change title of voice chat"""
    title = message.input_str
    if not title:
        return await message.err("No Input Found !", del_in=10)

    if not (group_call := (await get_group_call(message))):
        return
    if await userge.send(
            EditGroupCallTitle(call=group_call, title=title.strip())):
        await message.edit(f"**Successfully** Changed VC Title to `{title}`",
                           del_in=5)
    else:
        await message.edit("Oops 😬, Something Went Wrong !", del_in=5)


@userge.on_cmd(
    "vc_unmute",
    about={
        "header": "unmute a person in voice chat",
        "examples": "{tr}vc_unmute 519198181",
        "flags": {
            "-all": "unmute all"
        },
    },
Example #2
0
async def change_vc_title(title: str, chat_id):
    peer = await app.resolve_peer(chat_id)
    chat = await app.send(GetFullChannel(channel=peer))
    data = EditGroupCallTitle(call=chat.full_chat.call, title=title)
    await app.send(data)
Example #3
0
    },
    allow_channels=False,
    allow_private=False,
    allow_via_bot=False,
    only_admins=True,
)
@check_vc_perm
async def vc_title(message: Message):
    """Change title of voice chat"""
    if not message.input_str:
        return await message.err("No Input Found !", del_in=10)

    if not (group_call := (await get_group_call(message))):
        return
    await userge.send(
        EditGroupCallTitle(call=group_call, title=message.input_str.strip())
    )


@userge.on_cmd(
    "vc_unmute",
    about={
        "header": "unmute a person in voice chat",
        "examples": "{tr}vc_unmute 519198181",
        "flags": {"-all": "unmute all"},
    },
    allow_channels=False,
    allow_private=False,
    allow_via_bot=False,
    only_admins=True,
)
Example #4
0
 async def set_title(self, title):
     call = InputGroupCall(
         id=self.group_call.group_call.id,
         access_hash=self.group_call.group_call.access_hash)
     raw_fun = EditGroupCallTitle(call=call, title=title)
     await self.group_call.client.send(raw_fun)
Example #5
0
    },
    allow_channels=False,
    allow_private=False,
    allow_via_bot=False,
    only_admins=True,
)
@check_vc_perm
async def vc_title(message: Message):
    """Change title of group call"""
    title = message.input_str
    if not title:
        return await message.err("No Input Found !", del_in=10)

    if not (group_call := (await get_group_call(message))):
        return
    if await userge.send(EditGroupCallTitle(call=group_call, title=title.strip())):
        await message.edit(f"**Successfully** Changed VC Title to `{title}`", del_in=5)
    else:
        await message.edit("Oops 😬, Something Went Wrong !", del_in=5)


@userge.on_cmd(
    "gcunmute",
    about={
        "header": "unmute a person in group call",
        "examples": "{tr}gcunmute 519198181",
        "flags": {"-all": "unmute all"},
    },
    allow_channels=False,
    allow_private=False,
    allow_via_bot=False,