@@ -363,6 +363,41 @@ about its business.
363363
364364 .. versionadded :: 0.6
365365
366+ .. py :method :: send_gif([path=None , file_id=None , duration=None , width=None , height=None , caption=None , thumb=None , reply_to=None , attach=None , extra=None , notify=True ])
367+
368+ Send an animation to the user. You can specify the animation by passing its *path *,
369+ its *url *, or its Telegram *file_id *. Only one of these arguments must be passed.
370+
371+ You may optionally specify the *duration *, the *width * and the *height * of the GIF.
372+ If the GIF track you're sending is in reply to another message,
373+ set *reply_to * to the ID of the other :py:class: `~botogram.Message `.
374+
375+ The *attach * parameter allows you to attach extra things like
376+ :ref: `buttons <buttons >` to the message.
377+
378+ The *notify * parameter is for defining if your message should trigger
379+ a notification on the client side (yes by default).
380+
381+ :param str path: The path to the animation
382+ :param str file_id: The Telegram *file_id * of the animation
383+ :param int duration: The animation duration, in seconds
384+ :param str width: The animation width, in pixels
385+ :param str height: The animation height, in pixels
386+ :param str caption: The caption of the video
387+ :param str thumb: The path to the thumb
388+ :param int reply_to: The ID of the :py:class: `~botogram.Message ` this one is replying to
389+ :param object attach: An extra thing to attach to the message.
390+ :param object extra: An extra reply interface object to attach
391+ :param bool notify: If you want to trigger the client notification.
392+ :returns: The message you sent
393+ :rtype: ~botogram.Message
394+
395+ .. deprecated :: 0.4
396+
397+ The *extra * parameter is now deprecated
398+
399+ .. versionadded :: 0.7
400+
366401 .. py :method :: send_file([path=None , file_id=None , url=None , thumb=None , reply_to=None , attach=None , extra=None , notify=True , caption=None , syntax=None ])
367402
368403 Send a generic file to the user. You can specify the file by passing its *path *,
@@ -1210,6 +1245,41 @@ about its business.
12101245
12111246 .. versionadded :: 0.6
12121247
1248+ .. py :method :: send_gif([path=None , file_id=None , duration=None , width=None , height=None , caption=None , thumb=None , reply_to=None , attach=None , extra=None , notify=True ])
1249+
1250+ Send an animation to the user. You can specify the animation by passing its *path *,
1251+ its *url *, or its Telegram *file_id *. Only one of these arguments must be passed.
1252+
1253+ You may optionally specify the *duration *, the *width * and the *height * of the GIF.
1254+ If the GIF track you're sending is in reply to another message,
1255+ set *reply_to * to the ID of the other :py:class: `~botogram.Message `.
1256+
1257+ The *attach * parameter allows you to attach extra things like
1258+ :ref: `buttons <buttons >` to the message.
1259+
1260+ The *notify * parameter is for defining if your message should trigger
1261+ a notification on the client side (yes by default).
1262+
1263+ :param str path: The path to the animation
1264+ :param str file_id: The Telegram *file_id * of the animation
1265+ :param int duration: The animation duration, in seconds
1266+ :param str width: The animation width, in pixels
1267+ :param str height: The animation height, in pixels
1268+ :param str caption: The caption of the video
1269+ :param str thumb: The path to the thumb
1270+ :param int reply_to: The ID of the :py:class: `~botogram.Message ` this one is replying to
1271+ :param object attach: An extra thing to attach to the message.
1272+ :param object extra: An extra reply interface object to attach
1273+ :param bool notify: If you want to trigger the client notification.
1274+ :returns: The message you sent
1275+ :rtype: ~botogram.Message
1276+
1277+ .. deprecated :: 0.4
1278+
1279+ The *extra * parameter is now deprecated
1280+
1281+ .. versionadded :: 0.7
1282+
12131283 .. py :method :: send_file([path=None , file_id=None , url=None , thumb=None , reply_to=None , attach=None , extra=None , notify=True , caption=None , syntax=None ])
12141284
12151285 Send a generic file to the chat. You can specify the video by passing its *path *,
@@ -1728,6 +1798,14 @@ about its business.
17281798 file.
17291799
17301800 *This attribute can be None if it's not provided by Telegram. *
1801+
1802+ .. py :attribute :: animation
1803+
1804+ A :py:class: `~botogram.Animation~ object, for when this message is an animation
1805+ file.
1806+
1807+ *This attribute can be None if it's not provided by Telegram.*
1808+
17311809 .. py:attribute:: caption
17321810
17331811 A caption for when this message is a photo or video file.
@@ -2137,7 +2215,7 @@ about its business.
21372215
21382216 .. py :method :: reply_with_video_note([path=None , file_id=None , duration=None , length=None , thumb=None , attach=None , extra=None , notify=True ])
21392217
2140- Reply with the video note to the user. You can specify the video note by passing its *path *,
2218+ Reply with the video note to the user. You can specify the video note by passing its *path *,
21412219 or its Telegram *file_id *. Only one of these arguments must be passed.
21422220
21432221 You may optionally specify the *duration * and the *length * of the video.
@@ -2168,6 +2246,41 @@ about its business.
21682246
21692247 .. versionadded :: 0.6
21702248
2249+ .. py :method :: reply_with_gif([path=None , file_id=None , duration=None , width=None , height=None , caption=None , thumb=None , attach=None , extra=None , notify=True ])
2250+
2251+ Reply with an animation to the message. You can specify the animation by passing its *path *,
2252+ its *url *, or its Telegram *file_id *. Only one of these arguments must be passed.
2253+
2254+ You may optionally specify the *duration *, the *width * and the *height * of the GIF.
2255+ If the GIF track you're sending is in reply to another message,
2256+ set *reply_to * to the ID of the other :py:class: `~botogram.Message `.
2257+
2258+ The *attach * parameter allows you to attach extra things like
2259+ :ref: `buttons <buttons >` to the message.
2260+
2261+ The *notify * parameter is for defining if your message should trigger
2262+ a notification on the client side (yes by default).
2263+
2264+ :param str path: The path to the animation
2265+ :param str file_id: The Telegram *file_id * of the animation
2266+ :param int duration: The animation duration, in seconds
2267+ :param str width: The animation width, in pixels
2268+ :param str height: The animation height, in pixels
2269+ :param str caption: The caption of the video
2270+ :param str thumb: The path to the thumb
2271+ :param int reply_to: The ID of the :py:class: `~botogram.Message ` this one is replying to
2272+ :param object attach: An extra thing to attach to the message.
2273+ :param object extra: An extra reply interface object to attach
2274+ :param bool notify: If you want to trigger the client notification.
2275+ :returns: The message you sent
2276+ :rtype: ~botogram.Message
2277+
2278+ .. deprecated :: 0.4
2279+
2280+ The *extra * parameter is now deprecated
2281+
2282+ .. versionadded :: 0.7
2283+
21712284 .. py :method :: reply_with_file(path, [thumb=None , attach=None , extra=None , notify=True ])
21722285
21732286 Reply with the generic file found in the *path * to the chat. If the file
@@ -2709,6 +2822,60 @@ about its business.
27092822 :param str path: The file name path locating where the video note should be saved.
27102823
27112824
2825+ .. py :class :: botogram.Animation
2826+
2827+ This class represents an animation file.
2828+
2829+ .. py :attribute :: file_id
2830+
2831+ The string ID of the file.
2832+
2833+ .. py :attribute :: length
2834+
2835+ The integer length of the animation as defined by the sender.
2836+
2837+ .. py :attribute :: width
2838+
2839+ The integer width of the video as defined by the sender.
2840+
2841+ .. py :attribute :: height
2842+
2843+ The integer height of the video as defined by the sender.
2844+
2845+ .. py :attribute :: thumb
2846+
2847+ A :py:class: `~botogram.PhotoSize ` object representing a thumbnail image of
2848+ the animation as defined by the sender.
2849+
2850+ *This attribute can be None if it's not provided by Telegram. *
2851+
2852+ .. py :attribute :: file_name
2853+
2854+ The original animation filename as defined by the sender.
2855+
2856+ *This attribute can be None if it's not provided by Telegram. *
2857+
2858+ .. py :attribute :: mime_type
2859+
2860+ The MIME type of the file as defined by the sender.
2861+
2862+ *This attribute can be None if it's not provided by Telegram. *
2863+
2864+ .. py :attribute :: file_size
2865+
2866+ The integer size of the animation file
2867+
2868+ *This attribute can be None if it's not provided by Telegram. *
2869+
2870+ .. py :method :: save(path)
2871+
2872+ Save the animation to a file located by *path *. Be aware that Telegram can
2873+ not provide the name of the original file sent by its sender. This should
2874+ be generated as part of the path.
2875+
2876+ :param str path: The file name path locating where the video note should be saved.
2877+
2878+
27122879.. py :class :: botogram.Voice
27132880
27142881 This class represents a voice message.
0 commit comments