quick fix
This commit is contained in:
parent
61ac44f1ee
commit
b257d684b6
|
@ -723,7 +723,10 @@ def bots():
|
||||||
log(False, f"[NEW_POST] id{event.object.id}")
|
log(False, f"[NEW_POST] id{event.object.id}")
|
||||||
users = db.get_all_users()
|
users = db.get_all_users()
|
||||||
for i in users:
|
for i in users:
|
||||||
bot[int(i['chat_id'])].event("post", event.object)
|
if (config.use_database):
|
||||||
|
bot[int(i['chat_id'])].event("post", event.object)
|
||||||
|
else:
|
||||||
|
bot[int(i)].event("post", event.object)
|
||||||
elif event.type == VkBotEventType.MESSAGE_DENY:
|
elif event.type == VkBotEventType.MESSAGE_DENY:
|
||||||
log(False, f"User {event.object.user_id} deny messages from that group")
|
log(False, f"User {event.object.user_id} deny messages from that group")
|
||||||
del bot[int(event.object.user_id)]
|
del bot[int(event.object.user_id)]
|
||||||
|
@ -742,7 +745,10 @@ def midnight():
|
||||||
log(False, "[EVENT_STARTED] \"Midnight\"")
|
log(False, "[EVENT_STARTED] \"Midnight\"")
|
||||||
users = db.get_all_users()
|
users = db.get_all_users()
|
||||||
for i in users:
|
for i in users:
|
||||||
bot[int(i['chat_id'])].event("midnight")
|
if (config.use_database):
|
||||||
|
bot[int(i['chat_id'])].event("midnight")
|
||||||
|
else:
|
||||||
|
bot[int(i)].event("midnight")
|
||||||
log(False, "[EVENT_ENDED] \"Midnight\"")
|
log(False, "[EVENT_ENDED] \"Midnight\"")
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue