From 116c700741c7d43b68a926ac8a4acc2672d66e26 Mon Sep 17 00:00:00 2001 From: Uko Kokņevičs Date: Sun, 12 Oct 2025 22:19:41 +0300 Subject: Introduce chat-type enum --- src/tg-types/chat-type.lisp | 12 ++++++++++++ src/tg-types/chat.lisp | 4 ++-- 2 files changed, 14 insertions(+), 2 deletions(-) create mode 100644 src/tg-types/chat-type.lisp (limited to 'src/tg-types') diff --git a/src/tg-types/chat-type.lisp b/src/tg-types/chat-type.lisp new file mode 100644 index 0000000..dc9147a --- /dev/null +++ b/src/tg-types/chat-type.lisp @@ -0,0 +1,12 @@ +;; SPDX-License-Identifier: EUPL-1.2 +;; SPDX-FileCopyrightText: 2025 Uko Kokņevičs +(defpackage :ukkoclot/tg-types/chat-type + (:use :c2cl :ukkoclot/enum) + (:export :channel :chat-type :group :private :supergroup)) +(in-package :ukkoclot/tg-types/chat-type) + +(define-enum chat-type + (private "private") + (group "group") + (supergroup "supergroup") + (channel "channel")) diff --git a/src/tg-types/chat.lisp b/src/tg-types/chat.lisp index 3ad42ef..d4af5a1 100644 --- a/src/tg-types/chat.lisp +++ b/src/tg-types/chat.lisp @@ -1,7 +1,7 @@ ;; SPDX-License-Identifier: EUPL-1.2 ;; SPDX-FileCopyrightText: 2025 Uko Kokņevičs (defpackage :ukkoclot/tg-types/chat - (:use :c2cl :ukkoclot/tg-types/macros) + (:use :c2cl :ukkoclot/tg-types/chat-type :ukkoclot/tg-types/macros) (:export #:chat #:make-chat @@ -19,7 +19,7 @@ (define-tg-type chat (id integer) - (type string nil) ;TODO: member of keywords + (type chat-type) (title (or string null) nil) (username (or string null) nil) (first-name (or string null) nil) -- cgit v1.2.3