vkpore.events module¶
Module with possible events and classes/functions related to that.
-
class
vkpore.events.Event(name: str, group_id: int, source: Dict[KT, VT])[source]¶ Bases:
abc.ABCBase class for possible events.
-
group_id¶ Event’s group id.
-
initialize(app, callbacks: List[Callable[[Event], Awaitable[T_co]]])[source]¶ Set app amd callbacks that will process this event.
-
name¶ Event’s internal name (like “vk:<event’s name>”)
-
source¶ Raw object of event.
-
-
class
vkpore.events.EventRaw(group_id, source: Dict[KT, VT])[source]¶ Bases:
vkpore.events.EventRaw event from vkontakte. Used for passing unknown events.
-
class
vkpore.events.MessageData(name, group_id, source: Dict[KT, VT])[source]¶ Bases:
vkpore.events.EventClass for storing data about personal message in vkontakte. Documentation: https://vk.com/dev/objects/message
-
action¶ Message action if present
-
attachments¶ Message attachments
-
date¶ Message date in unixtime
-
from_id¶ Message from id
-
fwd_messages¶ Forwarded messages
-
id¶ Message id
-
important¶ Message important flag
-
out¶ Message out flag
-
payload¶ Message payload
-
peer_id¶ Message peer id
-
random_id¶ Message random id
-
reply_message¶ Message reply message if present
-
text¶ Message text if present
-
-
class
vkpore.events.MessageNew(group_id, source: Dict[KT, VT])[source]¶ Bases:
vkpore.events.MessageDataVkontakte “message_new” event.
-
vkpore.events.random() → x in the interval [0, 1).¶