Skip to content

Commit

Permalink
bot api update
Browse files Browse the repository at this point in the history
  • Loading branch information
watzon committed Jun 5, 2024
1 parent 5919932 commit 84cc5b3
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 18 deletions.
24 changes: 13 additions & 11 deletions src/tourmaline/client/api.cr
Original file line number Diff line number Diff line change
Expand Up @@ -149,23 +149,25 @@ module Tourmaline
caption : String | ::Nil = nil,
parse_mode : ParseMode = default_parse_mode,
caption_entities : Array(Tourmaline::MessageEntity) | ::Nil = nil,
show_caption_above_media : Bool | ::Nil = nil,
disable_notification : Bool | ::Nil = nil,
protect_content : Bool | ::Nil = nil,
reply_parameters : Tourmaline::ReplyParameters | ::Nil = nil,
reply_markup : Tourmaline::InlineKeyboardMarkup | Tourmaline::ReplyKeyboardMarkup | Tourmaline::ReplyKeyboardRemove | Tourmaline::ForceReply | ::Nil = nil
)
request(Tourmaline::MessageId, "copyMessage", {
chat_id: chat_id,
from_chat_id: from_chat_id,
message_id: message_id,
message_thread_id: message_thread_id,
caption: caption,
parse_mode: parse_mode,
caption_entities: caption_entities.try(&.to_json),
disable_notification: disable_notification,
protect_content: protect_content,
reply_parameters: reply_parameters,
reply_markup: reply_markup.try(&.to_json),
chat_id: chat_id,
from_chat_id: from_chat_id,
message_id: message_id,
message_thread_id: message_thread_id,
caption: caption,
parse_mode: parse_mode,
caption_entities: caption_entities.try(&.to_json),
show_caption_above_media: show_caption_above_media,
disable_notification: disable_notification,
protect_content: protect_content,
reply_parameters: reply_parameters,
reply_markup: reply_markup.try(&.to_json),
})
end

Expand Down
14 changes: 7 additions & 7 deletions src/tourmaline/types/api.cr
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ module Tourmaline
# Optional. The bot was connected to or disconnected from a business account, or a user edited an existing connection with the bot
property business_connection : Tourmaline::BusinessConnection | ::Nil

# Optional. New non-service message from a connected business account
# Optional. New message from a connected business account
property business_message : Tourmaline::Message | ::Nil

# Optional. New version of a message from a connected business account
Expand Down Expand Up @@ -329,7 +329,7 @@ module Tourmaline
# Optional. True, if users need to join the supergroup before they can send messages
property? join_to_send_messages : Bool | ::Nil

# Optional. True, if all users directly joining the supergroup need to be approved by supergroup administrators
# Optional. True, if all users directly joining the supergroup without using an invite link need to be approved by supergroup administrators
property? join_by_request : Bool | ::Nil

# Optional. Description, for groups, supergroups and channel chats
Expand Down Expand Up @@ -1578,12 +1578,12 @@ module Tourmaline
class Location
include JSON::Serializable

# Longitude as defined by sender
property longitude : Float64

# Latitude as defined by sender
property latitude : Float64

# Longitude as defined by sender
property longitude : Float64

# Optional. The radius of uncertainty for the location, measured in meters; 0-1500
property horizontal_accuracy : Float64 | ::Nil

Expand All @@ -1597,8 +1597,8 @@ module Tourmaline
property proximity_alert_radius : Int32 | Int64 | ::Nil

def initialize(
@longitude,
@latitude,
@longitude,
@horizontal_accuracy : Float64 | ::Nil = nil,
@live_period : Int32 | Int64 | ::Nil = nil,
@heading : Int32 | Int64 | ::Nil = nil,
Expand Down Expand Up @@ -2828,7 +2828,7 @@ module Tourmaline
# Optional. Chat invite link, which was used by the user to join the chat; for joining by invite link events only.
property invite_link : Tourmaline::ChatInviteLink | ::Nil

# Optional. True, if the user joined the chat after sending a direct join request and being approved by an administrator
# Optional. True, if the user joined the chat after sending a direct join request without using an invite link and being approved by an administrator
property? via_join_request : Bool | ::Nil

# Optional. True, if the user joined the chat via a chat folder invite link
Expand Down

0 comments on commit 84cc5b3

Please sign in to comment.