diff --git a/api/src/main/kotlin/dev/schlaubi/votebot/api/authentication/VoteBotAuthenticationProvider.kt b/api/src/main/kotlin/dev/schlaubi/votebot/api/authentication/VoteBotAuthenticationProvider.kt index 7735a54..2b2ae27 100644 --- a/api/src/main/kotlin/dev/schlaubi/votebot/api/authentication/VoteBotAuthenticationProvider.kt +++ b/api/src/main/kotlin/dev/schlaubi/votebot/api/authentication/VoteBotAuthenticationProvider.kt @@ -1,6 +1,5 @@ package dev.schlaubi.votebot.api.authentication -import io.jsonwebtoken.JwtException import io.ktor.client.plugins.* import io.ktor.http.auth.* import io.ktor.server.application.* diff --git a/plugin/src/main/kotlin/space/votebot/commands/vote/CloseCommand.kt b/plugin/src/main/kotlin/space/votebot/commands/vote/CloseCommand.kt index 89f44a2..8e036d1 100644 --- a/plugin/src/main/kotlin/space/votebot/commands/vote/CloseCommand.kt +++ b/plugin/src/main/kotlin/space/votebot/commands/vote/CloseCommand.kt @@ -9,8 +9,6 @@ import dev.kord.common.entity.Permission import dev.kord.core.behavior.edit import dev.schlaubi.mikbot.plugin.api.util.discordError import io.github.oshai.kotlinlogging.KotlinLogging -import io.ktor.client.request.forms.ChannelProvider -import jdk.internal.joptsimple.internal.Messages.message import space.votebot.command.poll import space.votebot.commands.vote.create.guildOnlyCommand import space.votebot.commands.vote.create.voteCommandContext @@ -18,9 +16,6 @@ import space.votebot.core.VoteBotDatabase import space.votebot.core.VoteBotModule import space.votebot.core.close import space.votebot.core.findOneByMessage -import space.votebot.core.pieChartService -import space.votebot.core.toEmbed -import space.votebot.core.toPieChartCreateRequest private val LOG = KotlinLogging.logger { } diff --git a/plugin/src/main/kotlin/space/votebot/commands/vote/create/AbstractCreateLogic.kt b/plugin/src/main/kotlin/space/votebot/commands/vote/create/AbstractCreateLogic.kt index 90827f1..ef960e2 100644 --- a/plugin/src/main/kotlin/space/votebot/commands/vote/create/AbstractCreateLogic.kt +++ b/plugin/src/main/kotlin/space/votebot/commands/vote/create/AbstractCreateLogic.kt @@ -1,6 +1,5 @@ package space.votebot.commands.vote.create -import com.kotlindiscord.kord.extensions.DiscordRelayedException import com.kotlindiscord.kord.extensions.commands.Arguments import com.kotlindiscord.kord.extensions.commands.application.slash.EphemeralSlashCommandContext import com.kotlindiscord.kord.extensions.commands.application.slash.PublicSlashCommandContext @@ -14,7 +13,6 @@ import dev.kord.core.behavior.interaction.response.FollowupPermittingInteraction import dev.kord.core.entity.channel.GuildMessageChannel import dev.kord.rest.builder.message.MessageBuilder import dev.schlaubi.mikbot.plugin.api.util.Confirmation -import dev.schlaubi.mikbot.plugin.api.util.Translator import dev.schlaubi.mikbot.plugin.api.util.confirmation import dev.schlaubi.mikbot.plugin.api.util.discordError import kotlinx.datetime.Clock @@ -26,7 +24,6 @@ import space.votebot.util.checkPermissions import space.votebot.util.voteSafeGuild import kotlin.time.Duration import kotlin.time.Duration.Companion.minutes -import kotlin.time.Duration.Companion.seconds suspend fun SlashCommandContext<*, A, *>.createVote(response: FollowupPermittingInteractionResponseBehavior) where A : Arguments, A : CreateSettings = createVote(response) { arguments } diff --git a/plugin/src/main/kotlin/space/votebot/commands/vote/create/CreateCommand.kt b/plugin/src/main/kotlin/space/votebot/commands/vote/create/CreateCommand.kt index 7704482..43edbc7 100644 --- a/plugin/src/main/kotlin/space/votebot/commands/vote/create/CreateCommand.kt +++ b/plugin/src/main/kotlin/space/votebot/commands/vote/create/CreateCommand.kt @@ -12,7 +12,6 @@ import com.kotlindiscord.kord.extensions.components.types.emoji import com.kotlindiscord.kord.extensions.extensions.ephemeralSlashCommand import com.kotlindiscord.kord.extensions.parsers.DurationParser import com.kotlindiscord.kord.extensions.parsers.DurationParserException -import com.kotlindiscord.kord.extensions.utils.getJumpUrl import dev.kord.common.asJavaLocale import dev.kord.common.entity.ApplicationIntegrationType import dev.kord.common.entity.ButtonStyle diff --git a/plugin/src/main/kotlin/space/votebot/core/Renderer.kt b/plugin/src/main/kotlin/space/votebot/core/Renderer.kt index 32c7992..c6cbac2 100644 --- a/plugin/src/main/kotlin/space/votebot/core/Renderer.kt +++ b/plugin/src/main/kotlin/space/votebot/core/Renderer.kt @@ -8,14 +8,10 @@ import dev.kord.common.entity.Permission import dev.kord.common.entity.Snowflake import dev.kord.core.Kord import dev.kord.core.behavior.GuildBehavior -import dev.kord.core.behavior.channel.asChannelOf -import dev.kord.core.behavior.channel.asChannelOfOrNull import dev.kord.core.behavior.interaction.response.EphemeralMessageInteractionResponseBehavior import dev.kord.core.behavior.interaction.response.edit import dev.kord.core.builder.components.emoji import dev.kord.core.entity.ReactionEmoji -import dev.kord.core.entity.channel.TopGuildMessageChannel -import dev.kord.core.entity.channel.thread.ThreadChannel import dev.kord.rest.builder.component.ActionRowBuilder import dev.kord.rest.builder.component.MessageComponentBuilder import dev.kord.rest.builder.message.EmbedBuilder diff --git a/plugin/src/main/kotlin/space/votebot/core/VoteExecutor.kt b/plugin/src/main/kotlin/space/votebot/core/VoteExecutor.kt index b98be95..52722f4 100644 --- a/plugin/src/main/kotlin/space/votebot/core/VoteExecutor.kt +++ b/plugin/src/main/kotlin/space/votebot/core/VoteExecutor.kt @@ -12,18 +12,13 @@ import dev.kord.common.entity.Permission import dev.kord.common.entity.Snowflake import dev.kord.core.Kord import dev.kord.core.behavior.GuildBehavior -import dev.kord.core.behavior.channel.asChannelOf import dev.kord.core.behavior.interaction.response.EphemeralMessageInteractionResponseBehavior import dev.kord.core.behavior.interaction.response.createEphemeralFollowup import dev.kord.core.behavior.interaction.response.edit -import dev.kord.core.behavior.interaction.updatePublicMessage -import dev.kord.core.entity.channel.GuildChannel -import dev.kord.core.entity.channel.GuildMessageChannel import dev.kord.core.entity.channel.TopGuildMessageChannel import dev.kord.core.entity.channel.thread.ThreadChannel import dev.kord.core.event.interaction.ButtonInteractionCreateEvent import dev.kord.core.event.interaction.GuildButtonInteractionCreateEvent -import dev.kord.gateway.Event import dev.kord.x.emoji.Emojis import dev.schlaubi.mikbot.plugin.api.util.MessageSender import dev.schlaubi.mikbot.plugin.api.util.Translator diff --git a/plugin/src/main/kotlin/space/votebot/core/VoteParentChannel.kt b/plugin/src/main/kotlin/space/votebot/core/VoteParentChannel.kt index cdb2202..f497447 100644 --- a/plugin/src/main/kotlin/space/votebot/core/VoteParentChannel.kt +++ b/plugin/src/main/kotlin/space/votebot/core/VoteParentChannel.kt @@ -1,7 +1,6 @@ package space.votebot.core import com.kotlindiscord.kord.extensions.commands.application.slash.EphemeralSlashCommandContext -import com.kotlindiscord.kord.extensions.commands.application.slash.SlashCommandContext import dev.kord.common.annotation.KordExperimental import dev.kord.common.annotation.KordUnsafe import dev.kord.common.entity.ALL @@ -12,7 +11,6 @@ import dev.kord.core.Kord import dev.kord.core.KordObject import dev.kord.core.behavior.MessageBehavior import dev.kord.core.behavior.channel.GuildMessageChannelBehavior -import dev.kord.core.behavior.channel.asChannelOf import dev.kord.core.behavior.channel.createMessage import dev.kord.core.behavior.edit import dev.kord.core.behavior.interaction.followup.FollowupMessageBehavior @@ -20,7 +18,6 @@ import dev.kord.core.behavior.interaction.followup.PublicFollowupMessageBehavior import dev.kord.core.behavior.interaction.followup.edit import dev.kord.core.behavior.interaction.response.FollowupPermittingInteractionResponseBehavior import dev.kord.core.behavior.interaction.response.createPublicFollowup -import dev.kord.core.entity.channel.GuildMessageChannel import dev.kord.core.entity.channel.TopGuildMessageChannel import dev.kord.core.entity.channel.thread.ThreadChannel import dev.kord.rest.builder.message.create.MessageCreateBuilder diff --git a/plugin/src/main/kotlin/space/votebot/util/PollMessageUtil.kt b/plugin/src/main/kotlin/space/votebot/util/PollMessageUtil.kt index f919213..5f85e21 100644 --- a/plugin/src/main/kotlin/space/votebot/util/PollMessageUtil.kt +++ b/plugin/src/main/kotlin/space/votebot/util/PollMessageUtil.kt @@ -1,9 +1,7 @@ package space.votebot.util import dev.kord.core.behavior.channel.GuildMessageChannelBehavior -import dev.kord.core.behavior.channel.asChannelOf import dev.kord.core.entity.Message -import dev.kord.core.entity.channel.GuildChannel import space.votebot.common.models.Poll fun Message.toPollMessage() = Poll.Message(