feat: updated buttons and ButtonManager
Signed-off-by: limited_dev <loginakkisativ@gmail.com>
This commit is contained in:
parent
407f0ff1ea
commit
ad99e2767e
4 changed files with 16 additions and 7 deletions
|
@ -18,6 +18,8 @@
|
||||||
|
|
||||||
package net.moonleay.lilJudd.buttons.component
|
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.IsAvailableEditButton
|
||||||
import net.moonleay.lilJudd.buttons.timeplanner.MaybeAvailableEditButton
|
import net.moonleay.lilJudd.buttons.timeplanner.MaybeAvailableEditButton
|
||||||
import net.moonleay.lilJudd.buttons.timeplanner.NotAvailableEditButton
|
import net.moonleay.lilJudd.buttons.timeplanner.NotAvailableEditButton
|
||||||
|
@ -26,6 +28,8 @@ object EditButtonManager {
|
||||||
val buttons = listOf(
|
val buttons = listOf(
|
||||||
IsAvailableEditButton(),
|
IsAvailableEditButton(),
|
||||||
MaybeAvailableEditButton(),
|
MaybeAvailableEditButton(),
|
||||||
NotAvailableEditButton()
|
NotAvailableEditButton(),
|
||||||
|
SignMeUpEditButton(),
|
||||||
|
CancelEditButton()
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,10 +26,12 @@ import dev.kord.core.entity.channel.MessageChannel
|
||||||
import dev.kord.core.entity.interaction.ButtonInteraction
|
import dev.kord.core.entity.interaction.ButtonInteraction
|
||||||
import dev.kord.rest.builder.message.modify.embed
|
import dev.kord.rest.builder.message.modify.embed
|
||||||
import net.moonleay.lilJudd.Bot
|
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
|
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(
|
override suspend fun onInteraction(
|
||||||
interaction: ButtonInteraction,
|
interaction: ButtonInteraction,
|
||||||
response: PublicMessageInteractionResponseBehavior,
|
response: PublicMessageInteractionResponseBehavior,
|
||||||
|
|
|
@ -26,10 +26,12 @@ import dev.kord.core.entity.channel.MessageChannel
|
||||||
import dev.kord.core.entity.interaction.ButtonInteraction
|
import dev.kord.core.entity.interaction.ButtonInteraction
|
||||||
import dev.kord.rest.builder.message.modify.embed
|
import dev.kord.rest.builder.message.modify.embed
|
||||||
import net.moonleay.lilJudd.Bot
|
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
|
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(
|
override suspend fun onInteraction(
|
||||||
interaction: ButtonInteraction,
|
interaction: ButtonInteraction,
|
||||||
response: PublicMessageInteractionResponseBehavior,
|
response: PublicMessageInteractionResponseBehavior,
|
||||||
|
|
|
@ -26,10 +26,11 @@ import dev.kord.core.entity.channel.MessageChannel
|
||||||
import dev.kord.core.entity.interaction.ButtonInteraction
|
import dev.kord.core.entity.interaction.ButtonInteraction
|
||||||
import dev.kord.rest.builder.message.modify.embed
|
import dev.kord.rest.builder.message.modify.embed
|
||||||
import net.moonleay.lilJudd.Bot
|
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
|
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(
|
override suspend fun onInteraction(
|
||||||
interaction: ButtonInteraction,
|
interaction: ButtonInteraction,
|
||||||
|
|
Loading…
Reference in a new issue