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

Commit

Permalink
Merge pull request #113 from TeamKillerX/dev
Browse files Browse the repository at this point in the history
_
  • Loading branch information
xtsea authored Sep 28, 2024
2 parents 8e29b91 + 44089cc commit 7705891
Showing 1 changed file with 3 additions and 13 deletions.
16 changes: 3 additions & 13 deletions RyuzakiLib/fastapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,22 +102,12 @@ async def authorize_access_token(self, request=None):
token = await self.auth.auth0.authorize_access_token(request)
return token

async def send_message_telegram(
self,
chat_id: Union[str, int] = None,
text=None
):
async def send_message(self, chat_id: int, text: str, parse_mode: str = "Markdown", disable_web_page_preview: bool = True) -> None:
payload = {
"chat_id": chat_id,
"text": text,
def send_message(self, chat_id: int, text: str, parse_mode: str = "Markdown", disable_web_page_preview: bool = True) -> None:
payload = {
"chat_id": chat_id,
"text": text,
"parse_mode": parse_mode,
"disable_web_page_preview": disable_web_page_preview
}
"disable_web_page_preview": True
"parse_mode": parse_mode,
"disable_web_page_preview": disable_web_page_preview
}
return requests.post(
f"{self.api_endpoint}/bot{self.bot_token}/sendMessage",
Expand Down

0 comments on commit 7705891

Please sign in to comment.