summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/tg-types.lisp2
-rw-r--r--src/tg-types/animation.lisp30
-rw-r--r--src/tg-types/message.lisp26
-rw-r--r--src/tg-types/photo-size.lisp22
4 files changed, 70 insertions, 10 deletions
diff --git a/src/tg-types.lisp b/src/tg-types.lisp
index 6a830b6..ba3ec3b 100644
--- a/src/tg-types.lisp
+++ b/src/tg-types.lisp
@@ -3,6 +3,7 @@
3(uiop:define-package :ukkoclot/tg-types 3(uiop:define-package :ukkoclot/tg-types
4 (:use) 4 (:use)
5 (:use-reexport 5 (:use-reexport
6 :ukkoclot/tg-types/animation
6 :ukkoclot/tg-types/bot-name 7 :ukkoclot/tg-types/bot-name
7 :ukkoclot/tg-types/callback-query 8 :ukkoclot/tg-types/callback-query
8 :ukkoclot/tg-types/chat 9 :ukkoclot/tg-types/chat
@@ -17,6 +18,7 @@
17 :ukkoclot/tg-types/link-preview-options 18 :ukkoclot/tg-types/link-preview-options
18 :ukkoclot/tg-types/message 19 :ukkoclot/tg-types/message
19 :ukkoclot/tg-types/message-entity 20 :ukkoclot/tg-types/message-entity
21 :ukkoclot/tg-types/photo-size
20 :ukkoclot/tg-types/reply-keyboard-markup 22 :ukkoclot/tg-types/reply-keyboard-markup
21 :ukkoclot/tg-types/reply-keyboard-remove 23 :ukkoclot/tg-types/reply-keyboard-remove
22 :ukkoclot/tg-types/reply-parameters 24 :ukkoclot/tg-types/reply-parameters
diff --git a/src/tg-types/animation.lisp b/src/tg-types/animation.lisp
new file mode 100644
index 0000000..421dcc7
--- /dev/null
+++ b/src/tg-types/animation.lisp
@@ -0,0 +1,30 @@
1;; SPDX-License-Identifier: EUPL-1.2
2;; SPDX-FileCopyrightText: 2025 Uko Kokņevičs <perkontevs@gmail.com>
3(defpackage :ukkoclot/tg-types/animation
4 (:use :c2cl :ukkoclot/tg-types/macros :ukkoclot/tg-types/photo-size)
5 (:export
6 #:animation
7 #:make-animation
8 #:animation-p
9 #:copy-animation
10 #:animation-file-id
11 #:animation-file-unique-id
12 #:animation-width
13 #:animation-height
14 #:animation-duration
15 #:animation-thumbnail
16 #:animation-file-name
17 #:animation-mime-type
18 #:animation-file-size))
19(in-package :ukkoclot/tg-types/animation)
20
21(define-tg-type animation
22 (file-id string)
23 (file-unique-id string)
24 (width integer)
25 (height integer)
26 (duration integer)
27 (thumbnail (or photo-size null) nil)
28 (file-name (or string null) nil)
29 (mime-type (or string null) nil)
30 (file-size (or integer null) nil))
diff --git a/src/tg-types/message.lisp b/src/tg-types/message.lisp
index 028379f..c402af2 100644
--- a/src/tg-types/message.lisp
+++ b/src/tg-types/message.lisp
@@ -1,12 +1,19 @@
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/tg-types/message 3(defpackage :ukkoclot/tg-types/message
4 (:use :c2cl :ukkoclot/tg-types/macros 4 (:use
5 5 :c2cl
6 :ukkoclot/tg-types/animation
6 :ukkoclot/tg-types/chat 7 :ukkoclot/tg-types/chat
8 :ukkoclot/tg-types/macros
7 :ukkoclot/tg-types/message-entity 9 :ukkoclot/tg-types/message-entity
10 :ukkoclot/tg-types/photo-size
8 :ukkoclot/tg-types/user) 11 :ukkoclot/tg-types/user)
9 (:export 12 (:export
13 #:message-chat-id
14 #:message-thread-id
15 #:message-id
16
10 #:message 17 #:message
11 #:make-message 18 #:make-message
12 #:message-p 19 #:message-p
@@ -34,11 +41,14 @@
34 #:message-text 41 #:message-text
35 #:message-entities 42 #:message-entities
36 #:message-effect-id 43 #:message-effect-id
44 #:message-animation
45 #:message-photo
37 #:message-caption 46 #:message-caption
38 #:message-show-caption-above-media 47 #:message-show-caption-above-media
39 #:message-has-media-spoiler 48 #:message-has-media-spoiler
40 #:message-new-chat-members 49 #:message-new-chat-members
41 #:message-new-chat-title 50 #:message-new-chat-title
51 #:message-new-chat-photo
42 #:message-delete-chat-photo 52 #:message-delete-chat-photo
43 #:message-group-chat-created 53 #:message-group-chat-created
44 #:message-supergroup-chat-created 54 #:message-supergroup-chat-created
@@ -46,11 +56,7 @@
46 #:message-migrate-to-chat-id 56 #:message-migrate-to-chat-id
47 #:message-migrate-from-chat-id 57 #:message-migrate-from-chat-id
48 #:message-pinned-message 58 #:message-pinned-message
49 #:message-connected-website 59 #:message-connected-website))
50
51 #:message-chat-id
52 #:message-thread-id
53 #:message-id))
54(in-package :ukkoclot/tg-types/message) 60(in-package :ukkoclot/tg-types/message)
55 61
56;; If this is a MaybeInaccessibleMessage date will be 0 if this is inaccessible 62;; If this is a MaybeInaccessibleMessage date will be 0 if this is inaccessible
@@ -86,11 +92,11 @@
86 ;; (link-preview-options (or link-preview-options null) nil) 92 ;; (link-preview-options (or link-preview-options null) nil)
87 ;; (suggested-post-info (or suggested-post-info null) nil) 93 ;; (suggested-post-info (or suggested-post-info null) nil)
88 (effect-id (or string null) nil) 94 (effect-id (or string null) nil)
89 ;; (animation (or animation null) nil) 95 (animation (or animation null) nil)
90 ;; (audio (or audio null) nil) 96 ;; (audio (or audio null) nil)
91 ;; (document (or document null) nil) 97 ;; (document (or document null) nil)
92 ;; (paid-media (or paid-media-info null) nil) 98 ;; (paid-media (or paid-media-info null) nil)
93 ;; (photo (or (array photo-size) null) nil) 99 (photo (or (array photo-size) null) nil)
94 ;; (sticker (or sticker null) nil) 100 ;; (sticker (or sticker null) nil)
95 ;; (story (or story null) nil) 101 ;; (story (or story null) nil)
96 ;; (video (or video null) nil) 102 ;; (video (or video null) nil)
@@ -109,7 +115,7 @@
109 (new-chat-members (or (array user) null) nil) 115 (new-chat-members (or (array user) null) nil)
110 ;; (left-chat-member (or user null) nil) 116 ;; (left-chat-member (or user null) nil)
111 (new-chat-title (or string null) nil) 117 (new-chat-title (or string null) nil)
112 ;; (new-chat-photo (or (array photo-size) null) nil) 118 (new-chat-photo (or (array photo-size) null) nil)
113 (delete-chat-photo boolean nil) 119 (delete-chat-photo boolean nil)
114 (group-chat-created boolean nil) 120 (group-chat-created boolean nil)
115 (supergroup-chat-created boolean nil) 121 (supergroup-chat-created boolean nil)
diff --git a/src/tg-types/photo-size.lisp b/src/tg-types/photo-size.lisp
new file mode 100644
index 0000000..2c8906d
--- /dev/null
+++ b/src/tg-types/photo-size.lisp
@@ -0,0 +1,22 @@
1;; SPDX-License-Identifier: EUPL-1.2
2;; SPDX-FileCopyrightText: 2025 Uko Kokņevičs <perkontevs@gmail.com>
3(defpackage :ukkoclot/tg-types/photo-size
4 (:use :c2cl :ukkoclot/tg-types/macros)
5 (:export
6 #:photo-size
7 #:make-photo-size
8 #:photo-size-p
9 #:copy-photo-size
10 #:photo-size-file-id
11 #:photo-size-file-unique-id
12 #:photo-size-width
13 #:photo-size-height
14 #:photo-size-file-size))
15(in-package :ukkoclot/tg-types/photo-size)
16
17(define-tg-type photo-size
18 (file-id string)
19 (file-unique-id string)
20 (width integer)
21 (height integer)
22 (file-size (or integer null) nil))