mirror of
https://github.com/pyrogram/pyrogram
synced 2025-08-29 13:27:47 +00:00
Add missing await keywords
This commit is contained in:
parent
aa6c935d83
commit
3cf758433d
@ -24,7 +24,7 @@ from pyrogram.client.ext import BaseClient
|
||||
|
||||
|
||||
class SendDice(BaseClient):
|
||||
def send_dice(
|
||||
async def send_dice(
|
||||
self,
|
||||
chat_id: Union[int, str],
|
||||
disable_notification: bool = None,
|
||||
@ -68,9 +68,9 @@ class SendDice(BaseClient):
|
||||
app.send_dice("pyrogramlounge")
|
||||
"""
|
||||
|
||||
r = self.send(
|
||||
r = await self.send(
|
||||
functions.messages.SendMedia(
|
||||
peer=self.resolve_peer(chat_id),
|
||||
peer=await self.resolve_peer(chat_id),
|
||||
media=types.InputMediaDice(),
|
||||
silent=disable_notification or None,
|
||||
reply_to_msg_id=reply_to_message_id,
|
||||
@ -82,11 +82,8 @@ class SendDice(BaseClient):
|
||||
)
|
||||
|
||||
for i in r.updates:
|
||||
if isinstance(
|
||||
i,
|
||||
(types.UpdateNewMessage, types.UpdateNewChannelMessage, types.UpdateNewScheduledMessage)
|
||||
):
|
||||
return pyrogram.Message._parse(
|
||||
if isinstance(i, (types.UpdateNewMessage, types.UpdateNewChannelMessage, types.UpdateNewScheduledMessage)):
|
||||
return await pyrogram.Message._parse(
|
||||
self, i.message,
|
||||
{i.id: i for i in r.users},
|
||||
{i.id: i for i in r.chats},
|
||||
|
Loading…
x
Reference in New Issue
Block a user