diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 5c08aecb..6b2146a8 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -8,7 +8,7 @@ grgit = "5.2.1" blossom = "2.1.0" # Libraries -kord-extensions = "1.5.9-20230809.104126-1" +kord-extensions = "1.7.1-20231217.132026-9" logging = "5.1.1" logback = "1.4.14" github-api = "1.317" diff --git a/src/main/kotlin/org/hyacinthbots/lilybot/extensions/config/Config.kt b/src/main/kotlin/org/hyacinthbots/lilybot/extensions/config/Config.kt index 20bef24f..d8e42dc7 100644 --- a/src/main/kotlin/org/hyacinthbots/lilybot/extensions/config/Config.kt +++ b/src/main/kotlin/org/hyacinthbots/lilybot/extensions/config/Config.kt @@ -19,7 +19,6 @@ import com.kotlindiscord.kord.extensions.modules.unsafe.extensions.unsafeSubComm import com.kotlindiscord.kord.extensions.modules.unsafe.types.InitialSlashCommandResponse import com.kotlindiscord.kord.extensions.modules.unsafe.types.ackEphemeral import com.kotlindiscord.kord.extensions.modules.unsafe.types.respondEphemeral -import com.kotlindiscord.kord.extensions.types.respond import com.kotlindiscord.kord.extensions.utils.botHasPermissions import dev.kord.common.entity.Permission import dev.kord.core.behavior.channel.createMessage @@ -27,7 +26,7 @@ import dev.kord.core.behavior.getChannelOfOrNull import dev.kord.core.behavior.interaction.modal import dev.kord.core.entity.channel.TextChannel import dev.kord.rest.builder.message.EmbedBuilder -import dev.kord.rest.builder.message.create.embed +import dev.kord.rest.builder.message.embed import kotlinx.datetime.Clock import org.hyacinthbots.lilybot.database.collections.LoggingConfigCollection import org.hyacinthbots.lilybot.database.collections.ModerationConfigCollection diff --git a/src/main/kotlin/org/hyacinthbots/lilybot/extensions/events/AutoThreading.kt b/src/main/kotlin/org/hyacinthbots/lilybot/extensions/events/AutoThreading.kt index f64201dd..ccd0d2ae 100644 --- a/src/main/kotlin/org/hyacinthbots/lilybot/extensions/events/AutoThreading.kt +++ b/src/main/kotlin/org/hyacinthbots/lilybot/extensions/events/AutoThreading.kt @@ -21,7 +21,6 @@ import com.kotlindiscord.kord.extensions.modules.unsafe.extensions.unsafeSubComm import com.kotlindiscord.kord.extensions.modules.unsafe.types.InitialSlashCommandResponse import com.kotlindiscord.kord.extensions.modules.unsafe.types.ackEphemeral import com.kotlindiscord.kord.extensions.modules.unsafe.types.respondEphemeral -import com.kotlindiscord.kord.extensions.types.respond import com.kotlindiscord.kord.extensions.utils.delete import com.kotlindiscord.kord.extensions.utils.respond import dev.kord.common.entity.ArchiveDuration @@ -44,7 +43,7 @@ import dev.kord.core.entity.channel.thread.TextChannelThread import dev.kord.core.entity.channel.thread.ThreadChannel import dev.kord.core.event.channel.thread.ThreadChannelCreateEvent import dev.kord.core.supplier.EntitySupplyStrategy -import dev.kord.rest.builder.message.create.embed +import dev.kord.rest.builder.message.embed import kotlinx.coroutines.delay import kotlinx.datetime.Clock import org.hyacinthbots.lilybot.database.collections.AutoThreadingCollection diff --git a/src/main/kotlin/org/hyacinthbots/lilybot/extensions/events/MemberLogging.kt b/src/main/kotlin/org/hyacinthbots/lilybot/extensions/events/MemberLogging.kt index bbdba92f..9d5bcdaa 100644 --- a/src/main/kotlin/org/hyacinthbots/lilybot/extensions/events/MemberLogging.kt +++ b/src/main/kotlin/org/hyacinthbots/lilybot/extensions/events/MemberLogging.kt @@ -14,7 +14,7 @@ import dev.kord.core.behavior.getChannelOfOrNull import dev.kord.core.entity.channel.GuildMessageChannel import dev.kord.core.event.guild.MemberJoinEvent import dev.kord.core.event.guild.MemberLeaveEvent -import dev.kord.rest.builder.message.create.embed +import dev.kord.rest.builder.message.embed import kotlinx.datetime.Clock import org.hyacinthbots.lilybot.database.collections.LoggingConfigCollection import org.hyacinthbots.lilybot.extensions.config.ConfigOptions diff --git a/src/main/kotlin/org/hyacinthbots/lilybot/extensions/events/MessageDelete.kt b/src/main/kotlin/org/hyacinthbots/lilybot/extensions/events/MessageDelete.kt index b53201a2..c0ec6ae8 100644 --- a/src/main/kotlin/org/hyacinthbots/lilybot/extensions/events/MessageDelete.kt +++ b/src/main/kotlin/org/hyacinthbots/lilybot/extensions/events/MessageDelete.kt @@ -14,7 +14,7 @@ import dev.kord.core.entity.Message import dev.kord.core.entity.channel.GuildMessageChannel import dev.kord.core.event.message.MessageBulkDeleteEvent import dev.kord.rest.builder.message.create.UserMessageCreateBuilder -import dev.kord.rest.builder.message.create.embed +import dev.kord.rest.builder.message.embed import io.ktor.client.request.forms.ChannelProvider import io.ktor.util.cio.toByteReadChannel import kotlinx.datetime.Clock diff --git a/src/main/kotlin/org/hyacinthbots/lilybot/extensions/events/MessageEdit.kt b/src/main/kotlin/org/hyacinthbots/lilybot/extensions/events/MessageEdit.kt index acae881b..7b839516 100644 --- a/src/main/kotlin/org/hyacinthbots/lilybot/extensions/events/MessageEdit.kt +++ b/src/main/kotlin/org/hyacinthbots/lilybot/extensions/events/MessageEdit.kt @@ -14,7 +14,7 @@ import dev.kord.core.behavior.channel.asChannelOfOrNull import dev.kord.core.behavior.channel.createMessage import dev.kord.core.entity.Message import dev.kord.core.entity.channel.GuildMessageChannel -import dev.kord.rest.builder.message.create.embed +import dev.kord.rest.builder.message.embed import kotlinx.datetime.Clock import org.hyacinthbots.lilybot.extensions.config.ConfigOptions import org.hyacinthbots.lilybot.utils.attachmentsAndProxiedMessageInfo diff --git a/src/main/kotlin/org/hyacinthbots/lilybot/extensions/moderation/LockingCommands.kt b/src/main/kotlin/org/hyacinthbots/lilybot/extensions/moderation/LockingCommands.kt index 163aa0e0..abd3c9d8 100644 --- a/src/main/kotlin/org/hyacinthbots/lilybot/extensions/moderation/LockingCommands.kt +++ b/src/main/kotlin/org/hyacinthbots/lilybot/extensions/moderation/LockingCommands.kt @@ -11,7 +11,6 @@ import com.kotlindiscord.kord.extensions.commands.converters.impl.optionalChanne import com.kotlindiscord.kord.extensions.extensions.Extension import com.kotlindiscord.kord.extensions.extensions.ephemeralSlashCommand import com.kotlindiscord.kord.extensions.types.EphemeralInteractionContext -import com.kotlindiscord.kord.extensions.types.respond import dev.kord.common.entity.Permission import dev.kord.common.entity.Permissions import dev.kord.core.behavior.channel.asChannelOfOrNull @@ -342,8 +341,8 @@ class LockingCommands : Extension() { if (targetChannel == null) { respond { content = "I can't fetch the targeted channel properly." - return null } + return null } return targetChannel diff --git a/src/main/kotlin/org/hyacinthbots/lilybot/extensions/moderation/ModerationCommands.kt b/src/main/kotlin/org/hyacinthbots/lilybot/extensions/moderation/ModerationCommands.kt index 6e69d773..84a2ba55 100644 --- a/src/main/kotlin/org/hyacinthbots/lilybot/extensions/moderation/ModerationCommands.kt +++ b/src/main/kotlin/org/hyacinthbots/lilybot/extensions/moderation/ModerationCommands.kt @@ -21,14 +21,13 @@ import com.kotlindiscord.kord.extensions.commands.converters.impl.optionalUser import com.kotlindiscord.kord.extensions.commands.converters.impl.snowflake import com.kotlindiscord.kord.extensions.commands.converters.impl.user import com.kotlindiscord.kord.extensions.components.components -import com.kotlindiscord.kord.extensions.components.ephemeralSelectMenu +import com.kotlindiscord.kord.extensions.components.ephemeralStringSelectMenu import com.kotlindiscord.kord.extensions.extensions.Extension import com.kotlindiscord.kord.extensions.extensions.ephemeralMessageCommand import com.kotlindiscord.kord.extensions.extensions.ephemeralSlashCommand import com.kotlindiscord.kord.extensions.modules.extra.pluralkit.api.PluralKit import com.kotlindiscord.kord.extensions.time.TimestampType import com.kotlindiscord.kord.extensions.time.toDiscord -import com.kotlindiscord.kord.extensions.types.respond import com.kotlindiscord.kord.extensions.utils.dm import com.kotlindiscord.kord.extensions.utils.isNullOrBot import com.kotlindiscord.kord.extensions.utils.timeout @@ -49,7 +48,7 @@ import dev.kord.core.entity.channel.GuildMessageChannel import dev.kord.core.entity.interaction.followup.EphemeralFollowupMessage import dev.kord.core.supplier.EntitySupplyStrategy import dev.kord.rest.builder.message.EmbedBuilder -import dev.kord.rest.builder.message.create.embed +import dev.kord.rest.builder.message.embed import dev.kord.rest.request.KtorRequestException import kotlinx.coroutines.flow.filter import kotlinx.coroutines.flow.flowOf @@ -134,7 +133,7 @@ class ModerationCommands : Extension() { menuMessage = respond { content = "How would you like to moderate this message?" components { - ephemeralSelectMenu { + ephemeralStringSelectMenu { placeholder = "Select action..." maximumChoices = 1 // Prevent selecting multiple options at once diff --git a/src/main/kotlin/org/hyacinthbots/lilybot/extensions/moderation/Report.kt b/src/main/kotlin/org/hyacinthbots/lilybot/extensions/moderation/Report.kt index c0f0e3bf..19dcfe21 100644 --- a/src/main/kotlin/org/hyacinthbots/lilybot/extensions/moderation/Report.kt +++ b/src/main/kotlin/org/hyacinthbots/lilybot/extensions/moderation/Report.kt @@ -11,8 +11,6 @@ import com.kotlindiscord.kord.extensions.components.linkButton import com.kotlindiscord.kord.extensions.extensions.Extension import com.kotlindiscord.kord.extensions.extensions.ephemeralMessageCommand import com.kotlindiscord.kord.extensions.extensions.ephemeralSlashCommand -import com.kotlindiscord.kord.extensions.types.edit -import com.kotlindiscord.kord.extensions.types.respond import com.kotlindiscord.kord.extensions.utils.getJumpUrl import dev.kord.common.entity.ButtonStyle import dev.kord.common.entity.Snowflake @@ -22,7 +20,7 @@ import dev.kord.core.behavior.getChannelOfOrNull import dev.kord.core.entity.Message import dev.kord.core.entity.channel.GuildMessageChannel import dev.kord.rest.builder.message.create.FollowupMessageCreateBuilder -import dev.kord.rest.builder.message.create.embed +import dev.kord.rest.builder.message.embed import kotlinx.datetime.Clock import org.hyacinthbots.lilybot.database.collections.ModerationConfigCollection import org.hyacinthbots.lilybot.extensions.config.ConfigOptions diff --git a/src/main/kotlin/org/hyacinthbots/lilybot/extensions/util/GalleryChannel.kt b/src/main/kotlin/org/hyacinthbots/lilybot/extensions/util/GalleryChannel.kt index 6344fee3..b1b0b083 100644 --- a/src/main/kotlin/org/hyacinthbots/lilybot/extensions/util/GalleryChannel.kt +++ b/src/main/kotlin/org/hyacinthbots/lilybot/extensions/util/GalleryChannel.kt @@ -9,7 +9,6 @@ import com.kotlindiscord.kord.extensions.commands.application.slash.ephemeralSub import com.kotlindiscord.kord.extensions.extensions.Extension import com.kotlindiscord.kord.extensions.extensions.ephemeralSlashCommand import com.kotlindiscord.kord.extensions.extensions.event -import com.kotlindiscord.kord.extensions.types.respond import com.kotlindiscord.kord.extensions.utils.delete import com.kotlindiscord.kord.extensions.utils.permissionsForMember import com.kotlindiscord.kord.extensions.utils.respond @@ -22,7 +21,7 @@ import dev.kord.core.behavior.channel.createMessage import dev.kord.core.entity.channel.GuildMessageChannel import dev.kord.core.event.message.MessageCreateEvent import dev.kord.core.exception.EntityNotFoundException -import dev.kord.rest.builder.message.create.embed +import dev.kord.rest.builder.message.embed import kotlinx.coroutines.delay import org.hyacinthbots.lilybot.database.collections.GalleryChannelCollection import org.hyacinthbots.lilybot.extensions.config.ConfigOptions diff --git a/src/main/kotlin/org/hyacinthbots/lilybot/extensions/util/Github.kt b/src/main/kotlin/org/hyacinthbots/lilybot/extensions/util/Github.kt index 3438a992..db957cc4 100644 --- a/src/main/kotlin/org/hyacinthbots/lilybot/extensions/util/Github.kt +++ b/src/main/kotlin/org/hyacinthbots/lilybot/extensions/util/Github.kt @@ -12,10 +12,8 @@ import com.kotlindiscord.kord.extensions.commands.converters.impl.string import com.kotlindiscord.kord.extensions.extensions.Extension import com.kotlindiscord.kord.extensions.extensions.publicSlashCommand import com.kotlindiscord.kord.extensions.sentry.BreadcrumbType -import com.kotlindiscord.kord.extensions.types.respond -import com.kotlindiscord.kord.extensions.types.respondEphemeral import dev.kord.common.entity.Permission -import dev.kord.rest.builder.message.create.embed +import dev.kord.rest.builder.message.embed import kotlinx.datetime.Clock import org.hyacinthbots.lilybot.database.collections.GithubCollection import org.hyacinthbots.lilybot.github @@ -75,7 +73,7 @@ class Github : Extension() { category = "extensions.util.Github.issue.InputCheck" message = "Input missing /" } - respondEphemeral { + respond { embed { title = "Make sure your repository input is formatted like this:" description = "Format: `User/Repo` or `Org/Repo` \nFor example: `HyacinthBots/LilyBot`" @@ -96,7 +94,7 @@ class Github : Extension() { try { github.getRepository(repository)?.getIssue(arguments.issue) } catch (e: GHFileNotFoundException) { - respondEphemeral { + respond { embed { title = "Unable to find issue number! Make sure this issue exists" } @@ -115,7 +113,7 @@ class Github : Extension() { try { iterator!!.hasNext() } catch (e: GHException) { - respondEphemeral { + respond { embed { title = "Unable to access repository, make sure this repository exists!" } @@ -131,7 +129,7 @@ class Github : Extension() { message = "Unable to find issue" } - respondEphemeral { + respond { embed { title = "Invalid issue number. Make sure this issue exists!" } @@ -177,7 +175,7 @@ class Github : Extension() { title = "Error!" description = "Error occurred initializing Pull Request. How did this happen?" color = DISCORD_RED - return@action + return@respond } } else { title = issue.title @@ -303,7 +301,7 @@ class Github : Extension() { category = "extensions.util.Github.repository.InputCheck" message = "Input missing /" } - respondEphemeral { + respond { embed { title = "Make sure your input is formatted like this:" description = "Format: `User/Repo` or `Org/Repo`\nFor example: `HyacinthBots/LilyBot`" @@ -332,7 +330,7 @@ class Github : Extension() { category = "extensions.util.Github.repository.getRepository" message = "Repository not found" } - respondEphemeral { + respond { embed { title = "Invalid repository name. Make sure this repository exists" } @@ -413,7 +411,7 @@ class Github : Extension() { category = "extensions.util.Github.user.getUser" message = "Unable to find user" } - respondEphemeral { + respond { embed { title = "Invalid Username. Make sure this user exists!" } @@ -425,11 +423,11 @@ class Github : Extension() { val isOrg: Boolean = ghUser?.type.equals("Organization") if (!isOrg) { - sentry.breadcrumb(BreadcrumbType.Info) { - category = "extensions.util.Github.user.isOrg" - message = "User is not Organisation" - data["isNotOrg"] = ghUser?.login - } +// sentry.breadcrumb(BreadcrumbType.Info) { +// category = "extensions.util.Github.user.isOrg" +// message = "User is not Organisation" +// data["isNotOrg"] = ghUser?.login +// } respond { embed { title = "GitHub profile for " + ghUser?.login @@ -481,11 +479,11 @@ class Github : Extension() { } } } else { - sentry.breadcrumb(BreadcrumbType.Info) { - category = "extensions.util.Github.user.isOrg" - message = "User is Organisation" - data["isOrg"] = ghUser?.login - } +// sentry.breadcrumb(BreadcrumbType.Info) { +// category = "extensions.util.Github.user.isOrg" +// message = "User is Organisation" +// data["isOrg"] = ghUser?.login +// } val org: GHOrganization? = github.getOrganization(ghUser?.login) respond { diff --git a/src/main/kotlin/org/hyacinthbots/lilybot/extensions/util/GuildAnnouncements.kt b/src/main/kotlin/org/hyacinthbots/lilybot/extensions/util/GuildAnnouncements.kt index 7b1507bd..26ad758b 100644 --- a/src/main/kotlin/org/hyacinthbots/lilybot/extensions/util/GuildAnnouncements.kt +++ b/src/main/kotlin/org/hyacinthbots/lilybot/extensions/util/GuildAnnouncements.kt @@ -8,7 +8,6 @@ import com.kotlindiscord.kord.extensions.components.ephemeralButton import com.kotlindiscord.kord.extensions.components.forms.ModalForm import com.kotlindiscord.kord.extensions.extensions.Extension import com.kotlindiscord.kord.extensions.extensions.ephemeralSlashCommand -import com.kotlindiscord.kord.extensions.types.respond import dev.kord.common.Color import dev.kord.common.entity.ButtonStyle import dev.kord.common.entity.Permission diff --git a/src/main/kotlin/org/hyacinthbots/lilybot/extensions/util/InfoCommands.kt b/src/main/kotlin/org/hyacinthbots/lilybot/extensions/util/InfoCommands.kt index b01d2f2c..fad8ef8f 100644 --- a/src/main/kotlin/org/hyacinthbots/lilybot/extensions/util/InfoCommands.kt +++ b/src/main/kotlin/org/hyacinthbots/lilybot/extensions/util/InfoCommands.kt @@ -7,9 +7,8 @@ import com.kotlindiscord.kord.extensions.extensions.Extension import com.kotlindiscord.kord.extensions.extensions.publicSlashCommand import com.kotlindiscord.kord.extensions.time.TimestampType import com.kotlindiscord.kord.extensions.time.toDiscord -import com.kotlindiscord.kord.extensions.types.respond import dev.kord.rest.builder.message.create.MessageCreateBuilder -import dev.kord.rest.builder.message.create.embed +import dev.kord.rest.builder.message.embed import kotlinx.datetime.TimeZone import kotlinx.datetime.toLocalDateTime import org.hyacinthbots.lilybot.database.collections.UptimeCollection diff --git a/src/main/kotlin/org/hyacinthbots/lilybot/extensions/util/ModUtilities.kt b/src/main/kotlin/org/hyacinthbots/lilybot/extensions/util/ModUtilities.kt index ceff7dcc..de71d44a 100644 --- a/src/main/kotlin/org/hyacinthbots/lilybot/extensions/util/ModUtilities.kt +++ b/src/main/kotlin/org/hyacinthbots/lilybot/extensions/util/ModUtilities.kt @@ -22,7 +22,6 @@ import com.kotlindiscord.kord.extensions.components.forms.ModalForm import com.kotlindiscord.kord.extensions.components.linkButton import com.kotlindiscord.kord.extensions.extensions.Extension import com.kotlindiscord.kord.extensions.extensions.ephemeralSlashCommand -import com.kotlindiscord.kord.extensions.types.respond import com.kotlindiscord.kord.extensions.utils.getJumpUrl import com.kotlindiscord.kord.extensions.utils.scheduling.Scheduler import com.kotlindiscord.kord.extensions.utils.scheduling.Task @@ -39,8 +38,7 @@ import dev.kord.core.behavior.interaction.followup.edit import dev.kord.core.entity.Message import dev.kord.core.entity.channel.GuildMessageChannel import dev.kord.core.entity.interaction.followup.EphemeralFollowupMessage -import dev.kord.rest.builder.message.create.embed -import dev.kord.rest.builder.message.modify.embed +import dev.kord.rest.builder.message.embed import dev.kord.rest.request.KtorRequestException import kotlinx.coroutines.flow.toList import kotlinx.datetime.Clock diff --git a/src/main/kotlin/org/hyacinthbots/lilybot/extensions/util/NewsChannelPublishing.kt b/src/main/kotlin/org/hyacinthbots/lilybot/extensions/util/NewsChannelPublishing.kt index 0f2c79cd..936bf597 100644 --- a/src/main/kotlin/org/hyacinthbots/lilybot/extensions/util/NewsChannelPublishing.kt +++ b/src/main/kotlin/org/hyacinthbots/lilybot/extensions/util/NewsChannelPublishing.kt @@ -14,7 +14,6 @@ import com.kotlindiscord.kord.extensions.extensions.event import com.kotlindiscord.kord.extensions.pagination.EphemeralResponsePaginator import com.kotlindiscord.kord.extensions.pagination.pages.Page import com.kotlindiscord.kord.extensions.pagination.pages.Pages -import com.kotlindiscord.kord.extensions.types.respond import dev.kord.common.Locale import dev.kord.common.asJavaLocale import dev.kord.common.entity.ChannelType diff --git a/src/main/kotlin/org/hyacinthbots/lilybot/extensions/util/PublicUtilities.kt b/src/main/kotlin/org/hyacinthbots/lilybot/extensions/util/PublicUtilities.kt index 4c947b9c..b9dd03e3 100644 --- a/src/main/kotlin/org/hyacinthbots/lilybot/extensions/util/PublicUtilities.kt +++ b/src/main/kotlin/org/hyacinthbots/lilybot/extensions/util/PublicUtilities.kt @@ -13,7 +13,6 @@ import com.kotlindiscord.kord.extensions.components.ephemeralButton import com.kotlindiscord.kord.extensions.extensions.Extension import com.kotlindiscord.kord.extensions.extensions.ephemeralSlashCommand import com.kotlindiscord.kord.extensions.extensions.publicSlashCommand -import com.kotlindiscord.kord.extensions.types.respond import com.kotlindiscord.kord.extensions.utils.dm import com.kotlindiscord.kord.extensions.utils.getTopRole import com.kotlindiscord.kord.extensions.utils.hasPermission @@ -25,8 +24,7 @@ import dev.kord.core.behavior.edit import dev.kord.core.behavior.getChannelOfOrNull import dev.kord.core.entity.Message import dev.kord.core.entity.channel.GuildMessageChannel -import dev.kord.rest.builder.message.create.embed -import dev.kord.rest.builder.message.modify.embed +import dev.kord.rest.builder.message.embed import dev.kord.rest.request.KtorRequestException import kotlinx.datetime.Clock import org.hyacinthbots.lilybot.database.collections.UtilityConfigCollection @@ -118,8 +116,8 @@ class PublicUtilities : Extension() { requesterAsMember.edit { nickname = arguments.newNick } respond { content = "You have permission to change your own nickname, so I've just made the change." - return@action } + return@action } // Declare the embed outside the action to allow us to reference it inside the action diff --git a/src/main/kotlin/org/hyacinthbots/lilybot/extensions/util/Reminders.kt b/src/main/kotlin/org/hyacinthbots/lilybot/extensions/util/Reminders.kt index e8841118..a212ee6d 100644 --- a/src/main/kotlin/org/hyacinthbots/lilybot/extensions/util/Reminders.kt +++ b/src/main/kotlin/org/hyacinthbots/lilybot/extensions/util/Reminders.kt @@ -21,7 +21,6 @@ import com.kotlindiscord.kord.extensions.pagination.pages.Page import com.kotlindiscord.kord.extensions.pagination.pages.Pages import com.kotlindiscord.kord.extensions.time.TimestampType import com.kotlindiscord.kord.extensions.time.toDiscord -import com.kotlindiscord.kord.extensions.types.respond import com.kotlindiscord.kord.extensions.utils.botHasPermissions import com.kotlindiscord.kord.extensions.utils.dm import com.kotlindiscord.kord.extensions.utils.scheduling.Scheduler @@ -37,7 +36,7 @@ import dev.kord.core.entity.Guild import dev.kord.core.entity.channel.GuildMessageChannel import dev.kord.core.event.interaction.ChatInputCommandInteractionCreateEvent import dev.kord.rest.builder.message.create.MessageCreateBuilder -import dev.kord.rest.builder.message.create.embed +import dev.kord.rest.builder.message.embed import dev.kord.rest.request.KtorRequestException import kotlinx.datetime.Clock import kotlinx.datetime.DateTimePeriod diff --git a/src/main/kotlin/org/hyacinthbots/lilybot/extensions/util/RoleMenu.kt b/src/main/kotlin/org/hyacinthbots/lilybot/extensions/util/RoleMenu.kt index 6e23b744..f33b6c51 100644 --- a/src/main/kotlin/org/hyacinthbots/lilybot/extensions/util/RoleMenu.kt +++ b/src/main/kotlin/org/hyacinthbots/lilybot/extensions/util/RoleMenu.kt @@ -19,7 +19,6 @@ import com.kotlindiscord.kord.extensions.components.linkButton import com.kotlindiscord.kord.extensions.extensions.Extension import com.kotlindiscord.kord.extensions.extensions.ephemeralSlashCommand import com.kotlindiscord.kord.extensions.extensions.event -import com.kotlindiscord.kord.extensions.types.respond import com.kotlindiscord.kord.extensions.utils.getJumpUrl import com.kotlindiscord.kord.extensions.utils.getTopRole import dev.kord.common.entity.ButtonStyle @@ -35,7 +34,7 @@ import dev.kord.core.behavior.interaction.respondEphemeral import dev.kord.core.entity.Message import dev.kord.core.entity.Role import dev.kord.core.event.interaction.GuildButtonInteractionCreateEvent -import dev.kord.rest.builder.message.create.embed +import dev.kord.rest.builder.message.embed import kotlinx.coroutines.flow.filter import kotlinx.coroutines.flow.firstOrNull import kotlinx.coroutines.flow.toList @@ -486,6 +485,7 @@ class RoleMenu : Extension() { event.interaction.respondEphemeral { content = "Use the menu below to select roles." components { + // TODO Update to ephemeralRoleSelectMenu ephemeralSelectMenu { placeholder = "Select roles..." maximumChoices = roles.size @@ -582,6 +582,7 @@ class RoleMenu : Extension() { respond { content = "Use the menu below to subscribe to roles." components { + // TODO Update to ephemeralRoleSelectMenu ephemeralSelectMenu { placeholder = "Select roles to subscribe to..." minimumChoices = 0 diff --git a/src/main/kotlin/org/hyacinthbots/lilybot/extensions/util/Tags.kt b/src/main/kotlin/org/hyacinthbots/lilybot/extensions/util/Tags.kt index 9917e317..61893e06 100644 --- a/src/main/kotlin/org/hyacinthbots/lilybot/extensions/util/Tags.kt +++ b/src/main/kotlin/org/hyacinthbots/lilybot/extensions/util/Tags.kt @@ -18,7 +18,6 @@ import com.kotlindiscord.kord.extensions.extensions.publicSlashCommand import com.kotlindiscord.kord.extensions.pagination.EphemeralResponsePaginator import com.kotlindiscord.kord.extensions.pagination.pages.Page import com.kotlindiscord.kord.extensions.pagination.pages.Pages -import com.kotlindiscord.kord.extensions.types.respond import com.kotlindiscord.kord.extensions.utils.suggestStringMap import dev.kord.common.Locale import dev.kord.common.asJavaLocale @@ -30,7 +29,7 @@ import dev.kord.core.behavior.channel.createMessage import dev.kord.core.behavior.getChannelOfOrNull import dev.kord.core.entity.channel.GuildMessageChannel import dev.kord.rest.builder.message.EmbedBuilder -import dev.kord.rest.builder.message.create.embed +import dev.kord.rest.builder.message.embed import kotlinx.datetime.Clock import org.hyacinthbots.lilybot.database.collections.TagsCollection import org.hyacinthbots.lilybot.database.collections.UtilityConfigCollection diff --git a/src/main/kotlin/org/hyacinthbots/lilybot/extensions/util/ThreadControl.kt b/src/main/kotlin/org/hyacinthbots/lilybot/extensions/util/ThreadControl.kt index db51fa71..9c212578 100644 --- a/src/main/kotlin/org/hyacinthbots/lilybot/extensions/util/ThreadControl.kt +++ b/src/main/kotlin/org/hyacinthbots/lilybot/extensions/util/ThreadControl.kt @@ -19,8 +19,6 @@ import com.kotlindiscord.kord.extensions.components.ephemeralButton import com.kotlindiscord.kord.extensions.extensions.Extension import com.kotlindiscord.kord.extensions.extensions.ephemeralSlashCommand import com.kotlindiscord.kord.extensions.extensions.event -import com.kotlindiscord.kord.extensions.types.edit -import com.kotlindiscord.kord.extensions.types.respond import com.kotlindiscord.kord.extensions.utils.hasPermission import dev.kord.common.entity.ButtonStyle import dev.kord.common.entity.Permission @@ -37,7 +35,7 @@ import dev.kord.core.entity.channel.thread.ThreadChannel import dev.kord.core.entity.interaction.response.EphemeralMessageInteractionResponse import dev.kord.core.event.channel.thread.ThreadUpdateEvent import dev.kord.core.exception.EntityNotFoundException -import dev.kord.rest.builder.message.create.embed +import dev.kord.rest.builder.message.embed import kotlinx.datetime.Clock import org.hyacinthbots.lilybot.database.collections.ModerationConfigCollection import org.hyacinthbots.lilybot.database.collections.ThreadsCollection @@ -353,8 +351,8 @@ class ThreadControl : Extension() { if (threadChannel == null) { respond { content = "Are you sure this channel is a thread? If it is, I can't fetch it properly." - return null } + return null } return threadChannel diff --git a/src/main/kotlin/org/hyacinthbots/lilybot/utils/_PermissionUtils.kt b/src/main/kotlin/org/hyacinthbots/lilybot/utils/_PermissionUtils.kt index ca2af49a..6dd0108a 100644 --- a/src/main/kotlin/org/hyacinthbots/lilybot/utils/_PermissionUtils.kt +++ b/src/main/kotlin/org/hyacinthbots/lilybot/utils/_PermissionUtils.kt @@ -3,7 +3,6 @@ package org.hyacinthbots.lilybot.utils import com.kotlindiscord.kord.extensions.checks.channelFor import com.kotlindiscord.kord.extensions.checks.types.CheckContext import com.kotlindiscord.kord.extensions.types.EphemeralInteractionContext -import com.kotlindiscord.kord.extensions.types.respond import com.kotlindiscord.kord.extensions.utils.botHasPermissions import com.kotlindiscord.kord.extensions.utils.getTopRole import dev.kord.common.entity.Permission