Skip to content
This repository has been archived by the owner on Nov 27, 2024. It is now read-only.

Commit

Permalink
Merge branch 'develop' of github.com:gabrielmaialva33/winx-bot into d…
Browse files Browse the repository at this point in the history
…evelop
  • Loading branch information
gabrielmaialva33 committed Jun 30, 2024
2 parents 7360a50 + 6bf91e4 commit e6a381e
Showing 1 changed file with 18 additions and 14 deletions.
32 changes: 18 additions & 14 deletions WinxMusic/core/call.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@
import pytgcalls.types
from ntgcalls import TelegramServerError
from pyrogram import Client
from pyrogram.errors import ChatAdminRequired, UserNotParticipant, UserAlreadyParticipant
from pyrogram.errors import (
ChatAdminRequired,
UserAlreadyParticipant,
UserNotParticipant,
)
from pyrogram.types import InlineKeyboardMarkup
from pytgcalls import PyTgCalls, filters
from pytgcalls.exceptions import AlreadyJoinedError, NoActiveGroupCall
Expand All @@ -18,7 +22,7 @@
from strings import get_string
from WinxMusic import LOGGER, YouTube, app
from WinxMusic.misc import db
from WinxMusic.utils import get_audio_bitrate, get_video_bitrate, get_assistant
from WinxMusic.utils import get_assistant, get_audio_bitrate, get_video_bitrate
from WinxMusic.utils.database import (
add_active_chat,
add_active_video_chat,
Expand Down Expand Up @@ -326,11 +330,11 @@ async def force_stop_stream(self, chat_id: int):
pass

async def skip_stream(
self,
chat_id: int,
link: str,
video: Union[bool, str] = None,
image: Union[bool, str] = None,
self,
chat_id: int,
link: str,
video: Union[bool, str] = None,
image: Union[bool, str] = None,
):
assistant = await group_assistant(self, chat_id)
audio_stream_quality = await get_audio_bitrate(chat_id)
Expand Down Expand Up @@ -439,12 +443,12 @@ async def join_assistant(self, original_chat_id, chat_id):
raise AssistantErr(_["call_3"].format(e))

async def join_call(
self,
chat_id: int,
original_chat_id: int,
link,
video: Union[bool, str] = None,
image: Union[bool, str] = None,
self,
chat_id: int,
original_chat_id: int,
link,
video: Union[bool, str] = None,
image: Union[bool, str] = None,
):
assistant = await group_assistant(self, chat_id)
audio_stream_quality = await get_audio_bitrate(chat_id)
Expand Down Expand Up @@ -851,7 +855,7 @@ async def stream_end_handler(client, update: pytgcalls.types.Update):
@self.five.on_update(filters.chat_update(GroupCallParticipant.Action.UPDATED))
async def participants_change_handler(client, update: Update):
if not isinstance(
update, GroupCallParticipant.Action.JOINED
update, GroupCallParticipant.Action.JOINED
) and not isinstance(update, GroupCallParticipant.Action.LEFT):
return
chat_id = update.chat_id
Expand Down

0 comments on commit e6a381e

Please sign in to comment.