Testing if sendMessage argument extends Message class

This commit is contained in:
MrMasrozYTLIVE 2024-06-14 17:00:35 +03:00
parent b3ccda32ea
commit feff30fecc

View File

@ -4,6 +4,7 @@ import b4a from "b4a";
import TextMessage from "./TextMessage.js";
import FileMessage from "./FileMessage.js";
import AudioMessage from "./AudioMessage.js";
import Message from "./Message.js";
class Client extends EventEmitter {
constructor(botName) {
@ -86,7 +87,7 @@ class Client extends EventEmitter {
}
sendMessage(message) {
console.log(typeof message);
console.log(message.prototype instanceof Message);
console.log('Bot name:', this.botName);
const data = message.toJsonString();