소스 검색

Fix msg type

painor 3 년 전
부모
커밋
67f9df34fb
2개의 변경된 파일3개의 추가작업 그리고 2개의 파일을 삭제
  1. 1 1
      gramjs/client/telegramBaseClient.ts
  2. 2 1
      gramjs/tl/custom/message.ts

+ 1 - 1
gramjs/client/telegramBaseClient.ts

@@ -121,7 +121,7 @@ const clientParamsDefault = {
             : false,
 };
 
-export class TelegramBaseClient {
+export abstract class TelegramBaseClient {
     /** The current gramJS version. */
     __version__ = version;
     /** @hidden */

+ 2 - 1
gramjs/tl/custom/message.ts

@@ -798,7 +798,8 @@ export class Message extends Mixin(SenderGetter, ChatGetter) {
     }
 
     async downloadMedia(params: DownloadMediaInterface) {
-        if (this._client) return this._client.downloadMedia(this, params);
+        // small hack for patched method
+        if (this._client) return this._client.downloadMedia(this as any, params);
     }
 
     /* TODO doesn't look good enough.