Skip to content

Commit

Permalink
Move routes up
Browse files Browse the repository at this point in the history
  • Loading branch information
lukellmann committed Sep 3, 2024
1 parent 39fcfb7 commit abe3347
Showing 1 changed file with 20 additions and 12 deletions.
32 changes: 20 additions & 12 deletions rest/src/commonMain/kotlin/route/Route.kt
Original file line number Diff line number Diff line change
Expand Up @@ -988,6 +988,26 @@ public sealed class Route<T>(
)


/*
* Poll:
* https://discord.com/developers/docs/resources/poll
*/

public object GetVoteAnswer :
Route<AnswerVotersGetResponse>(
HttpMethod.Get,
"/channels/$ChannelId/polls/$MessageId/answers/$PollAnswerId",
AnswerVotersGetResponse.serializer(),
)

public object PostExpirePoll :
Route<DiscordMessage>(
HttpMethod.Post,
"/channels/$ChannelId/polls/$MessageId/expire",
DiscordMessage.serializer(),
)


/*
* Stage Instance:
* https://discord.com/developers/docs/resources/stage-instance
Expand Down Expand Up @@ -1047,16 +1067,4 @@ public sealed class Route<T>(
"/guilds/$GuildId/stickers/$StickerId",
DiscordMessageSticker.serializer()
)

public object GetVoteAnswer : Route<AnswerVotersGetResponse>(
HttpMethod.Get,
"/channels/$ChannelId/polls/$MessageId/answers/$PollAnswerId",
AnswerVotersGetResponse.serializer(),
)

public object PostExpirePoll : Route<DiscordMessage>(
HttpMethod.Post,
"/channels/$ChannelId/polls/$MessageId/expire",
DiscordMessage.serializer()
)
}

0 comments on commit abe3347

Please sign in to comment.