diff options
| author | 2025-10-13 05:51:01 +0300 | |
|---|---|---|
| committer | 2025-10-13 05:51:01 +0300 | |
| commit | f8db5c3e3c4bb426e76e10993b09debdb84b0b57 (patch) | |
| tree | b79763459752153b2385645a4fabfa25641909ee /src/bot | |
| parent | Move do-call &co to a transport package (diff) | |
| download | ukkoclot-f8db5c3e3c4bb426e76e10993b09debdb84b0b57.tar.gz ukkoclot-f8db5c3e3c4bb426e76e10993b09debdb84b0b57.tar.xz ukkoclot-f8db5c3e3c4bb426e76e10993b09debdb84b0b57.zip | |
Move bot/impl to state
Diffstat (limited to '')
| -rw-r--r-- | src/bot.lisp | 6 | ||||
| -rw-r--r-- | src/bot/advanced.lisp | 3 | ||||
| -rw-r--r-- | src/bot/method-macros.lisp | 2 | ||||
| -rw-r--r-- | src/bot/methods.lisp | 3 | ||||
| -rw-r--r-- | src/state.lisp (renamed from src/bot/impl.lisp) | 19 |
5 files changed, 18 insertions, 15 deletions
diff --git a/src/bot.lisp b/src/bot.lisp deleted file mode 100644 index 78a6ad0..0000000 --- a/src/bot.lisp +++ /dev/null | |||
| @@ -1,6 +0,0 @@ | |||
| 1 | ;; SPDX-License-Identifier: EUPL-1.2 | ||
| 2 | ;; SPDX-FileCopyrightText: 2025 Uko Kokņevičs <perkontevs@gmail.com> | ||
| 3 | (uiop:define-package :ukkoclot/bot | ||
| 4 | (:use) | ||
| 5 | ;; Maybe should somehow hide BOT-USERNAME% and BOT-ID% but whatever | ||
| 6 | (:use-reexport :ukkoclot/bot/advanced :ukkoclot/bot/impl :ukkoclot/bot/methods)) | ||
diff --git a/src/bot/advanced.lisp b/src/bot/advanced.lisp index 635bdb0..c18b574 100644 --- a/src/bot/advanced.lisp +++ b/src/bot/advanced.lisp | |||
| @@ -1,7 +1,8 @@ | |||
| 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/bot/advanced | 3 | (defpackage :ukkoclot/bot/advanced |
| 4 | (:use :c2cl :ukkoclot/bot/impl :ukkoclot/bot/methods :ukkoclot/tg) | 4 | (:use :c2cl :ukkoclot/bot/methods :ukkoclot/tg) |
| 5 | (:import-from :ukkoclot/state :bot-id% :bot-username%) | ||
| 5 | (:export :bot-id :bot-username :reply-animation :reply-message :try-delete-message)) | 6 | (:export :bot-id :bot-username :reply-animation :reply-message :try-delete-message)) |
| 6 | (in-package :ukkoclot/bot/advanced) | 7 | (in-package :ukkoclot/bot/advanced) |
| 7 | 8 | ||
diff --git a/src/bot/method-macros.lisp b/src/bot/method-macros.lisp index b6f237f..0500de9 100644 --- a/src/bot/method-macros.lisp +++ b/src/bot/method-macros.lisp | |||
| @@ -2,7 +2,7 @@ | |||
| 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/bot/method-macros | 3 | (defpackage :ukkoclot/bot/method-macros |
| 4 | (:use :c2cl :iterate) | 4 | (:use :c2cl :iterate) |
| 5 | (:import-from :ukkoclot/bot/impl :bot) | 5 | (:import-from :ukkoclot/state :bot) |
| 6 | (:import-from :ukkoclot/transport :do-call) | 6 | (:import-from :ukkoclot/transport :do-call) |
| 7 | (:export :define-tg-method)) | 7 | (:export :define-tg-method)) |
| 8 | (in-package :ukkoclot/bot/method-macros) | 8 | (in-package :ukkoclot/bot/method-macros) |
diff --git a/src/bot/methods.lisp b/src/bot/methods.lisp index bddb9ff..2daea6f 100644 --- a/src/bot/methods.lisp +++ b/src/bot/methods.lisp | |||
| @@ -1,7 +1,8 @@ | |||
| 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/bot/methods | 3 | (defpackage :ukkoclot/bot/methods |
| 4 | (:use :c2cl :ukkoclot/bot/method-macros :ukkoclot/bot/impl :ukkoclot/tg) | 4 | (:use :c2cl :ukkoclot/bot/method-macros :ukkoclot/tg) |
| 5 | (:import-from :ukkoclot/state :bot-id% :bot-username%) | ||
| 5 | (:export :answer-callback-query :delete-message :send-animation :edit-message-text :get-me :get-updates :send-message :set-my-name)) | 6 | (:export :answer-callback-query :delete-message :send-animation :edit-message-text :get-me :get-updates :send-message :set-my-name)) |
| 6 | (in-package :ukkoclot/bot/methods) | 7 | (in-package :ukkoclot/bot/methods) |
| 7 | 8 | ||
diff --git a/src/bot/impl.lisp b/src/state.lisp index ea1aa03..98e2048 100644 --- a/src/bot/impl.lisp +++ b/src/state.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/bot/impl | 3 | (defpackage :ukkoclot/state |
| 4 | (:use :c2cl :iterate :ukkoclot/config) | 4 | (:use :c2cl :ukkoclot/config) |
| 5 | (:export | 5 | (:export |
| 6 | :bot :bot-p :make-bot | 6 | #:bot |
| 7 | 7 | #:make-bot | |
| 8 | :bot-config :bot-db :bot-base-uri :bot-power-on :bot-username% :bot-id%)) | 8 | #:bot-p |
| 9 | (in-package :ukkoclot/bot/impl) | 9 | #:copy-bot |
| 10 | #:bot-config | ||
| 11 | #:bot-db | ||
| 12 | #:bot-base-uri | ||
| 13 | #:bot-power-on | ||
| 14 | #:bot-username% | ||
| 15 | #:bot-id%)) | ||
| 16 | (in-package :ukkoclot/state) | ||
| 10 | 17 | ||
| 11 | (defstruct (bot (:constructor make-bot%)) | 18 | (defstruct (bot (:constructor make-bot%)) |
| 12 | (config (error "No value given for config") :read-only t) | 19 | (config (error "No value given for config") :read-only t) |