Add logging
This commit is contained in:
parent
274a09390a
commit
ed167eb37c
5
bot.own
5
bot.own
@ -1,4 +1,4 @@
|
||||
use std, functional, types, regex
|
||||
use std, functional, types, regex, date
|
||||
|
||||
include "own-modules/telegram-bot/TelegramBot.own"
|
||||
include "config.own"
|
||||
@ -44,7 +44,8 @@ def processUpdate(update) {
|
||||
|
||||
def processPost(id, chatId, msgId) {
|
||||
post = api.getPost(id)
|
||||
println "Got post: " + post
|
||||
url = "https://danbooru.donmai.us/posts/" + id
|
||||
println "%s: %s".sprintf(newDate(), url)
|
||||
if !post.isImage() return 0
|
||||
blacklistTags = config.danbooru.blacklistTags
|
||||
if post.containsTags(blacklistTags) return 0
|
||||
|
Loading…
Reference in New Issue
Block a user