mirror of
https://github.com/hansjone/dsh-im-ops.git
synced 2026-10-16 08:00:49 +08:00
feat: add private chat batch input commands
This commit is contained in:
parent
f6cc1cae30
commit
068cf57259
28 changed files with 2665 additions and 219 deletions
|
|
@ -217,6 +217,9 @@ export function normalizeDiscordMessage(message, botId, { fetchImpl = fetch } =
|
|||
kind: direct ? 'direct' : 'group',
|
||||
conversationId: String(message.channel_id),
|
||||
content: stripBotMention(message.content ?? '', botId),
|
||||
plainText: (!Array.isArray(message.attachments) || message.attachments.length === 0)
|
||||
&& (!Array.isArray(message.sticker_items) || message.sticker_items.length === 0)
|
||||
&& !message.poll,
|
||||
images: Array.isArray(message.attachments)
|
||||
? message.attachments.map((attachment) => discordImageSource(attachment, fetchImpl)).filter(Boolean)
|
||||
: [],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue