-
Notifications
You must be signed in to change notification settings - Fork 0
/
vkt_events.py
67 lines (46 loc) · 1.89 KB
/
vkt_events.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
"""Events for the VK Teams Connector."""
from opsdroid import events
class Sticker(events.Event):
"""Event class that triggers when a sticker is sent."""
def __init__(self, file_id, *args, **kwargs):
"""Contain some attributes that you can access.
- ``file_id`` - id of the sticker file
"""
super().__init__(*args, **kwargs)
self.file_id = file_id
class Mention(events.Event):
"""Event class that triggers when a mention is sent."""
def __init__(self, mentioned_user_id, *args, **kwargs):
"""Contain some attributes that you can access.
- ``mentioned_user_id`` - id of the mentioned user
"""
super().__init__(*args, **kwargs)
self.mentioned_user_id = mentioned_user_id
class Voice(events.Event):
"""Event class that triggers when a voice message is sent."""
def __init__(self, file_id, *args, **kwargs):
"""Contain some attributes that you can access.
- ``file_id`` - id of the audio message voice file
"""
super().__init__(*args, **kwargs)
self.file_id = file_id
class VKTFile(events.Event):
"""Event class that triggers when a file is sent."""
def __init__(self, file_id, caption, file_type, *args, **kwargs):
"""Contain some attributes that you can access.
- ``file_id`` - id of the file
- ``caption`` - caption of the file
- ``type`` - image, file
"""
super().__init__(*args, **kwargs)
self.file_id = file_id
self.caption = caption
self.file_type = file_type
class Forward(events.Event):
"""Event class that triggers when a forward is sent."""
def __init__(self, message, *args, **kwargs):
"""Contain some attributes that you can access.
- ``message`` - The Message object
"""
super().__init__(*args, **kwargs)
self.message = message