@fraqjs/fraq 0.9.2 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +7 -2
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -5529,7 +5529,7 @@ interface SessionReplyOptions {
|
|
|
5529
5529
|
interface Session {
|
|
5530
5530
|
raw: IncomingMessage;
|
|
5531
5531
|
reply(
|
|
5532
|
-
|
|
5532
|
+
textOrSegments: string | OutgoingSegment_ZodInput[],
|
|
5533
5533
|
options?: SessionReplyOptions,
|
|
5534
5534
|
): Promise<{
|
|
5535
5535
|
messageSeq: number;
|
package/dist/index.mjs
CHANGED
|
@@ -724,8 +724,13 @@ and implement the dispose method to clean up resources when the context stops.
|
|
|
724
724
|
createSession(message) {
|
|
725
725
|
return {
|
|
726
726
|
raw: message,
|
|
727
|
-
reply: async (
|
|
728
|
-
const actualSegments = [
|
|
727
|
+
reply: async (textOrSegments, options) => {
|
|
728
|
+
const actualSegments = [];
|
|
729
|
+
if (typeof textOrSegments === "string") actualSegments.push({
|
|
730
|
+
type: "text",
|
|
731
|
+
data: { text: textOrSegments }
|
|
732
|
+
});
|
|
733
|
+
else actualSegments.push(...textOrSegments);
|
|
729
734
|
if (options?.withMention && message.message_scene === "group") actualSegments.unshift(seg.mention(message.sender_id));
|
|
730
735
|
if (options?.withQuote) actualSegments.unshift(seg.reply(message.message_seq));
|
|
731
736
|
switch (message.message_scene) {
|