Skip to content

Commit

Permalink
Disable the buttons when we are in a transfer fail state
Browse files Browse the repository at this point in the history
  • Loading branch information
MrPowerGamerBR committed Oct 11, 2024
1 parent 1d90455 commit 4db013a
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import dev.minn.jda.ktx.messages.MessageCreate
import dev.minn.jda.ktx.messages.MessageEdit
import kotlinx.coroutines.GlobalScope
import kotlinx.coroutines.launch
import mu.KotlinLogging
import net.dv8tion.jda.api.events.interaction.component.ButtonInteractionEvent
import net.dv8tion.jda.api.hooks.ListenerAdapter
import net.dv8tion.jda.api.interactions.components.buttons.Button
Expand Down Expand Up @@ -203,7 +202,7 @@ class SonhosTransferInteractionsListener(val loritta: LorittaBot) : ListenerAdap
"dummy",
i18nContext.get(SonhosCommand.PAY_I18N_PREFIX.TransferAccepted),
Emotes.LoriCard.toJDA()
).withDisabled(true)
).asDisabled()
)
}
).setReplace(false).await()
Expand Down Expand Up @@ -277,7 +276,7 @@ class SonhosTransferInteractionsListener(val loritta: LorittaBot) : ListenerAdap
"dummy",
i18nContext.get(SonhosCommand.PAY_I18N_PREFIX.FailReasons.InsufficientSonhos),
Emotes.LoriSob.toJDA()
)
).asDisabled()
)
}
).setReplace(false).await()
Expand All @@ -301,7 +300,7 @@ class SonhosTransferInteractionsListener(val loritta: LorittaBot) : ListenerAdap
"dummy",
i18nContext.get(SonhosCommand.PAY_I18N_PREFIX.FailReasons.Expired),
Emotes.LoriSob.toJDA()
)
).asDisabled()
)
}
).setReplace(false).await()
Expand All @@ -315,7 +314,7 @@ class SonhosTransferInteractionsListener(val loritta: LorittaBot) : ListenerAdap
"dummy",
i18nContext.get(SonhosCommand.PAY_I18N_PREFIX.FailReasons.UnknownRequest),
Emotes.LoriSob.toJDA()
)
).asDisabled()
)
}
).setReplace(false).await()
Expand Down

0 comments on commit 4db013a

Please sign in to comment.