Skip to content

Commit

Permalink
feat: rename reply methods
Browse files Browse the repository at this point in the history
  • Loading branch information
bondiano committed Jun 26, 2024
1 parent db27c65 commit e728676
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 5 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ pub fn main() {
|> mist.new
|> mist.port(8000)
|> mist.start_http
|> result.nil_error
process.sleep_forever()
}
Expand Down
1 change: 0 additions & 1 deletion examples/00-echo-bot/src/bot.gleam
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ pub fn main() {
|> mist.new
|> mist.port(8000)
|> mist.start_http
|> result.nil_error

process.sleep_forever()
}
2 changes: 1 addition & 1 deletion examples/04-keyboard-bot/src/bot.gleam
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ fn handle_inline_change_language(
telega_model.new_answer_callback_query_parameters(callback_query_id),
))

use _ <- result.try(reply.edit_message_text(
use _ <- result.try(reply.edit_text(
ctx,
EditMessageTextParameters(
..telega_model.default_edit_message_text_parameters(),
Expand Down
4 changes: 2 additions & 2 deletions src/telega/reply.gleam
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ pub fn with_dice(
/// On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned.
///
/// **Official reference:** https://core.telegram.org/bots/api#editmessagetext
pub fn edit_message_text(
pub fn edit_text(
ctx ctx: Context(session),
parameters parameters: EditMessageTextParameters,
) -> Result(EditMessageTextResult, String) {
Expand All @@ -72,7 +72,7 @@ pub fn edit_message_text(
/// On success, the sent Message is returned.
///
/// **Official reference:** https://core.telegram.org/bots/api#forwardmessage
pub fn forward_message(
pub fn forward(
ctx ctx: Context(session),
parameters parameters: ForwardMessageParameters,
) -> Result(ModelMessage, String) {
Expand Down

0 comments on commit e728676

Please sign in to comment.