Răsfoiți Sursa

Merge branch 'master' of https://github.com/gram-js/gramjs

painor 4 ani în urmă
părinte
comite
21b0e2ea2c
1 a modificat fișierele cu 2 adăugiri și 1 ștergeri
  1. 2 1
      examples/main.ts

+ 2 - 1
examples/main.ts

@@ -3,13 +3,14 @@ import {TelegramClient} from "telegram";
 import {StringSession} from "telegram/sessions";
 import {NewMessage} from "telegram/events";
 import {NewMessageEvent} from "telegram/events/NewMessage";
+import {Message} from 'telegram/tl/custom/message';
 
 const apiId = ;
 const apiHash = '';
 const stringSession = '';
 
 async function eventPrint(event: NewMessageEvent) {
-    const message = event.message;
+    const message = event.message as Message;
 
     // Checks if it's a private message (from user or bot)
     if (event.isPrivate){