Skip to content

Commit

Permalink
Use new embeds field for messages and allow multiple embeds. (#339)
Browse files Browse the repository at this point in the history
  • Loading branch information
Lyrth authored Jan 8, 2023
1 parent 6974096 commit 39826a4
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion libs/containers/abstract/TextChannel.lua
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,14 @@ function TextChannel:send(content)
content = concat(mentions, ' ')
end

local embeds
if tbl.embed then
embeds = {tbl.embed}
end
if type(tbl.embeds) == 'table' and #tbl.embeds > 0 then
embeds = tbl.embeds
end

local files
if tbl.file then
files, err = parseFile(tbl.file)
Expand Down Expand Up @@ -290,7 +298,7 @@ function TextChannel:send(content)
content = content,
tts = tbl.tts,
nonce = tbl.nonce,
embed = tbl.embed,
embeds = embeds,
message_reference = refMessage,
allowed_mentions = refMention,
}, files)
Expand Down

0 comments on commit 39826a4

Please sign in to comment.