Skip to content
This repository has been archived by the owner on Mar 13, 2023. It is now read-only.

Commit

Permalink
year hotfix (#14)
Browse files Browse the repository at this point in the history
* direction fix

* direction fix

* extended year & bot not reacts to admin messages

* extended year & bot not reacts to admin messages
  • Loading branch information
mixx3 authored Nov 8, 2022
1 parent fafa873 commit 72ed705
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion bot/event_scenarios/layout.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@


def process_event(vk: VkApiMethod, event: Event, **kwargs):
if event.type == VkEventType.MESSAGE_NEW and event.from_user:
if event.type == VkEventType.MESSAGE_NEW and event.from_user and not event.from_me:
logger.info(f"processing message from {event.user_id}: {event.text}")
if change_mode(event.text):
utils.send_message(
Expand Down
2 changes: 1 addition & 1 deletion bot/event_scenarios/registry/event_handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def on_mode_change(vk: VkApiMethod) -> None:
).json()
ids = set()
for user in users:
ids.add(int(user["social_web_id"]))
ids.add(int(user.get("social_web_id")))
for user_id in ids:
utils.on_start_message_button(
vk,
Expand Down
2 changes: 2 additions & 0 deletions bot/schemas/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ class Year(str, Enum):
FOURTH = "4"
FIFTH = "1м"
SIXTH = "2м"
FIFTH_SPEC = "5"
SIXTH_SPEC = "6"


class Directions(str, Enum):
Expand Down

0 comments on commit 72ed705

Please sign in to comment.