diff --git a/src/grom.gleam b/src/grom.gleam index ef04d8b..2c9183b 100644 --- a/src/grom.gleam +++ b/src/grom.gleam @@ -21446,3 +21446,29 @@ pub fn bulk_ovewrite_global_commands_response( ) -> Result(List(Command), RestError) { handle_response(response:, decode_with: decode.list(of: command_decoder())) } + +pub fn get_guild_commands_request( + token token: Token, + current_application_id application_id: Snowflake(Application), + guild_id guild_id: Snowflake(Guild), + with_localizations with_localizations: Bool, +) -> Request(String) { + new_request( + token:, + to: "/applications/" + <> snowflake_to_string(application_id) + <> "/guilds/" + <> snowflake_to_string(guild_id) + <> "/commands", + method: http.Get, + ) + |> request.set_query([ + #("with_localizations", bool.to_string(with_localizations)), + ]) +} + +pub fn get_guild_commands_response( + response: Response(String), +) -> Result(List(Command), RestError) { + handle_response(response:, decode_with: decode.list(of: command_decoder())) +}