summaryrefslogtreecommitdiff
path: root/src/tg-types
diff options
context:
space:
mode:
authorGravatar Uko Kokņevičs2025-10-12 22:42:41 +0300
committerGravatar Uko Kokņevičs2025-10-12 22:42:41 +0300
commit542f074a6929ec12b8b42e4cf16ff74523e04602 (patch)
tree938b88157954a873fc602f682514b0ba7ea104af /src/tg-types
parentFix enum jsonification (diff)
downloadukkoclot-542f074a6929ec12b8b42e4cf16ff74523e04602.tar.gz
ukkoclot-542f074a6929ec12b8b42e4cf16ff74523e04602.tar.xz
ukkoclot-542f074a6929ec12b8b42e4cf16ff74523e04602.zip
Add message-entity-type enum
Diffstat (limited to 'src/tg-types')
-rw-r--r--src/tg-types/message-entity-type.lisp47
-rw-r--r--src/tg-types/message-entity.lisp4
2 files changed, 49 insertions, 2 deletions
diff --git a/src/tg-types/message-entity-type.lisp b/src/tg-types/message-entity-type.lisp
new file mode 100644
index 0000000..f34c44a
--- /dev/null
+++ b/src/tg-types/message-entity-type.lisp
@@ -0,0 +1,47 @@
1;; SPDX-License-Identifier: EUPL-1.2
2;; SPDX-FileCopyrightText: 2025 Uko Kokņevičs <perkontevs@gmail.com>
3(defpackage :ukkoclot/tg-types/message-entity-type
4 (:use :c2cl :ukkoclot/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/tg-types/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-types/message-entity.lisp b/src/tg-types/message-entity.lisp
index a605f23..1eb96cb 100644
--- a/src/tg-types/message-entity.lisp
+++ b/src/tg-types/message-entity.lisp
@@ -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(defpackage :ukkoclot/tg-types/message-entity 3(defpackage :ukkoclot/tg-types/message-entity
4 (:use :c2cl :iterate :ukkoclot/tg-types/macros :ukkoclot/tg-types/user) 4 (:use :c2cl :iterate :ukkoclot/tg-types/macros :ukkoclot/tg-types/message-entity-type :ukkoclot/tg-types/user)
5 (:export 5 (:export
6 #:message-entity 6 #:message-entity
7 #:make-message-entity 7 #:make-message-entity
@@ -19,7 +19,7 @@
19(in-package :ukkoclot/tg-types/message-entity) 19(in-package :ukkoclot/tg-types/message-entity)
20 20
21(define-tg-type message-entity 21(define-tg-type message-entity
22 (type string nil) ;TODO: keywords 22 (type message-entity-type)
23 (offset integer) 23 (offset integer)
24 (length integer) 24 (length integer)
25 (url (or string null) nil) 25 (url (or string null) nil)