You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/tourmaline/client/api.cr
+106-2Lines changed: 106 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -20,7 +20,7 @@ module Tourmaline
20
20
})
21
21
end
22
22
23
-
# Use this method to specify a URL and receive incoming updates via an outgoing webhook. Whenever there is an update for the bot, we will send an HTTPS POST request to the specified URL, containing a JSON-serialized Update. In case of an unsuccessful request, we will give up after a reasonable amount of attempts. Returns True on success.
23
+
# Use this method to specify a URL and receive incoming updates via an outgoing webhook. Whenever there is an update for the bot, we will send an HTTPS POST request to the specified URL, containing a JSON-serialized Update. In case of an unsuccessful request (a request with response HTTP status code different from 2XY), we will repeat the request and give up after a reasonable amount of attempts. Returns True on success.
24
24
# If you'd like to make sure that the webhook was set by you, you can specify secret data in the parameter secret_token. If specified, the request will contain a header "X-Telegram-Bot-Api-Secret-Token" with the secret token as content.
# Use this method to send an animated emoji that will display a random value. On success, the sent Message is returned.
659
685
defsend_dice(
660
686
chat_id : Int32|Int64|String,
@@ -698,7 +724,7 @@ module Tourmaline
698
724
})
699
725
end
700
726
701
-
# Use this method to change the chosen reactions on a message. Service messages can't be reacted to. Automatically forwarded messages from a channel to its discussion group have the same available reactions as messages in the channel. Returns True on success.
727
+
# Use this method to change the chosen reactions on a message. Service messages of some types can't be reacted to. Automatically forwarded messages from a channel to its discussion group have the same available reactions as messages in the channel. Bots can't use paid reactions. Returns True on success.
702
728
defset_message_reaction(
703
729
chat_id : Int32|Int64|String,
704
730
message_id : Int32|Int64,
@@ -726,6 +752,19 @@ module Tourmaline
726
752
})
727
753
end
728
754
755
+
# Changes the emoji status for a given user that previously allowed the bot to manage their emoji status via the Mini App method requestEmojiStatusAccess. Returns True on success.
# Use this method to get basic information about a file and prepare it for downloading. For the moment, bots can download files of up to 20MB in size. On success, a File object is returned. The file can then be downloaded via the link https://api.telegram.org/file/bot<token>/<file_path>, where <file_path> is taken from the response. It is guaranteed that the link will be valid for at least 1 hour. When the link expires, a new one can be requested by calling getFile again.
730
769
# Note: This function may not preserve the original file name and MIME type. You should save the file's MIME type and name (if available) when the File object is received.
731
770
defget_file(
@@ -1829,6 +1868,25 @@ module Tourmaline
1829
1868
})
1830
1869
end
1831
1870
1871
+
# Stores a message that can be sent by a user of a Mini App. Returns a PreparedInlineMessage object.
# Informs a user that some of the Telegram Passport elements they provided contains errors. The user will not be able to re-submit their Passport to you until the errors are fixed (the contents of the field for which you returned the error must change). Returns True on success.
1971
2075
# Use this if the data submitted by the user doesn't satisfy the standards your service requires for any reason. For example, if a birthday date seems invalid, a submitted document is blurry, a scan shows evidence of tampering, etc. Supply some details in the error message to make sure the user knows how to correct the issues.
0 commit comments