This commit is contained in:
Flummi 2022-05-09 20:59:03 +02:00
parent cee3fea8b7
commit 1713148f27
2 changed files with 2 additions and 2 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "cuffeo", "name": "cuffeo",
"version": "1.2.0", "version": "1.2.1",
"description": "A multi-protocol chatbot library with nearly zero dependencies.", "description": "A multi-protocol chatbot library with nearly zero dependencies.",
"main": "src/index.mjs", "main": "src/index.mjs",
"scripts": {}, "scripts": {},

View File

@ -60,7 +60,7 @@ export default class tg extends EventEmitter {
this.lastUpdate = _res.result[_res.result.length - 1].update_id + 1; this.lastUpdate = _res.result[_res.result.length - 1].update_id + 1;
_res.result.forEach(async res => { _res.result.forEach(async res => {
if(res.message.date >= ~~(Date.now() / 1000) - 10 && res.message.message_id !== this.lastMessage) { if(res.message?.date >= ~~(Date.now() / 1000) - 10 && res.message?.message_id !== this.lastMessage) {
this.lastMessage = res.message.message_id; this.lastMessage = res.message.message_id;
if(!this.server.user.has(res.message.from.username || res.message.from.first_name)) { if(!this.server.user.has(res.message.from.username || res.message.from.first_name)) {
this.server.user.set(res.message.from.username || res.message.from.first_name, { this.server.user.set(res.message.from.username || res.message.from.first_name, {