Improve logging
This commit is contained in:
parent
587a68898a
commit
dfe485d2c6
5
bot.own
5
bot.own
@ -10,9 +10,8 @@ api = new DanbooruApi(config.danbooru.auth)
|
||||
|
||||
lastUpdateId = -1
|
||||
while true {
|
||||
sleep(6200)
|
||||
sleep(1200)
|
||||
updates = bot.getUpdatesSync(lastUpdateId + 1, 50, 58)
|
||||
println updates
|
||||
if (updates.isEmpty()) continue
|
||||
|
||||
for update : updates {
|
||||
@ -43,7 +42,7 @@ def processUpdate(update) {
|
||||
def processPost(id, chatId, msgId, from) {
|
||||
post = api.getPost(id)
|
||||
url = "https://danbooru.donmai.us/posts/" + id
|
||||
println "%s: %s".sprintf(newDate(), url)
|
||||
println "%s: %s (%d %d)".sprintf(newDate(), url, chatId, msgId)
|
||||
if !post.isImage() return 0
|
||||
blacklistTags = config.danbooru.blacklistTags
|
||||
if post.containsTags(blacklistTags) return 0
|
||||
|
Loading…
Reference in New Issue
Block a user