@satorijs/core
Advanced tools
Comparing version 4.2.11 to 4.2.12
{ | ||
"name": "@satorijs/core", | ||
"description": "Core components of Satorijs", | ||
"version": "4.2.11", | ||
"version": "4.2.12", | ||
"type": "module", | ||
@@ -71,2 +71,2 @@ "main": "lib/index.cjs", | ||
} | ||
} | ||
} |
import { Channel, Event, GuildMember, Login, Message, User } from '@satorijs/protocol' | ||
import { defineProperty, isNullable } from 'cosmokit' | ||
import { clone, defineProperty, isNullable } from 'cosmokit' | ||
import { Context, Service } from 'cordis' | ||
@@ -141,4 +141,4 @@ import { Bot } from './bot' | ||
toJSON(): Event { | ||
return { | ||
toJSON() { | ||
const event: Event = { | ||
login: { | ||
@@ -148,5 +148,10 @@ platform: this.platform, | ||
} as Login, | ||
...this.event, | ||
...clone(this.event), | ||
id: this.id, | ||
} | ||
if (event.message?.elements) { | ||
event.message.content = this.content | ||
delete event.message.elements | ||
} | ||
return event | ||
} | ||
@@ -153,0 +158,0 @@ } |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
119401
2471