Skip to content

40ants/bots

Repository files navigation

40ants-bots - Framework for build products around chat bots. Includes bot DSL and admin interface for interacting with bot users.

40ANTS-BOTS ASDF System Details

Installation

You can install this library from Quicklisp, but you want to receive updates quickly, then install it from Ultralisp.org:

(ql-dist:install-dist "http://dist.ultralisp.org/"
                      :prompt nil)
(ql:quickload :40ants-bots)

Usage

TODO: Write a library description. Put some examples here.

API

40ANTS-BOTS

package 40ants-bots

Classes

HELLO

class 40ants-bots:hello ()

Example class.

Readers

reader 40ants-bots:user-name (hello) (:name)

Generics

generic-function 40ants-bots:say obj

Say what should be said.

Functions

function 40ants-bots:make-hello name

Makes hello world example

40ANTS-BOTS/API

package 40ants-bots/api

Functions

function 40ants-bots/api:send-message chat-or-user text &rest rest &key business-connection-id message-thread-id parse-mode entities link-preview-options disable-notification protect-content allow-paid-broadcast message-effect-id reply-parameters reply-markup

40ANTS-BOTS/BOT

package 40ants-bots/bot

Classes

BOT

class 40ants-bots/bot:bot ()

40ANTS-BOTS/CONTROLLERS/BOT

package 40ants-bots/controllers/bot

Functions

function 40ants-bots/controllers/bot:get-current-bot

Возвращает инстанс текущего бота из переменной current-bot.

40ANTS-BOTS/CONTROLLERS/CHAT

package 40ants-bots/controllers/chat

Functions

function 40ants-bots/controllers/chat:create-chat platform platform-id &key (type :chat) raw

Создает новый чат в базе данных.

function 40ants-bots/controllers/chat:get-chat-by-id id

Возвращает чат по его ID.

function 40ants-bots/controllers/chat:get-chat-by-platform-id platform platform-id &optional (type :chat)

Находит чат по platform, platform-id и type.

function 40ants-bots/controllers/chat:get-chat-title chat

function 40ants-bots/controllers/chat:get-current-chat

Возвращает текущий активный чат из переменной current-chat.

function 40ants-bots/controllers/chat:get-or-create-chat platform platform-id &key (type :chat) raw

Находит или создает чат по platform, platform-id и type.

function 40ants-bots/controllers/chat:get-private-chat user

function 40ants-bots/controllers/chat:list-chats &key (limit 100) (offset 0)

Возвращает список чатов с пагинацией.

40ANTS-BOTS/CONTROLLERS/MESSAGE

package 40ants-bots/controllers/message

Functions

function 40ants-bots/controllers/message:create-message platform platform-id chat user text &key raw (incomingp nil)

Создает новое сообщение в базе данных.

function 40ants-bots/controllers/message:get-message id

Возвращает сообщение по его ID.

function 40ants-bots/controllers/message:list-messages &key (limit 100) (offset 0)

Возвращает список сообщений с пагинацией.

40ANTS-BOTS/CONTROLLERS/PAYMENT

package 40ants-bots/controllers/payment

Functions

function 40ants-bots/controllers/payment:create-payment platform chat user currency &key amount raw extra-info

Creates new payment.

function 40ants-bots/controllers/payment:get-payment-by-id id

Returns payment by ID.

function 40ants-bots/controllers/payment:move-payment-to-paid payment &key amount raw

40ANTS-BOTS/CONTROLLERS/USER

package 40ants-bots/controllers/user

Functions

function 40ants-bots/controllers/user:create-user platform platform-id username raw

function 40ants-bots/controllers/user:get-current-user

function 40ants-bots/controllers/user:get-or-create-user platform platform-id username raw

function 40ants-bots/controllers/user:get-user platform platform-id

40ANTS-BOTS/DB/UTILS

package 40ants-bots/db/utils

Functions

function 40ants-bots/db/utils:hash-from-db value

function 40ants-bots/db/utils:hash-to-db value

function 40ants-bots/db/utils:keyword-from-db value

function 40ants-bots/db/utils:keyword-to-db value

40ANTS-BOTS/GENERICS

package 40ants-bots/generics

Generics

generic-function 40ants-bots/generics:on-success-payment bot payment

Called when platform sends an approve of successful payment.

First argument will be a platform dependent bot instance, the second instance will be a mito dao object of 40ANTS-BOTS/MODELS/PAYMENT:PAYMENT type.

The end user must define a method to process successul payments.

40ANTS-BOTS/MODELS/CHAT

package 40ants-bots/models/chat

Classes

CHAT

class 40ants-bots/models/chat:chat (serial-pk-mixin dao-class record-timestamps-mixin)

Readers

reader 40ants-bots/models/chat:chat-platform (chat) (:platform)

reader 40ants-bots/models/chat:chat-platform-id (chat) (:platform-id)

reader 40ants-bots/models/chat:chat-raw (chat) (:raw)

reader 40ants-bots/models/chat:chat-type (chat) (:type = :chat)

Accessors

accessor 40ants-bots/models/chat:chat-platform (chat) (:platform)

accessor 40ants-bots/models/chat:chat-platform-id (chat) (:platform-id)

accessor 40ants-bots/models/chat:chat-raw (chat) (:raw)

accessor 40ants-bots/models/chat:chat-type (chat) (:type = :chat)

40ANTS-BOTS/MODELS/FEEDBACK

package 40ants-bots/models/feedback

Classes

FEEDBACK

class 40ants-bots/models/feedback:feedback (serial-pk-mixin dao-class record-timestamps-mixin)

Readers

[reader] 40ants-bots/models/feedback:feedback-message (feedback) (:message)

[reader] 40ants-bots/models/feedback:feedback-message-id (feedback) (:message-id)

Accessors

[accessor] 40ants-bots/models/feedback:feedback-message (feedback) (:message)

[accessor] 40ants-bots/models/feedback:feedback-message-id (feedback) (:message-id)

40ANTS-BOTS/MODELS/MESSAGE

package 40ants-bots/models/message

Classes

MESSAGE

class 40ants-bots/models/message:message (serial-pk-mixin dao-class record-timestamps-mixin)

Readers

reader 40ants-bots/models/message:message-chat (message) (:chat)

reader 40ants-bots/models/message:message-chat-id (message) (:chat-id)

reader 40ants-bots/models/message:message-incoming (message) (:incoming :incomingp)

reader 40ants-bots/models/message:message-platform (message) (:platform)

reader 40ants-bots/models/message:message-platform-id (message) (:platform-id)

reader 40ants-bots/models/message:message-raw (message) (:raw)

reader 40ants-bots/models/message:message-text (message) (:text)

reader 40ants-bots/models/message:message-user (message) (:user)

reader 40ants-bots/models/message:message-user-id (message) (:user-id)

Accessors

accessor 40ants-bots/models/message:message-chat (message) (:chat)

accessor 40ants-bots/models/message:message-chat-id (message) (:chat-id)

accessor 40ants-bots/models/message:message-incoming (message) (:incoming :incomingp)

accessor 40ants-bots/models/message:message-platform (message) (:platform)

accessor 40ants-bots/models/message:message-platform-id (message) (:platform-id)

accessor 40ants-bots/models/message:message-raw (message) (:raw)

accessor 40ants-bots/models/message:message-text (message) (:text)

accessor 40ants-bots/models/message:message-user (message) (:user)

accessor 40ants-bots/models/message:message-user-id (message) (:user-id)

40ANTS-BOTS/MODELS/PAYMENT

package 40ants-bots/models/payment

Classes

PAYMENT

class 40ants-bots/models/payment:payment (serial-pk-mixin dao-class record-timestamps-mixin)

Readers

reader 40ants-bots/models/payment:payment-amount (payment) (:amount)

[reader] 40ants-bots/models/payment:payment-chat (payment) (:chat)

[reader] 40ants-bots/models/payment:payment-chat-id (payment) (:chat-id)

reader 40ants-bots/models/payment:payment-currency (payment) (:currency)

reader 40ants-bots/models/payment:payment-extra-info (payment) (:extra-info)

reader 40ants-bots/models/payment:payment-platform (payment) (:platform)

reader 40ants-bots/models/payment:payment-raw (payment) (:raw)

reader 40ants-bots/models/payment:payment-state (payment) (:state)

[reader] 40ants-bots/models/payment:payment-user (payment) (:user)

[reader] 40ants-bots/models/payment:payment-user-id (payment) (:user-id)

Accessors

accessor 40ants-bots/models/payment:payment-amount (payment) (:amount)

[accessor] 40ants-bots/models/payment:payment-chat (payment) (:chat)

[accessor] 40ants-bots/models/payment:payment-chat-id (payment) (:chat-id)

accessor 40ants-bots/models/payment:payment-currency (payment) (:currency)

accessor 40ants-bots/models/payment:payment-extra-info (payment) (:extra-info)

accessor 40ants-bots/models/payment:payment-platform (payment) (:platform)

accessor 40ants-bots/models/payment:payment-raw (payment) (:raw)

accessor 40ants-bots/models/payment:payment-state (payment) (:state)

[accessor] 40ants-bots/models/payment:payment-user (payment) (:user)

[accessor] 40ants-bots/models/payment:payment-user-id (payment) (:user-id)

40ANTS-BOTS/MODELS/USER

package 40ants-bots/models/user

Classes

USER

class 40ants-bots/models/user:user (serial-pk-mixin dao-class record-timestamps-mixin)

Readers

reader 40ants-bots/models/user:user-platform (user) (:platform)

reader 40ants-bots/models/user:user-platform-id (user) (:platform-id)

reader 40ants-bots/models/user:user-raw (user) (:raw)

reader 40ants-bots/models/user:user-username (user) (:username)

Accessors

accessor 40ants-bots/models/user:user-platform (user) (:platform)

accessor 40ants-bots/models/user:user-platform-id (user) (:platform-id)

accessor 40ants-bots/models/user:user-raw (user) (:raw)

accessor 40ants-bots/models/user:user-username (user) (:username)

40ANTS-BOTS/TELEGRAM/FEEDBACK

package 40ants-bots/telegram/feedback

Functions

[function] 40ants-bots/telegram/feedback:request-feedback prompt thank-you-message &key back-to-id

40ANTS-BOTS/TELEGRAM/PAYMENT

package 40ants-bots/telegram/payment

Functions

function 40ants-bots/telegram/payment:send-invoice title description provider-token currency prices &key commands extra-info

[generated by 40ANTS-DOC]

About

40Ants-bots is a code-first bot framework and admin panel, written in Common Lisp

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •