feat: updated buttons and ButtonManager

Signed-off-by: limited_dev <loginakkisativ@gmail.com>
This commit is contained in:
limited_dev 2023-07-12 13:23:03 +02:00
parent 407f0ff1ea
commit ad99e2767e
4 changed files with 16 additions and 7 deletions

View file

@ -18,6 +18,8 @@
package net.moonleay.lilJudd.buttons.component
import net.moonleay.lilJudd.buttons.matchplanner.CancelEditButton
import net.moonleay.lilJudd.buttons.matchplanner.SignMeUpEditButton
import net.moonleay.lilJudd.buttons.timeplanner.IsAvailableEditButton
import net.moonleay.lilJudd.buttons.timeplanner.MaybeAvailableEditButton
import net.moonleay.lilJudd.buttons.timeplanner.NotAvailableEditButton
@ -26,6 +28,8 @@ object EditButtonManager {
val buttons = listOf(
IsAvailableEditButton(),
MaybeAvailableEditButton(),
NotAvailableEditButton()
NotAvailableEditButton(),
SignMeUpEditButton(),
CancelEditButton()
)
}

View file

@ -26,10 +26,12 @@ import dev.kord.core.entity.channel.MessageChannel
import dev.kord.core.entity.interaction.ButtonInteraction
import dev.kord.rest.builder.message.modify.embed
import net.moonleay.lilJudd.Bot
import net.moonleay.lilJudd.buttons.component.EditButton
import net.moonleay.lilJudd.buttons.component.IEditButton
import net.moonleay.lilJudd.util.EmbedUtil
class IsAvailableEditButton : EditButton("public.edit.btn.timemanagement.available") {
class IsAvailableEditButton : IEditButton {
override val id: String = "public.edit.btn.timemanagement.available"
override suspend fun onInteraction(
interaction: ButtonInteraction,
response: PublicMessageInteractionResponseBehavior,

View file

@ -26,10 +26,12 @@ import dev.kord.core.entity.channel.MessageChannel
import dev.kord.core.entity.interaction.ButtonInteraction
import dev.kord.rest.builder.message.modify.embed
import net.moonleay.lilJudd.Bot
import net.moonleay.lilJudd.buttons.component.EditButton
import net.moonleay.lilJudd.buttons.component.IEditButton
import net.moonleay.lilJudd.util.EmbedUtil
class MaybeAvailableEditButton : EditButton("public.edit.btn.timemanagement.maybeavailable") {
class MaybeAvailableEditButton : IEditButton {
override val id: String = "public.edit.btn.timemanagement.maybeavailable"
override suspend fun onInteraction(
interaction: ButtonInteraction,
response: PublicMessageInteractionResponseBehavior,

View file

@ -26,10 +26,11 @@ import dev.kord.core.entity.channel.MessageChannel
import dev.kord.core.entity.interaction.ButtonInteraction
import dev.kord.rest.builder.message.modify.embed
import net.moonleay.lilJudd.Bot
import net.moonleay.lilJudd.buttons.component.EditButton
import net.moonleay.lilJudd.buttons.component.IEditButton
import net.moonleay.lilJudd.util.EmbedUtil
class NotAvailableEditButton : EditButton("public.edit.btn.timemanagement.notavailable") {
class NotAvailableEditButton : IEditButton {
override val id: String = "public.edit.btn.timemanagement.notavailable"
override suspend fun onInteraction(
interaction: ButtonInteraction,