Skip to content
This repository was archived by the owner on Feb 22, 2026. It is now read-only.

Commit aaf0518

Browse files
committed
issue-156: Review/Implement Bot API 7.3 Changes
- Updated fns for the telegram bot api 7.3 release. - Bumped project and dependency versions. - Generated pom. - Minor readme updates for usage docs section.
1 parent e47f5e2 commit aaf0518

File tree

5 files changed

+36
-29
lines changed

5 files changed

+36
-29
lines changed

README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,13 @@ Each API call is a Clojure function, with docstrings outlining required and opti
1313
1414
## Usage
1515

16-
Documentation is available on the project wiki or github pages. The API docs are generated on cljdoc.
16+
For getting started/examples, documentation is available on the project wiki and github pages.
1717

1818
- [Wiki](https://github.com/wdhowe/telegrambot-lib/wiki)
1919
- [Github pages](https://wdhowe.github.io/telegrambot-lib/)
20+
21+
For details on the library API, docs are generated on cljdoc.
22+
2023
- [API Docs](https://cljdoc.org/d/telegrambot-lib/telegrambot-lib/CURRENT/api/telegrambot-lib.core)
2124

2225
## License
@@ -42,6 +45,6 @@ at <https://www.gnu.org/software/classpath/license.html>.
4245
[gh-actions]: https://github.com/wdhowe/telegrambot-lib/actions
4346
[cljdoc-badge]: https://cljdoc.org/badge/telegrambot-lib/telegrambot-lib
4447
[cljdoc-link]: https://cljdoc.org/d/telegrambot-lib/telegrambot-lib/CURRENT
45-
[clojure-v]: https://img.shields.io/badge/clojure-1.11.2-blue.svg
48+
[clojure-v]: https://img.shields.io/badge/clojure-1.11.3-blue.svg
4649
[clojars]: https://clojars.org/telegrambot-lib
4750
[clojars-badge]: https://img.shields.io/clojars/v/telegrambot-lib.svg

pom.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<groupId>telegrambot-lib</groupId>
55
<artifactId>telegrambot-lib</artifactId>
66
<packaging>jar</packaging>
7-
<version>2.13.0</version>
7+
<version>2.14.0</version>
88
<name>telegrambot-lib</name>
99
<description>A library for interacting with the Telegram Bot API.</description>
1010
<url>https://github.com/wdhowe/telegrambot-lib</url>
@@ -18,7 +18,7 @@
1818
<url>https://github.com/wdhowe/telegrambot-lib</url>
1919
<connection>scm:git:git://github.com/wdhowe/telegrambot-lib.git</connection>
2020
<developerConnection>scm:git:ssh://git@github.com/wdhowe/telegrambot-lib.git</developerConnection>
21-
<tag>fc6a4dae6544e6f6d3ad04ab8f80f43ea61c2272</tag>
21+
<tag>e47f5e254d0449d65863bb3e21ad00d80728674a</tag>
2222
</scm>
2323
<build>
2424
<sourceDirectory>src</sourceDirectory>
@@ -69,7 +69,7 @@
6969
<dependency>
7070
<groupId>clj-http</groupId>
7171
<artifactId>clj-http</artifactId>
72-
<version>3.12.3</version>
72+
<version>3.13.0</version>
7373
</dependency>
7474
<dependency>
7575
<groupId>environ</groupId>
@@ -79,7 +79,7 @@
7979
<dependency>
8080
<groupId>org.clojure</groupId>
8181
<artifactId>clojure</artifactId>
82-
<version>1.11.2</version>
82+
<version>1.11.3</version>
8383
</dependency>
8484
<dependency>
8585
<groupId>org.clojure</groupId>

project.clj

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
1-
(defproject telegrambot-lib "2.13.0"
2-
1+
(defproject telegrambot-lib "2.14.0"
2+
33
;;; Project Metadata
44
:description "A library for interacting with the Telegram Bot API."
55
:url "https://github.com/wdhowe/telegrambot-lib"
66
:license {:name "EPL-2.0 OR GPL-2.0-or-later WITH Classpath-exception-2.0"
77
:url "https://www.eclipse.org/legal/epl-2.0/"}
8-
8+
99
;;; Dependencies, Plugins
10-
:dependencies [[clj-http "3.12.3"]
10+
:dependencies [[clj-http "3.13.0"]
1111
[environ "1.2.0"]
12-
[org.clojure/clojure "1.11.2"]
12+
[org.clojure/clojure "1.11.3"]
1313
[org.clojure/core.async "1.6.681"]
1414
[org.clojure/tools.logging "1.3.0"]
1515
[potemkin "0.4.7"]]
16-
16+
1717
;;; Profiles
1818
;; logback-classic must be 1.3.x due to jdk8 support.
1919
;; See: https://github.com/wdhowe/telegrambot-lib/pull/120/commits/015d31621a3fd5a7f69dcf7c230d76d55f7a47c1
@@ -22,25 +22,25 @@
2222
[org.clojure/data.json "2.5.0"]]
2323
:plugins [[lein-environ "1.2.0"]]
2424
:resource-paths ["env/dev/resources"]}
25-
25+
2626
;; Makes the 'local' profile available during REPL jack-in.
2727
;; Loads from profiles.clj (git ignored).
2828
:local {}
29-
29+
3030
;; A default test dep for json is required in order for cljdoc-analyze to pass.
3131
:test {:dependencies [[org.clojure/data.json "2.5.0"]
3232
[clj-http-fake/clj-http-fake "1.0.4"]]
3333
:plugins [[lein-environ "1.2.0"]]
3434
:resource-paths ["env/test/resources"]}
35-
35+
3636
;; Profiles for testing json libraries.
3737
:data.json {:dependencies [[org.clojure/data.json "2.5.0"]]}
38-
:cheshire {:dependencies [[cheshire "5.13.0"]]}
38+
:cheshire {:dependencies [[cheshire "5.13.0"]]}
3939
:jsonista {:dependencies [[metosin/jsonista "0.3.8"]]}}
40-
40+
4141
;;; Testing
4242
:test-selectors {:default (complement :json)
4343
:json :json}
44-
44+
4545
;;; Repl
4646
:repl-options {:init-ns telegrambot-lib.core})

src/telegrambot_lib/api/methods.clj

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -599,11 +599,13 @@
599599
- longitude ; long of new location
600600
601601
Optional
602+
- live_period ; New period in seconds which the location can be updated, starting from the message send date.
603+
; If 0x7FFFFFFF is specified, the location can be updated forever.
602604
- horizontal_accuracy ; 1-1500 meters radius of uncertainty
603605
- heading ; 1-360 degrees direction user is moving
604606
- proximity_alert_radius ; 1-100000 meters max distance for proximity alerts
605607
- reply_markup ; additional interface options"
606-
{:changed "0.2.0"}
608+
{:changed "2.14.0"}
607609

608610
([this content]
609611
(http/request this "editMessageLiveLocation" content))
@@ -811,9 +813,11 @@
811813
- this ; a bot instance
812814
- chat_id ; target chat or username (@user)
813815
- question ; poll question
814-
- options ; array/list of answer options
816+
- options ; array/list of InputPollOption
815817
816818
Optional
819+
- question_parse_mode ; Mode for parsing entities in the question.
820+
- question_entities ; A JSON-serialized list of special entities that appear in the poll question.
817821
- business_connection_id ; Unique id of the business connection.
818822
- message_thread_id ; id of the target thread of the forum.
819823
- is_anonymous ; true if poll is anonymous
@@ -830,7 +834,7 @@
830834
- protect_content ; protect content from forwarding/saving
831835
- reply_parameters ; Description of the message to reply to
832836
- reply_markup ; additional interface options"
833-
{:changed "2.13.0"}
837+
{:changed "2.14.0"}
834838

835839
([this content]
836840
(http/request this "sendPoll" content))
@@ -1606,12 +1610,12 @@
16061610
"Use this method to get up to date information about the chat
16071611
(current name of the user for one-on-one conversations,
16081612
current username of a user, group or channel, etc.).
1609-
Returns a Chat object on success.
1613+
Returns a ChatFullInfo object on success.
16101614
16111615
Required
16121616
- this ; a bot instance
16131617
- chat_id ; target chat or username (@user)"
1614-
{:changed "0.2.0"}
1618+
{:changed "2.14.0"}
16151619
content-map?)
16161620

16171621
(defmethod get-chat true
@@ -2090,8 +2094,8 @@
20902094

20912095
(defmethod get-business-connection false
20922096
[this business_connection_id]
2093-
(let [content {:business_connection_id business_connection_id}]
2094-
(get-business-connection this content)))
2097+
(let [content {:business_connection_id business_connection_id}]
2098+
(get-business-connection this content)))
20952099

20962100
(defmulti set-my-commands
20972101
"Use this method to change the list of the bot's commands.

src/telegrambot_lib/core.clj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@
2121
- Example: `(create \"12345\")`
2222
- Alternatively, parameters can be passed as a map instead.
2323
- Example: `(create {:bot-token \"12345\"})`
24-
24+
2525
Optional Parameters
2626
- bot-token ; The token id of your bot. (default: load from environment)
2727
- async ; Send API requests async or not. (default: false)
2828
- bot-api ; The Telegram Bot API URL. (default: official hosted API)
29-
29+
3030
Returns: A map data structure of a bot config."
3131
{:changed "2.10.0"}
3232
(fn
@@ -35,12 +35,12 @@
3535

3636
(defmethod create true
3737
[m]
38-
(merge (conf/cfg) m))
38+
(merge (conf/cfg) m))
3939

4040
(defmethod create false
4141
([]
4242
(create {}))
43-
43+
4444
([bot-token]
4545
(create {:bot-token bot-token})))
4646

0 commit comments

Comments
 (0)