Always include the message content if desired (#3965)

This commit is contained in:
Fleny
2024-11-05 13:15:46 +01:00
committed by GitHub
parent 43624f47a6
commit eb20050745
+1 -1
View File
@@ -141,7 +141,7 @@ export function transformMessage(bot: Bot, payload: DiscordMessage): Message {
message.attachments = payload.attachments.map((attachment) => bot.transformers.attachment(bot, attachment))
if (props.channelId && payload.channel_id) message.channelId = bot.transformers.snowflake(payload.channel_id)
if (props.components && payload.components?.length) message.components = payload.components.map((comp) => bot.transformers.component(bot, comp))
if (props.content && payload.content) message.content = payload.content ?? EMPTY_STRING
if (props.content) message.content = payload.content ?? EMPTY_STRING
if (props.editedTimestamp && payload.edited_timestamp) message.editedTimestamp = Date.parse(payload.edited_timestamp)
if (props.embeds && payload.embeds?.length) message.embeds = payload.embeds.map((embed) => bot.transformers.embed(bot, embed))
if (props.guildId && guildId) message.guildId = guildId