Skip to content

Commit

Permalink
Fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
DRSchlaubi committed Nov 22, 2023
1 parent e42b027 commit 9058127
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ suspend fun VoteBotModule.statusCommand() = ephemeralSlashCommand(::StatusArgume
val poll = arguments.poll
if (!arguments.liveMessage) {
respond {
embeds.add(poll.toEmbed(channel.kord, guild!!))
embeds = mutableListOf(poll.toEmbed(channel.kord, guild!!))
}
} else {
poll.addMessage(channel, addButtons = true, addToDatabase = true, guild = guild!!)
Expand Down
4 changes: 2 additions & 2 deletions plugin/src/main/kotlin/space/votebot/core/Renderer.kt
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ suspend fun Poll.addMessage(
addToDatabase: Boolean,
): Message {
val message = channel.createMessage {
embeds.add(toEmbed(channel.kord, guild, false))
embeds = mutableListOf(toEmbed(channel.kord, guild, false))
if (addButtons) {
components.addAll(makeButtons(channel.kord, guild))
components = makeButtons(channel.kord, guild).toMutableList()
}
}

Expand Down

0 comments on commit 9058127

Please sign in to comment.