From abe3347acd896779013400b1ba365bf62a0c0b98 Mon Sep 17 00:00:00 2001 From: Luca Kellermann Date: Tue, 3 Sep 2024 02:29:08 +0200 Subject: [PATCH] Move routes up --- rest/src/commonMain/kotlin/route/Route.kt | 32 ++++++++++++++--------- 1 file changed, 20 insertions(+), 12 deletions(-) diff --git a/rest/src/commonMain/kotlin/route/Route.kt b/rest/src/commonMain/kotlin/route/Route.kt index fb0b27d9684..b69041a14a7 100644 --- a/rest/src/commonMain/kotlin/route/Route.kt +++ b/rest/src/commonMain/kotlin/route/Route.kt @@ -988,6 +988,26 @@ public sealed class Route( ) + /* + * Poll: + * https://discord.com/developers/docs/resources/poll + */ + + public object GetVoteAnswer : + Route( + HttpMethod.Get, + "/channels/$ChannelId/polls/$MessageId/answers/$PollAnswerId", + AnswerVotersGetResponse.serializer(), + ) + + public object PostExpirePoll : + Route( + HttpMethod.Post, + "/channels/$ChannelId/polls/$MessageId/expire", + DiscordMessage.serializer(), + ) + + /* * Stage Instance: * https://discord.com/developers/docs/resources/stage-instance @@ -1047,16 +1067,4 @@ public sealed class Route( "/guilds/$GuildId/stickers/$StickerId", DiscordMessageSticker.serializer() ) - - public object GetVoteAnswer : Route( - HttpMethod.Get, - "/channels/$ChannelId/polls/$MessageId/answers/$PollAnswerId", - AnswerVotersGetResponse.serializer(), - ) - - public object PostExpirePoll : Route( - HttpMethod.Post, - "/channels/$ChannelId/polls/$MessageId/expire", - DiscordMessage.serializer() - ) }