summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Uko Kokņevičs2025-10-19 11:12:24 +0300
committerGravatar Uko Kokņevičs2025-10-19 11:37:39 +0300
commit6b544b58dba095cafd6906d78b70bfd237397439 (patch)
treec7c4c6b061909a11c3d93cc53c3a141d9e6cae16
parentAdd an alpine build script for srht (diff)
downloadukkoclot-6b544b58dba095cafd6906d78b70bfd237397439.tar.gz
ukkoclot-6b544b58dba095cafd6906d78b70bfd237397439.tar.xz
ukkoclot-6b544b58dba095cafd6906d78b70bfd237397439.zip
Fix lint issues
-rw-r--r--src/tg.lisp1
-rw-r--r--src/tg/animation.lisp1
-rw-r--r--src/tg/answer-callback-query.lisp1
-rw-r--r--src/tg/bot-name.lisp1
-rw-r--r--src/tg/business-bot-rights.lisp1
-rw-r--r--src/tg/business-connection.lisp1
-rw-r--r--src/tg/callback-query.lisp1
-rw-r--r--src/tg/chat-administrator-rights.lisp1
-rw-r--r--src/tg/chat-type.lisp1
-rw-r--r--src/tg/chat.lisp1
-rw-r--r--src/tg/edit-message-text.lisp1
-rw-r--r--src/tg/force-reply.lisp1
-rw-r--r--src/tg/get-my-name.lisp1
-rw-r--r--src/tg/get-updates.lisp1
-rw-r--r--src/tg/inline-keyboard-button.lisp1
-rw-r--r--src/tg/inline-keyboard-markup.lisp1
-rw-r--r--src/tg/keyboard-button-poll-type.lisp15
-rw-r--r--src/tg/keyboard-button-request-chat.lisp1
-rw-r--r--src/tg/keyboard-button-request-users.lisp1
-rw-r--r--src/tg/keyboard-button.lisp1
-rw-r--r--src/tg/link-preview-options.lisp1
-rw-r--r--src/tg/message-entity-type.lisp47
-rw-r--r--src/tg/message-entity.lisp51
-rw-r--r--src/tg/message-reaction-updated.lisp1
-rw-r--r--src/tg/message.lisp7
-rw-r--r--src/tg/parse-mode.lisp1
-rw-r--r--src/tg/photo-size.lisp1
-rw-r--r--src/tg/reaction-type-custom-emoji.lisp1
-rw-r--r--src/tg/reaction-type-emoji.lisp1
-rw-r--r--src/tg/reaction-type-paid.lisp1
-rw-r--r--src/tg/reaction-type.lisp1
-rw-r--r--src/tg/reply-keyboard-markup.lisp1
-rw-r--r--src/tg/reply-keyboard-remove.lisp1
-rw-r--r--src/tg/reply-parameters.lisp3
-rw-r--r--src/tg/suggested-post-parameters.lisp1
-rw-r--r--src/tg/suggested-post-price.lisp13
-rw-r--r--src/tg/update.lisp1
-rw-r--r--src/tg/user.lisp5
-rw-r--r--src/tg/web-app-info.lisp1
-rw-r--r--ukkoclot.asd2
40 files changed, 116 insertions, 59 deletions
diff --git a/src/tg.lisp b/src/tg.lisp
index ee83b9a..ebfe54d 100644
--- a/src/tg.lisp
+++ b/src/tg.lisp
@@ -27,7 +27,6 @@
27 :ukkoclot/src/tg/link-preview-options 27 :ukkoclot/src/tg/link-preview-options
28 :ukkoclot/src/tg/message 28 :ukkoclot/src/tg/message
29 :ukkoclot/src/tg/message-entity 29 :ukkoclot/src/tg/message-entity
30 :ukkoclot/src/tg/message-entity-type
31 :ukkoclot/src/tg/message-reaction-updated 30 :ukkoclot/src/tg/message-reaction-updated
32 :ukkoclot/src/tg/parse-mode 31 :ukkoclot/src/tg/parse-mode
33 :ukkoclot/src/tg/photo-size 32 :ukkoclot/src/tg/photo-size
diff --git a/src/tg/animation.lisp b/src/tg/animation.lisp
index 3c95c1a..e213650 100644
--- a/src/tg/animation.lisp
+++ b/src/tg/animation.lisp
@@ -1,6 +1,7 @@
1;; SPDX-License-Identifier: EUPL-1.2 1;; SPDX-License-Identifier: EUPL-1.2
2;; SPDX-FileCopyrightText: 2025 Uko Kokņevičs <perkontevs@gmail.com> 2;; SPDX-FileCopyrightText: 2025 Uko Kokņevičs <perkontevs@gmail.com>
3(defpackage :ukkoclot/src/tg/animation 3(defpackage :ukkoclot/src/tg/animation
4 (:documentation "Animation Telegram type.")
4 (:use :c2cl :ukkoclot/src/tg/type-macros :ukkoclot/src/tg/photo-size) 5 (:use :c2cl :ukkoclot/src/tg/type-macros :ukkoclot/src/tg/photo-size)
5 (:export 6 (:export
6 #:animation 7 #:animation
diff --git a/src/tg/answer-callback-query.lisp b/src/tg/answer-callback-query.lisp
index 0bf958f..886d30e 100644
--- a/src/tg/answer-callback-query.lisp
+++ b/src/tg/answer-callback-query.lisp
@@ -1,6 +1,7 @@
1;; SPDX-License-Identifier: EUPL-1.2 1;; SPDX-License-Identifier: EUPL-1.2
2;; SPDX-FileCopyrightText: 2025 Uko Kokņevičs <perkontevs@gmail.com> 2;; SPDX-FileCopyrightText: 2025 Uko Kokņevičs <perkontevs@gmail.com>
3(defpackage :ukkoclot/src/tg/answer-callback-query 3(defpackage :ukkoclot/src/tg/answer-callback-query
4 (:documentation "answerCallbackQuery Telegram method")
4 (:use :c2cl :ukkoclot/src/tg/method-macros) 5 (:use :c2cl :ukkoclot/src/tg/method-macros)
5 (:export :answer-callback-query)) 6 (:export :answer-callback-query))
6(in-package :ukkoclot/src/tg/answer-callback-query) 7(in-package :ukkoclot/src/tg/answer-callback-query)
diff --git a/src/tg/bot-name.lisp b/src/tg/bot-name.lisp
index 3205b50..363d3d8 100644
--- a/src/tg/bot-name.lisp
+++ b/src/tg/bot-name.lisp
@@ -1,6 +1,7 @@
1;; SPDX-License-Identifier: EUPL-1.2 1;; SPDX-License-Identifier: EUPL-1.2
2;; SPDX-FileCopyrightText: 2025 Uko Kokņevičs <perkontevs@gmail.com> 2;; SPDX-FileCopyrightText: 2025 Uko Kokņevičs <perkontevs@gmail.com>
3(defpackage :ukkoclot/src/tg/bot-name 3(defpackage :ukkoclot/src/tg/bot-name
4 (:documentation "BotName Telegram type")
4 (:use :c2cl :ukkoclot/src/tg/type-macros) 5 (:use :c2cl :ukkoclot/src/tg/type-macros)
5 (:export 6 (:export
6 #:bot-name 7 #:bot-name
diff --git a/src/tg/business-bot-rights.lisp b/src/tg/business-bot-rights.lisp
index d683451..e267a2a 100644
--- a/src/tg/business-bot-rights.lisp
+++ b/src/tg/business-bot-rights.lisp
@@ -1,6 +1,7 @@
1;; SPDX-License-Identifier: EUPL-1.2 1;; SPDX-License-Identifier: EUPL-1.2
2;; SPDX-FileCopyrightText: 2025 Uko Kokņevičs <perkontevs@gmail.com> 2;; SPDX-FileCopyrightText: 2025 Uko Kokņevičs <perkontevs@gmail.com>
3(defpackage :ukkoclot/src/tg/business-bot-rights 3(defpackage :ukkoclot/src/tg/business-bot-rights
4 (:documentation "BusinessBotRights Telegram type")
4 (:use :c2cl :ukkoclot/src/tg/type-macros) 5 (:use :c2cl :ukkoclot/src/tg/type-macros)
5 (:export 6 (:export
6 #:business-bot-rights 7 #:business-bot-rights
diff --git a/src/tg/business-connection.lisp b/src/tg/business-connection.lisp
index ee2eb15..3a1c635 100644
--- a/src/tg/business-connection.lisp
+++ b/src/tg/business-connection.lisp
@@ -1,6 +1,7 @@
1;; SPDX-License-Identifier: EUPL-1.2 1;; SPDX-License-Identifier: EUPL-1.2
2;; SPDX-FileCopyrightText: 2025 Uko Kokņevičs <perkontevs@gmail.com> 2;; SPDX-FileCopyrightText: 2025 Uko Kokņevičs <perkontevs@gmail.com>
3(defpackage :ukkoclot/src/tg/business-connection 3(defpackage :ukkoclot/src/tg/business-connection
4 (:documentation "BusinessConnection Telegram type")
4 (:use 5 (:use
5 :c2cl 6 :c2cl
6 :ukkoclot/src/tg/type-macros 7 :ukkoclot/src/tg/type-macros
diff --git a/src/tg/callback-query.lisp b/src/tg/callback-query.lisp
index 8dc88d1..984955a 100644
--- a/src/tg/callback-query.lisp
+++ b/src/tg/callback-query.lisp
@@ -1,6 +1,7 @@
1;; SPDX-License-Identifier: EUPL-1.2 1;; SPDX-License-Identifier: EUPL-1.2
2;; SPDX-FileCopyrightText: 2025 Uko Kokņevičs <perkontevs@gmail.com> 2;; SPDX-FileCopyrightText: 2025 Uko Kokņevičs <perkontevs@gmail.com>
3(defpackage :ukkoclot/src/tg/callback-query 3(defpackage :ukkoclot/src/tg/callback-query
4 (:documentation "CallbackQuery Telegram type")
4 (:use :c2cl :ukkoclot/src/tg/type-macros) 5 (:use :c2cl :ukkoclot/src/tg/type-macros)
5 (:use 6 (:use
6 :ukkoclot/src/tg/message 7 :ukkoclot/src/tg/message
diff --git a/src/tg/chat-administrator-rights.lisp b/src/tg/chat-administrator-rights.lisp
index 05f5fb7..e11ac14 100644
--- a/src/tg/chat-administrator-rights.lisp
+++ b/src/tg/chat-administrator-rights.lisp
@@ -1,6 +1,7 @@
1;; SPDX-License-Identifier: EUPL-1.2 1;; SPDX-License-Identifier: EUPL-1.2
2;; SPDX-FileCopyrightText: 2025 Uko Kokņevičs <perkontevs@gmail.com> 2;; SPDX-FileCopyrightText: 2025 Uko Kokņevičs <perkontevs@gmail.com>
3(defpackage :ukkoclot/src/tg/chat-administrator-rights 3(defpackage :ukkoclot/src/tg/chat-administrator-rights
4 (:documentation "ChatAdministratorRights Telegram type")
4 (:use :c2cl :ukkoclot/src/tg/type-macros) 5 (:use :c2cl :ukkoclot/src/tg/type-macros)
5 (:export 6 (:export
6 #:chat-administrator-rights 7 #:chat-administrator-rights
diff --git a/src/tg/chat-type.lisp b/src/tg/chat-type.lisp
index 4d19bd1..be68e25 100644
--- a/src/tg/chat-type.lisp
+++ b/src/tg/chat-type.lisp
@@ -1,6 +1,7 @@
1;; SPDX-License-Identifier: EUPL-1.2 1;; SPDX-License-Identifier: EUPL-1.2
2;; SPDX-FileCopyrightText: 2025 Uko Kokņevičs <perkontevs@gmail.com> 2;; SPDX-FileCopyrightText: 2025 Uko Kokņevičs <perkontevs@gmail.com>
3(defpackage :ukkoclot/src/tg/chat-type 3(defpackage :ukkoclot/src/tg/chat-type
4 (:documentation "ChatType Telegram type.")
4 (:use :c2cl :ukkoclot/src/enum) 5 (:use :c2cl :ukkoclot/src/enum)
5 (:export :channel :chat-type :group :private :supergroup)) 6 (:export :channel :chat-type :group :private :supergroup))
6(in-package :ukkoclot/src/tg/chat-type) 7(in-package :ukkoclot/src/tg/chat-type)
diff --git a/src/tg/chat.lisp b/src/tg/chat.lisp
index 6e2f2b7..445b1fd 100644
--- a/src/tg/chat.lisp
+++ b/src/tg/chat.lisp
@@ -1,6 +1,7 @@
1;; SPDX-License-Identifier: EUPL-1.2 1;; SPDX-License-Identifier: EUPL-1.2
2;; SPDX-FileCopyrightText: 2025 Uko Kokņevičs <perkontevs@gmail.com> 2;; SPDX-FileCopyrightText: 2025 Uko Kokņevičs <perkontevs@gmail.com>
3(defpackage :ukkoclot/src/tg/chat 3(defpackage :ukkoclot/src/tg/chat
4 (:documentation "Chat Telegram type")
4 (:use :c2cl :ukkoclot/src/tg/chat-type :ukkoclot/src/tg/type-macros) 5 (:use :c2cl :ukkoclot/src/tg/chat-type :ukkoclot/src/tg/type-macros)
5 (:export 6 (:export
6 #:chat 7 #:chat
diff --git a/src/tg/edit-message-text.lisp b/src/tg/edit-message-text.lisp
index 6038e43..14b3a2c 100644
--- a/src/tg/edit-message-text.lisp
+++ b/src/tg/edit-message-text.lisp
@@ -1,6 +1,7 @@
1;; SPDX-License-Identifier: EUPL-1.2 1;; SPDX-License-Identifier: EUPL-1.2
2;; SPDX-FileCopyrightText: 2025 Uko Kokņevičs <perkontevs@gmail.com> 2;; SPDX-FileCopyrightText: 2025 Uko Kokņevičs <perkontevs@gmail.com>
3(defpackage :ukkoclot/src/tg/edit-message-text 3(defpackage :ukkoclot/src/tg/edit-message-text
4 (:documentation "editMessageText Telegram method")
4 (:use 5 (:use
5 :c2cl 6 :c2cl
6 :ukkoclot/src/tg/inline-keyboard-markup 7 :ukkoclot/src/tg/inline-keyboard-markup
diff --git a/src/tg/force-reply.lisp b/src/tg/force-reply.lisp
index a3e22f3..bd3711f 100644
--- a/src/tg/force-reply.lisp
+++ b/src/tg/force-reply.lisp
@@ -1,6 +1,7 @@
1;; SPDX-License-Identifier: EUPL-1.2 1;; SPDX-License-Identifier: EUPL-1.2
2;; SPDX-FileCopyrightText: 2025 Uko Kokņevičs <perkontevs@gmail.com> 2;; SPDX-FileCopyrightText: 2025 Uko Kokņevičs <perkontevs@gmail.com>
3(defpackage :ukkoclot/src/tg/force-reply 3(defpackage :ukkoclot/src/tg/force-reply
4 (:documentation "ForceReply Telegram type")
4 (:use :c2cl :ukkoclot/src/tg/type-macros) 5 (:use :c2cl :ukkoclot/src/tg/type-macros)
5 (:export 6 (:export
6 #:force-reply 7 #:force-reply
diff --git a/src/tg/get-my-name.lisp b/src/tg/get-my-name.lisp
index b7cb9bc..fe156a2 100644
--- a/src/tg/get-my-name.lisp
+++ b/src/tg/get-my-name.lisp
@@ -1,6 +1,7 @@
1;; SPDX-License-Identifier: EUPL-1.2 1;; SPDX-License-Identifier: EUPL-1.2
2;; SPDX-FileCopyrightText: 2025 Uko Kokņevičs <perkontevs@gmail.com> 2;; SPDX-FileCopyrightText: 2025 Uko Kokņevičs <perkontevs@gmail.com>
3(defpackage :ukkoclot/src/tg/get-my-name 3(defpackage :ukkoclot/src/tg/get-my-name
4 (:documentation "getMyName Telegram method")
4 (:use :c2cl :ukkoclot/src/tg/bot-name :ukkoclot/src/tg/method-macros) 5 (:use :c2cl :ukkoclot/src/tg/bot-name :ukkoclot/src/tg/method-macros)
5 (:export :get-my-name)) 6 (:export :get-my-name))
6(in-package :ukkoclot/src/tg/get-my-name) 7(in-package :ukkoclot/src/tg/get-my-name)
diff --git a/src/tg/get-updates.lisp b/src/tg/get-updates.lisp
index 5a4da4f..aaecc73 100644
--- a/src/tg/get-updates.lisp
+++ b/src/tg/get-updates.lisp
@@ -1,6 +1,7 @@
1;; SPDX-License-Identifier: EUPL-1.2 1;; SPDX-License-Identifier: EUPL-1.2
2;; SPDX-FileCopyrightText: 2025 Uko Kokņevičs <perkontevs@gmail.com> 2;; SPDX-FileCopyrightText: 2025 Uko Kokņevičs <perkontevs@gmail.com>
3(defpackage :ukkoclot/src/tg/get-updates 3(defpackage :ukkoclot/src/tg/get-updates
4 (:documentation "getUpdates Telegram method")
4 (:use :c2cl :ukkoclot/src/tg/method-macros :ukkoclot/src/tg/update) 5 (:use :c2cl :ukkoclot/src/tg/method-macros :ukkoclot/src/tg/update)
5 (:export :get-updates)) 6 (:export :get-updates))
6(in-package :ukkoclot/src/tg/get-updates) 7(in-package :ukkoclot/src/tg/get-updates)
diff --git a/src/tg/inline-keyboard-button.lisp b/src/tg/inline-keyboard-button.lisp
index 8d866a3..40153fe 100644
--- a/src/tg/inline-keyboard-button.lisp
+++ b/src/tg/inline-keyboard-button.lisp
@@ -1,6 +1,7 @@
1;; SPDX-License-Identifier: EUPL-1.2 1;; SPDX-License-Identifier: EUPL-1.2
2;; SPDX-FileCopyrightText: 2025 Uko Kokņevičs <perkontevs@gmail.com> 2;; SPDX-FileCopyrightText: 2025 Uko Kokņevičs <perkontevs@gmail.com>
3(defpackage :ukkoclot/src/tg/inline-keyboard-button 3(defpackage :ukkoclot/src/tg/inline-keyboard-button
4 (:documentation "InlineKeyboardButton Telegram type")
4 (:use :c2cl :ukkoclot/src/tg/type-macros :ukkoclot/src/tg/web-app-info) 5 (:use :c2cl :ukkoclot/src/tg/type-macros :ukkoclot/src/tg/web-app-info)
5 (:export 6 (:export
6 #:inline-keyboard-button 7 #:inline-keyboard-button
diff --git a/src/tg/inline-keyboard-markup.lisp b/src/tg/inline-keyboard-markup.lisp
index ac5aab4..da7a168 100644
--- a/src/tg/inline-keyboard-markup.lisp
+++ b/src/tg/inline-keyboard-markup.lisp
@@ -1,6 +1,7 @@
1;; SPDX-License-Identifier: EUPL-1.2 1;; SPDX-License-Identifier: EUPL-1.2
2;; SPDX-FileCopyrightText: 2025 Uko Kokņevičs <perkontevs@gmail.com> 2;; SPDX-FileCopyrightText: 2025 Uko Kokņevičs <perkontevs@gmail.com>
3(defpackage :ukkoclot/src/tg/inline-keyboard-markup 3(defpackage :ukkoclot/src/tg/inline-keyboard-markup
4 (:documentation "InlineKeyboardMarkup Telegram type")
4 (:use :c2cl :ukkoclot/src/tg/inline-keyboard-button :ukkoclot/src/tg/type-macros) 5 (:use :c2cl :ukkoclot/src/tg/inline-keyboard-button :ukkoclot/src/tg/type-macros)
5 (:export 6 (:export
6 #:inline-keyboard-markup 7 #:inline-keyboard-markup
diff --git a/src/tg/keyboard-button-poll-type.lisp b/src/tg/keyboard-button-poll-type.lisp
index da74da5..6ab91ea 100644
--- a/src/tg/keyboard-button-poll-type.lisp
+++ b/src/tg/keyboard-button-poll-type.lisp
@@ -1,14 +1,21 @@
1;; SPDX-License-Identifier: EUPL-1.2 1;; SPDX-License-Identifier: EUPL-1.2
2;; SPDX-FileCopyrightText: 2025 Uko Kokņevičs <perkontevs@gmail.com> 2;; SPDX-FileCopyrightText: 2025 Uko Kokņevičs <perkontevs@gmail.com>
3(defpackage :ukkoclot/src/tg/keyboard-button-poll-type 3(defpackage :ukkoclot/src/tg/keyboard-button-poll-type
4 (:use :c2cl :ukkoclot/src/tg/type-macros) 4 (:documentation "KeyboardButtonPollType Telegram type")
5 (:use :c2cl :ukkoclot/src/enum :ukkoclot/src/tg/type-macros)
5 (:export 6 (:export
7 #:keyboard-button-poll-type-type
8 #:quiz
9 #:regular
6 #:keyboard-button-poll-type 10 #:keyboard-button-poll-type
7 #:make-keyboard-button-poll-type 11 #:make-keyboard-button-poll-type
8 #:keyboard-button-poll-type-p 12 #:keyboard-button-poll-type-p
9 #:copy-keyboard-button-poll-type 13 #:copy-keyboard-button-poll-type))
10 #:keyboard-button-poll-type-type))
11(in-package :ukkoclot/src/tg/keyboard-button-poll-type) 14(in-package :ukkoclot/src/tg/keyboard-button-poll-type)
12 15
16(define-enum keyboard-button-poll-type-type
17 (quiz "quiz")
18 (regular "regular"))
19
13(define-tg-type keyboard-button-poll-type 20(define-tg-type keyboard-button-poll-type
14 (type (or string null) nil)) ;(member "quiz" "regular") or null 21 (type (or keyboard-button-poll-type-type null) nil))
diff --git a/src/tg/keyboard-button-request-chat.lisp b/src/tg/keyboard-button-request-chat.lisp
index 981487e..b91ff95 100644
--- a/src/tg/keyboard-button-request-chat.lisp
+++ b/src/tg/keyboard-button-request-chat.lisp
@@ -1,6 +1,7 @@
1;; SPDX-License-Identifier: EUPL-1.2 1;; SPDX-License-Identifier: EUPL-1.2
2;; SPDX-FileCopyrightText: 2025 Uko Kokņevičs <perkontevs@gmail.com> 2;; SPDX-FileCopyrightText: 2025 Uko Kokņevičs <perkontevs@gmail.com>
3(defpackage :ukkoclot/src/tg/keyboard-button-request-chat 3(defpackage :ukkoclot/src/tg/keyboard-button-request-chat
4 (:documentation "KeyboardButtonRequestChat Telegram type")
4 (:use :c2cl :ukkoclot/src/tg/chat-administrator-rights :ukkoclot/src/tg/type-macros) 5 (:use :c2cl :ukkoclot/src/tg/chat-administrator-rights :ukkoclot/src/tg/type-macros)
5 (:export 6 (:export
6 #:keyboard-button-request-chat 7 #:keyboard-button-request-chat
diff --git a/src/tg/keyboard-button-request-users.lisp b/src/tg/keyboard-button-request-users.lisp
index 4a22a21..a95b7a5 100644
--- a/src/tg/keyboard-button-request-users.lisp
+++ b/src/tg/keyboard-button-request-users.lisp
@@ -1,6 +1,7 @@
1;; SPDX-License-Identifier: EUPL-1.2 1;; SPDX-License-Identifier: EUPL-1.2
2;; SPDX-FileCopyrightText: 2025 Uko Kokņevičs <perkontevs@gmail.com> 2;; SPDX-FileCopyrightText: 2025 Uko Kokņevičs <perkontevs@gmail.com>
3(defpackage :ukkoclot/src/tg/keyboard-button-request-users 3(defpackage :ukkoclot/src/tg/keyboard-button-request-users
4 (:documentation "KeyboardButtonRequestUsers Telegram type")
4 (:use :c2cl :ukkoclot/src/tg/type-macros) 5 (:use :c2cl :ukkoclot/src/tg/type-macros)
5 (:export 6 (:export
6 #:keyboard-button-request-users 7 #:keyboard-button-request-users
diff --git a/src/tg/keyboard-button.lisp b/src/tg/keyboard-button.lisp
index 264b7c1..893c9a5 100644
--- a/src/tg/keyboard-button.lisp
+++ b/src/tg/keyboard-button.lisp
@@ -1,6 +1,7 @@
1;; SPDX-License-Identifier: EUPL-1.2 1;; SPDX-License-Identifier: EUPL-1.2
2;; SPDX-FileCopyrightText: 2025 Uko Kokņevičs <perkontevs@gmail.com> 2;; SPDX-FileCopyrightText: 2025 Uko Kokņevičs <perkontevs@gmail.com>
3(defpackage :ukkoclot/src/tg/keyboard-button 3(defpackage :ukkoclot/src/tg/keyboard-button
4 (:documentation "KeyboardButton Telegram type")
4 (:use 5 (:use
5 :c2cl 6 :c2cl
6 :ukkoclot/src/tg/keyboard-button-poll-type 7 :ukkoclot/src/tg/keyboard-button-poll-type
diff --git a/src/tg/link-preview-options.lisp b/src/tg/link-preview-options.lisp
index 3d1ff3f..c6272c2 100644
--- a/src/tg/link-preview-options.lisp
+++ b/src/tg/link-preview-options.lisp
@@ -1,6 +1,7 @@
1;; SPDX-License-Identifier: EUPL-1.2 1;; SPDX-License-Identifier: EUPL-1.2
2;; SPDX-FileCopyrightText: 2025 Uko Kokņevičs <perkontevs@gmail.com> 2;; SPDX-FileCopyrightText: 2025 Uko Kokņevičs <perkontevs@gmail.com>
3(defpackage :ukkoclot/src/tg/link-preview-options 3(defpackage :ukkoclot/src/tg/link-preview-options
4 (:documentation "LinkPreviewOptions Telegram type")
4 (:use :c2cl :ukkoclot/src/tg/type-macros) 5 (:use :c2cl :ukkoclot/src/tg/type-macros)
5 (:export 6 (:export
6 #:link-preview-options 7 #:link-preview-options
diff --git a/src/tg/message-entity-type.lisp b/src/tg/message-entity-type.lisp
deleted file mode 100644
index f964667..0000000
--- a/src/tg/message-entity-type.lisp
+++ /dev/null
@@ -1,47 +0,0 @@
1;; SPDX-License-Identifier: EUPL-1.2
2;; SPDX-FileCopyrightText: 2025 Uko Kokņevičs <perkontevs@gmail.com>
3(defpackage :ukkoclot/src/tg/message-entity-type
4 (:use :c2cl :ukkoclot/src/enum)
5 (:export
6 :message-entity-type
7 :mention
8 :hashtag
9 :cashtag
10 :bot-command
11 :url-entity
12 :email
13 :phone-number
14 :bold
15 :italic
16 :underline
17 :strikethrough
18 :spoiler
19 :blockquote
20 :expandable-blockquote
21 :code
22 :pre
23 :text-link
24 :text-mention
25 :custom-emoji))
26(in-package :ukkoclot/src/tg/message-entity-type)
27
28(define-enum message-entity-type
29 (mention "mention")
30 (hashtag "hashtag")
31 (cashtag "cashtag")
32 (bot-command "bot_command")
33 (url-entity "url")
34 (email "email")
35 (phone-number "phone_number")
36 (bold "bold")
37 (italic "italic")
38 (underline "underline")
39 (strikethrough "strikethrough")
40 (spoiler "spoiler")
41 (blockquote "blockquote")
42 (expandable-blockquote "expandable_blockquote")
43 (code "code")
44 (pre "pre")
45 (text-link "text_link")
46 (text-mention "text_mention")
47 (custom-emoji "custom_emoji"))
diff --git a/src/tg/message-entity.lisp b/src/tg/message-entity.lisp
index feb3e8f..1a8cd27 100644
--- a/src/tg/message-entity.lisp
+++ b/src/tg/message-entity.lisp
@@ -1,13 +1,34 @@
1;; SPDX-License-Identifier: EUPL-1.2 1;; SPDX-License-Identifier: EUPL-1.2
2;; SPDX-FileCopyrightText: 2025 Uko Kokņevičs <perkontevs@gmail.com> 2;; SPDX-FileCopyrightText: 2025 Uko Kokņevičs <perkontevs@gmail.com>
3(defpackage :ukkoclot/src/tg/message-entity 3(defpackage :ukkoclot/src/tg/message-entity
4 (:use :c2cl :iterate :ukkoclot/src/tg/type-macros :ukkoclot/src/tg/message-entity-type :ukkoclot/src/tg/user) 4 (:documentation "MessageEntity Telegram type")
5 (:use :c2cl :iterate :ukkoclot/src/enum :ukkoclot/src/tg/type-macros :ukkoclot/src/tg/user)
5 (:export 6 (:export
7 #:message-entity-type
8 #:mention
9 #:hashtag
10 #:cashtag
11 #:bot-command
12 #:url-entity
13 #:email
14 #:phone-number
15 #:bold
16 #:italic
17 #:underline
18 #:strikethrough
19 #:spoiler
20 #:blockquote
21 #:expandable-blockquote
22 #:code
23 #:pre
24 #:text-link
25 #:text-mention
26 #:custom-emoji
27
6 #:message-entity 28 #:message-entity
7 #:make-message-entity 29 #:make-message-entity
8 #:message-entity-p 30 #:message-entity-p
9 #:copy-message-entity 31 #:copy-message-entity
10 #:message-entity-type
11 #:message-entity-offset 32 #:message-entity-offset
12 #:message-entity-length 33 #:message-entity-length
13 #:message-entity-url 34 #:message-entity-url
@@ -18,6 +39,27 @@
18 #:message-entity-extract)) 39 #:message-entity-extract))
19(in-package :ukkoclot/src/tg/message-entity) 40(in-package :ukkoclot/src/tg/message-entity)
20 41
42(define-enum message-entity-type
43 (mention "mention")
44 (hashtag "hashtag")
45 (cashtag "cashtag")
46 (bot-command "bot_command")
47 (url-entity "url")
48 (email "email")
49 (phone-number "phone_number")
50 (bold "bold")
51 (italic "italic")
52 (underline "underline")
53 (strikethrough "strikethrough")
54 (spoiler "spoiler")
55 (blockquote "blockquote")
56 (expandable-blockquote "expandable_blockquote")
57 (code "code")
58 (pre "pre")
59 (text-link "text_link")
60 (text-mention "text_mention")
61 (custom-emoji "custom_emoji"))
62
21(define-tg-type message-entity 63(define-tg-type message-entity
22 (type message-entity-type) 64 (type message-entity-type)
23 (offset integer) 65 (offset integer)
@@ -31,11 +73,16 @@
31 (error "Some UTF-16 fuckery assumes that system chars are UTF-32")) 73 (error "Some UTF-16 fuckery assumes that system chars are UTF-32"))
32 74
33(defun utf16-width (ch) 75(defun utf16-width (ch)
76 "Calculate the size of char in UTF-16 units."
77 (declare (type character ch))
34 (if (< (char-code ch) #x10000) 78 (if (< (char-code ch) #x10000)
35 1 79 1
36 2)) 80 2))
37 81
38(defun message-entity-extract (entity text) 82(defun message-entity-extract (entity text)
83 "Extract the text corresponding to the ENTITY from the message text (in TEXT)."
84 (check-type entity message-entity)
85 (check-type text string)
39 (with-slots (length offset) entity 86 (with-slots (length offset) entity
40 (if (zerop length) 87 (if (zerop length)
41 "" 88 ""
diff --git a/src/tg/message-reaction-updated.lisp b/src/tg/message-reaction-updated.lisp
index 896bb9b..3e6c829 100644
--- a/src/tg/message-reaction-updated.lisp
+++ b/src/tg/message-reaction-updated.lisp
@@ -1,6 +1,7 @@
1;; SPDX-License-Identifier: EUPL-1.2 1;; SPDX-License-Identifier: EUPL-1.2
2;; SPDX-FileCopyrightText: 2025 Uko Kokņevičs <perkontevs@gmail.com> 2;; SPDX-FileCopyrightText: 2025 Uko Kokņevičs <perkontevs@gmail.com>
3(defpackage :ukkoclot/src/tg/message-reaction-updated 3(defpackage :ukkoclot/src/tg/message-reaction-updated
4 (:documentation "MessageReactionUpdated Telegram type")
4 (:use 5 (:use
5 :c2cl 6 :c2cl
6 :ukkoclot/src/tg/chat 7 :ukkoclot/src/tg/chat
diff --git a/src/tg/message.lisp b/src/tg/message.lisp
index 6739189..13162a5 100644
--- a/src/tg/message.lisp
+++ b/src/tg/message.lisp
@@ -1,6 +1,7 @@
1;; SPDX-License-Identifier: EUPL-1.2 1;; SPDX-License-Identifier: EUPL-1.2
2;; SPDX-FileCopyrightText: 2025 Uko Kokņevičs <perkontevs@gmail.com> 2;; SPDX-FileCopyrightText: 2025 Uko Kokņevičs <perkontevs@gmail.com>
3(defpackage :ukkoclot/src/tg/message 3(defpackage :ukkoclot/src/tg/message
4 (:documentation "Message Telegram type")
4 (:use 5 (:use
5 :c2cl 6 :c2cl
6 :ukkoclot/src/tg/animation 7 :ukkoclot/src/tg/animation
@@ -162,11 +163,17 @@
162 ;; (reply-markup (or inline-keyboard-markup null) nil) 163 ;; (reply-markup (or inline-keyboard-markup null) nil)
163 ) ; lint:suppress closing-parens-same-line whitespace-before-close-paren 164 ) ; lint:suppress closing-parens-same-line whitespace-before-close-paren
164 165
166(declaim (inline message-id))
165(defun message-id (msg) 167(defun message-id (msg)
168 "Better named version of `message-message-id'."
166 (message-message-id msg)) 169 (message-message-id msg))
167 170
171(declaim (inline message-chat-id))
168(defun message-chat-id (msg) 172(defun message-chat-id (msg)
173 "Shortcut for (CHAT-ID (MESSAGE-CHAT MSG))."
169 (chat-id (message-chat msg))) 174 (chat-id (message-chat msg)))
170 175
176(declaim (inline message-thread-id))
171(defun message-thread-id (msg) 177(defun message-thread-id (msg)
178 "Better named version of `message-message-thread-id'."
172 (message-message-thread-id msg)) 179 (message-message-thread-id msg))
diff --git a/src/tg/parse-mode.lisp b/src/tg/parse-mode.lisp
index 6fa37c3..b412394 100644
--- a/src/tg/parse-mode.lisp
+++ b/src/tg/parse-mode.lisp
@@ -1,6 +1,7 @@
1;; SPDX-License-Identifier: EUPL-1.2 1;; SPDX-License-Identifier: EUPL-1.2
2;; SPDX-FileCopyrightText: 2025 Uko Kokņevičs <perkontevs@gmail.com> 2;; SPDX-FileCopyrightText: 2025 Uko Kokņevičs <perkontevs@gmail.com>
3(defpackage :ukkoclot/src/tg/parse-mode 3(defpackage :ukkoclot/src/tg/parse-mode
4 (:documentation "Different parsing modes for sending text")
4 (:use :c2cl :ukkoclot/src/enum) 5 (:use :c2cl :ukkoclot/src/enum)
5 (:export :html :markdown-legacy :markdown :parse-mode)) 6 (:export :html :markdown-legacy :markdown :parse-mode))
6(in-package :ukkoclot/src/tg/parse-mode) 7(in-package :ukkoclot/src/tg/parse-mode)
diff --git a/src/tg/photo-size.lisp b/src/tg/photo-size.lisp
index af8ff5e..04eb617 100644
--- a/src/tg/photo-size.lisp
+++ b/src/tg/photo-size.lisp
@@ -1,6 +1,7 @@
1;; SPDX-License-Identifier: EUPL-1.2 1;; SPDX-License-Identifier: EUPL-1.2
2;; SPDX-FileCopyrightText: 2025 Uko Kokņevičs <perkontevs@gmail.com> 2;; SPDX-FileCopyrightText: 2025 Uko Kokņevičs <perkontevs@gmail.com>
3(defpackage :ukkoclot/src/tg/photo-size 3(defpackage :ukkoclot/src/tg/photo-size
4 (:documentation "PhotoSize Telegram type")
4 (:use :c2cl :ukkoclot/src/tg/type-macros) 5 (:use :c2cl :ukkoclot/src/tg/type-macros)
5 (:export 6 (:export
6 #:photo-size 7 #:photo-size
diff --git a/src/tg/reaction-type-custom-emoji.lisp b/src/tg/reaction-type-custom-emoji.lisp
index 05ed3b7..943720d 100644
--- a/src/tg/reaction-type-custom-emoji.lisp
+++ b/src/tg/reaction-type-custom-emoji.lisp
@@ -1,6 +1,7 @@
1;; SPDX-License-Identifier: EUPL-1.2 1;; SPDX-License-Identifier: EUPL-1.2
2;; SPDX-FileCopyrightText: 2025 Uko Kokņevičs <perkontevs@gmail.com> 2;; SPDX-FileCopyrightText: 2025 Uko Kokņevičs <perkontevs@gmail.com>
3(defpackage :ukkoclot/src/tg/reaction-type-custom-emoji 3(defpackage :ukkoclot/src/tg/reaction-type-custom-emoji
4 (:documentation "ReactionTypeCustomEmoji Telegram type")
4 (:use :c2cl :ukkoclot/src/enum :ukkoclot/src/tg/type-macros) 5 (:use :c2cl :ukkoclot/src/enum :ukkoclot/src/tg/type-macros)
5 (:export 6 (:export
6 #:custom-emoji-type 7 #:custom-emoji-type
diff --git a/src/tg/reaction-type-emoji.lisp b/src/tg/reaction-type-emoji.lisp
index 1e48b01..fd57385 100644
--- a/src/tg/reaction-type-emoji.lisp
+++ b/src/tg/reaction-type-emoji.lisp
@@ -1,6 +1,7 @@
1;; SPDX-License-Identifier: EUPL-1.2 1;; SPDX-License-Identifier: EUPL-1.2
2;; SPDX-FileCopyrightText: 2025 Uko Kokņevičs <perkontevs@gmail.com> 2;; SPDX-FileCopyrightText: 2025 Uko Kokņevičs <perkontevs@gmail.com>
3(defpackage :ukkoclot/src/tg/reaction-type-emoji 3(defpackage :ukkoclot/src/tg/reaction-type-emoji
4 (:documentation "ReactionTypeEmoji Telegram type")
4 (:use :c2cl :ukkoclot/src/enum :ukkoclot/src/tg/type-macros) 5 (:use :c2cl :ukkoclot/src/enum :ukkoclot/src/tg/type-macros)
5 (:export 6 (:export
6 #:reaction-type-emoji-type 7 #:reaction-type-emoji-type
diff --git a/src/tg/reaction-type-paid.lisp b/src/tg/reaction-type-paid.lisp
index 413f9ae..d794ad2 100644
--- a/src/tg/reaction-type-paid.lisp
+++ b/src/tg/reaction-type-paid.lisp
@@ -1,6 +1,7 @@
1;; SPDX-License-Identifier: EUPL-1.2 1;; SPDX-License-Identifier: EUPL-1.2
2;; SPDX-FileCopyrightText: 2025 Uko Kokņevičs <perkontevs@gmail.com> 2;; SPDX-FileCopyrightText: 2025 Uko Kokņevičs <perkontevs@gmail.com>
3(defpackage :ukkoclot/src/tg/reaction-type-paid 3(defpackage :ukkoclot/src/tg/reaction-type-paid
4 (:documentation "ReactionTypePaid Telegram type")
4 (:use :c2cl :ukkoclot/src/enum :ukkoclot/src/tg/type-macros) 5 (:use :c2cl :ukkoclot/src/enum :ukkoclot/src/tg/type-macros)
5 (:export 6 (:export
6 #:reaction-type-paid-type 7 #:reaction-type-paid-type
diff --git a/src/tg/reaction-type.lisp b/src/tg/reaction-type.lisp
index 356555d..15f722f 100644
--- a/src/tg/reaction-type.lisp
+++ b/src/tg/reaction-type.lisp
@@ -1,6 +1,7 @@
1;; SPDX-License-Identifier: EUPL-1.2 1;; SPDX-License-Identifier: EUPL-1.2
2;; SPDX-FileCopyrightText: 2025 Uko Kokņevičs <perkontevs@gmail.com> 2;; SPDX-FileCopyrightText: 2025 Uko Kokņevičs <perkontevs@gmail.com>
3(defpackage :ukkoclot/src/tg/reaction-type 3(defpackage :ukkoclot/src/tg/reaction-type
4 (:documentation "ReactionType Telegram type")
4 (:use 5 (:use
5 :c2cl 6 :c2cl
6 :ukkoclot/src/tg/type-macros 7 :ukkoclot/src/tg/type-macros
diff --git a/src/tg/reply-keyboard-markup.lisp b/src/tg/reply-keyboard-markup.lisp
index d6c0af3..6c24008 100644
--- a/src/tg/reply-keyboard-markup.lisp
+++ b/src/tg/reply-keyboard-markup.lisp
@@ -1,6 +1,7 @@
1;; SPDX-License-Identifier: EUPL-1.2 1;; SPDX-License-Identifier: EUPL-1.2
2;; SPDX-FileCopyrightText: 2025 Uko Kokņevičs <perkontevs@gmail.com> 2;; SPDX-FileCopyrightText: 2025 Uko Kokņevičs <perkontevs@gmail.com>
3(defpackage :ukkoclot/src/tg/reply-keyboard-markup 3(defpackage :ukkoclot/src/tg/reply-keyboard-markup
4 (:documentation "ReplyKeyboardMarkup Telegram type")
4 (:use :c2cl :ukkoclot/src/tg/keyboard-button :ukkoclot/src/tg/type-macros) 5 (:use :c2cl :ukkoclot/src/tg/keyboard-button :ukkoclot/src/tg/type-macros)
5 (:export 6 (:export
6 #:reply-keyboard-markup 7 #:reply-keyboard-markup
diff --git a/src/tg/reply-keyboard-remove.lisp b/src/tg/reply-keyboard-remove.lisp
index efed650..75a5c42 100644
--- a/src/tg/reply-keyboard-remove.lisp
+++ b/src/tg/reply-keyboard-remove.lisp
@@ -1,6 +1,7 @@
1;; SPDX-License-Identifier: EUPL-1.2 1;; SPDX-License-Identifier: EUPL-1.2
2;; SPDX-FileCopyrightText: 2025 Uko Kokņevičs <perkontevs@gmail.com> 2;; SPDX-FileCopyrightText: 2025 Uko Kokņevičs <perkontevs@gmail.com>
3(defpackage :ukkoclot/src/tg/reply-keyboard-remove 3(defpackage :ukkoclot/src/tg/reply-keyboard-remove
4 (:documentation "ReplyKeyboardRemove Telegram type")
4 (:use :c2cl :ukkoclot/src/tg/type-macros) 5 (:use :c2cl :ukkoclot/src/tg/type-macros)
5 (:export 6 (:export
6 #:reply-keyboard-remove 7 #:reply-keyboard-remove
diff --git a/src/tg/reply-parameters.lisp b/src/tg/reply-parameters.lisp
index d9c7b3b..152b57b 100644
--- a/src/tg/reply-parameters.lisp
+++ b/src/tg/reply-parameters.lisp
@@ -1,6 +1,7 @@
1;; SPDX-License-Identifier: EUPL-1.2 1;; SPDX-License-Identifier: EUPL-1.2
2;; SPDX-FileCopyrightText: 2025 Uko Kokņevičs <perkontevs@gmail.com> 2;; SPDX-FileCopyrightText: 2025 Uko Kokņevičs <perkontevs@gmail.com>
3(defpackage :ukkoclot/src/tg/reply-parameters 3(defpackage :ukkoclot/src/tg/reply-parameters
4 (:documentation "ReplyParameters Telegram type")
4 (:use :c2cl :ukkoclot/src/tg/type-macros :ukkoclot/src/tg/message-entity) 5 (:use :c2cl :ukkoclot/src/tg/type-macros :ukkoclot/src/tg/message-entity)
5 (:export 6 (:export
6 #:reply-parameters 7 #:reply-parameters
@@ -21,7 +22,7 @@
21 (message-id integer) 22 (message-id integer)
22 (chat-id (or integer string null) nil) 23 (chat-id (or integer string null) nil)
23 ;; TODO: This should be a ternary true, false, default 24 ;; TODO: This should be a ternary true, false, default
24 (allow-sending-without-reply boolean nil) 25 (allow-sending-without-reply boolean nil :skip-if-default nil)
25 (quote (or string null) nil) 26 (quote (or string null) nil)
26 (quote-parse-mode (or string null) nil) 27 (quote-parse-mode (or string null) nil)
27 (quote-entities (or (array message-entity) null) nil) 28 (quote-entities (or (array message-entity) null) nil)
diff --git a/src/tg/suggested-post-parameters.lisp b/src/tg/suggested-post-parameters.lisp
index f68d49a..43a7462 100644
--- a/src/tg/suggested-post-parameters.lisp
+++ b/src/tg/suggested-post-parameters.lisp
@@ -1,6 +1,7 @@
1;; SPDX-License-Identifier: EUPL-1.2 1;; SPDX-License-Identifier: EUPL-1.2
2;; SPDX-FileCopyrightText: 2025 Uko Kokņevičs <perkontevs@gmail.com> 2;; SPDX-FileCopyrightText: 2025 Uko Kokņevičs <perkontevs@gmail.com>
3(defpackage :ukkoclot/src/tg/suggested-post-parameters 3(defpackage :ukkoclot/src/tg/suggested-post-parameters
4 (:documentation "SuggestedPostParameters Telegram type")
4 (:use :c2cl :ukkoclot/src/tg/type-macros :ukkoclot/src/tg/suggested-post-price) 5 (:use :c2cl :ukkoclot/src/tg/type-macros :ukkoclot/src/tg/suggested-post-price)
5 (:export 6 (:export
6 #:suggested-post-parameters 7 #:suggested-post-parameters
diff --git a/src/tg/suggested-post-price.lisp b/src/tg/suggested-post-price.lisp
index b8eaa21..f12a768 100644
--- a/src/tg/suggested-post-price.lisp
+++ b/src/tg/suggested-post-price.lisp
@@ -1,16 +1,23 @@
1;; SPDX-License-Identifier: EUPL-1.2 1;; SPDX-License-Identifier: EUPL-1.2
2;; SPDX-FileCopyrightText: 2025 Uko Kokņevičs <perkontevs@gmail.com> 2;; SPDX-FileCopyrightText: 2025 Uko Kokņevičs <perkontevs@gmail.com>
3(defpackage :ukkoclot/src/tg/suggested-post-price 3(defpackage :ukkoclot/src/tg/suggested-post-price
4 (:use :c2cl :ukkoclot/src/tg/type-macros) 4 (:documentation "SuggestedPostPrice Telegram type")
5 (:use :c2cl :ukkoclot/src/enum :ukkoclot/src/tg/type-macros)
5 (:export 6 (:export
7 #:suggested-post-price-currency
8 #:stars
9 #:ton
6 #:suggested-post-price 10 #:suggested-post-price
7 #:make-suggested-post-price 11 #:make-suggested-post-price
8 #:suggested-post-price-p 12 #:suggested-post-price-p
9 #:copy-suggested-post-price 13 #:copy-suggested-post-price
10 #:suggested-post-price-currency
11 #:suggested-post-price-amount)) 14 #:suggested-post-price-amount))
12(in-package :ukkoclot/src/tg/suggested-post-price) 15(in-package :ukkoclot/src/tg/suggested-post-price)
13 16
17(define-enum suggested-post-price-currency
18 (stars "XTR")
19 (ton "TON"))
20
14(define-tg-type suggested-post-price 21(define-tg-type suggested-post-price
15 (currency string) ;(member "XTR" "TON") 22 (currency suggested-post-price-currency)
16 (amount integer)) 23 (amount integer))
diff --git a/src/tg/update.lisp b/src/tg/update.lisp
index cc4b6d3..20927ee 100644
--- a/src/tg/update.lisp
+++ b/src/tg/update.lisp
@@ -1,6 +1,7 @@
1;; SPDX-License-Identifier: EUPL-1.2 1;; SPDX-License-Identifier: EUPL-1.2
2;; SPDX-FileCopyrightText: 2025 Uko Kokņevičs <perkontevs@gmail.com> 2;; SPDX-FileCopyrightText: 2025 Uko Kokņevičs <perkontevs@gmail.com>
3(defpackage :ukkoclot/src/tg/update 3(defpackage :ukkoclot/src/tg/update
4 (:documentation "Update Telegram type")
4 (:use 5 (:use
5 :c2cl 6 :c2cl
6 :ukkoclot/src/tg/type-macros 7 :ukkoclot/src/tg/type-macros
diff --git a/src/tg/user.lisp b/src/tg/user.lisp
index 2549d66..0768d12 100644
--- a/src/tg/user.lisp
+++ b/src/tg/user.lisp
@@ -1,6 +1,7 @@
1;; SPDX-License-Identifier: EUPL-1.2 1;; SPDX-License-Identifier: EUPL-1.2
2;; SPDX-FileCopyrightText: 2025 Uko Kokņevičs <perkontevs@gmail.com> 2;; SPDX-FileCopyrightText: 2025 Uko Kokņevičs <perkontevs@gmail.com>
3(defpackage :ukkoclot/src/tg/user 3(defpackage :ukkoclot/src/tg/user
4 (:documentation "User Telegram type")
4 (:use :c2cl :ukkoclot/src/tg/type-macros) 5 (:use :c2cl :ukkoclot/src/tg/type-macros)
5 (:import-from :ukkoclot/src/strings :escape-xml) 6 (:import-from :ukkoclot/src/strings :escape-xml)
6 (:export 7 (:export
@@ -39,6 +40,7 @@
39 (can-connect-to-business boolean nil)) 40 (can-connect-to-business boolean nil))
40 41
41(defun user-format-name% (user out) 42(defun user-format-name% (user out)
43 "Format the USER's name in a nice way to stream OUT."
42 (format out "<a href=\"tg://user?id=~A\"><i>" (user-id user)) 44 (format out "<a href=\"tg://user?id=~A\"><i>" (user-id user))
43 (escape-xml (user-first-name user) out) 45 (escape-xml (user-first-name user) out)
44 (when (user-last-name user) 46 (when (user-last-name user)
@@ -53,6 +55,9 @@
53 (format out "</a> [<code>~A</code>]" (user-id user))) 55 (format out "</a> [<code>~A</code>]" (user-id user)))
54 56
55(defun user-format-name (user &optional out) 57(defun user-format-name (user &optional out)
58 "Format the USER's name in a nice way to stream OUT.
59
60If OUT is `nil', return the formatted name as a string instead."
56 (if out 61 (if out
57 (user-format-name% user out) 62 (user-format-name% user out)
58 (with-output-to-string (stream) 63 (with-output-to-string (stream)
diff --git a/src/tg/web-app-info.lisp b/src/tg/web-app-info.lisp
index 6126aa3..d255a69 100644
--- a/src/tg/web-app-info.lisp
+++ b/src/tg/web-app-info.lisp
@@ -1,6 +1,7 @@
1;; SPDX-License-Identifier: EUPL-1.2 1;; SPDX-License-Identifier: EUPL-1.2
2;; SPDX-FileCopyrightText: 2025 Uko Kokņevičs <perkontevs@gmail.com> 2;; SPDX-FileCopyrightText: 2025 Uko Kokņevičs <perkontevs@gmail.com>
3(defpackage :ukkoclot/src/tg/web-app-info 3(defpackage :ukkoclot/src/tg/web-app-info
4 (:documentation "WebAppInfo Telegram type")
4 (:use :c2cl :ukkoclot/src/tg/type-macros) 5 (:use :c2cl :ukkoclot/src/tg/type-macros)
5 (:export 6 (:export
6 #:web-app-info 7 #:web-app-info
diff --git a/ukkoclot.asd b/ukkoclot.asd
index 806c632..da41ebe 100644
--- a/ukkoclot.asd
+++ b/ukkoclot.asd
@@ -1,7 +1,7 @@
1;; SPDX-License-Identifier: EUPL-1.2 1;; SPDX-License-Identifier: EUPL-1.2
2;; SPDX-FileCopyrightText: 2025 Uko Kokņevičs <perkontevs@gmail.com> 2;; SPDX-FileCopyrightText: 2025 Uko Kokņevičs <perkontevs@gmail.com>
3 3
4(defsystem :ukkoclot 4(defsystem "ukkoclot"
5 :class :package-inferred-system 5 :class :package-inferred-system
6 :author "Uko Kokņevičs <perkontevs@gmail.com>" 6 :author "Uko Kokņevičs <perkontevs@gmail.com>"
7 :maintainer "Uko Kokņevičs <perkontevs@gmail.com>" 7 :maintainer "Uko Kokņevičs <perkontevs@gmail.com>"