|
@@ -131,7 +131,7 @@
|
|
|
(when (> id *akb-last-id*)
|
|
(when (> id *akb-last-id*)
|
|
|
(send-akb (format-akb post))
|
|
(send-akb (format-akb post))
|
|
|
(setf *akb-last-id* id))))
|
|
(setf *akb-last-id* id))))
|
|
|
- (error (e) (log:error e))))
|
|
|
|
|
|
|
+ (condition (e) (log:error e))))
|
|
|
|
|
|
|
|
(defun send-akb (text)
|
|
(defun send-akb (text)
|
|
|
(log:info "send-akb: ~A" text)
|
|
(log:info "send-akb: ~A" text)
|
|
@@ -139,20 +139,25 @@
|
|
|
(handler-case
|
|
(handler-case
|
|
|
(telegram-send-message chat-id text
|
|
(telegram-send-message chat-id text
|
|
|
:disable-web-preview 1)
|
|
:disable-web-preview 1)
|
|
|
- (error (e) (log:error e)))))
|
|
|
|
|
|
|
+ (condition (e) (log:error e)))))
|
|
|
|
|
|
|
|
(defun handle-cmd-akb (chat-id message-id args)
|
|
(defun handle-cmd-akb (chat-id message-id args)
|
|
|
(log:info "handle-cmd-akb" chat-id message-id args)
|
|
(log:info "handle-cmd-akb" chat-id message-id args)
|
|
|
- (let ((total-aneks
|
|
|
|
|
- (aget "count" (vk-wall-get :domain +akb-vk-domain+ :count 1 :offset 10000000))))
|
|
|
|
|
- (dolist (post (aget "items" (vk-wall-get :domain +akb-vk-domain+
|
|
|
|
|
- :count (or (ignore-errors (parse-integer (car args))) 1)
|
|
|
|
|
- :offset (random total-aneks))))
|
|
|
|
|
- (handler-case
|
|
|
|
|
- (telegram-send-message chat-id
|
|
|
|
|
- (format-akb post)
|
|
|
|
|
- :disable-web-preview 1)
|
|
|
|
|
- (error (e) (log:error e))))))
|
|
|
|
|
|
|
+ (handler-case
|
|
|
|
|
+ (progn
|
|
|
|
|
+ (let ((total-aneks
|
|
|
|
|
+ (aget "count" (vk-wall-get :domain +akb-vk-domain+ :count 1 :offset 10000000))))
|
|
|
|
|
+ (dolist (post (aget "items" (vk-wall-get :domain +akb-vk-domain+
|
|
|
|
|
+ :count (or (ignore-errors (parse-integer (car args))) 1)
|
|
|
|
|
+ :offset (random total-aneks))))
|
|
|
|
|
+ (handler-case
|
|
|
|
|
+ (telegram-send-message chat-id
|
|
|
|
|
+ (format-akb post)
|
|
|
|
|
+ :disable-web-preview 1)
|
|
|
|
|
+ (condition (e) (log:error e))))))
|
|
|
|
|
+ (condition (e)
|
|
|
|
|
+ (log:error e)
|
|
|
|
|
+ (telegram-send-message chat-id "some shit happened"))))
|
|
|
|
|
|
|
|
|
|
|
|
|
(defun handle-cmd-rates (chat-id message-id args)
|
|
(defun handle-cmd-rates (chat-id message-id args)
|