wa_me package

Subpackages

Submodules

wa_me.bot module

class wa_me.bot.Bot(**kwargs)[source]

Bases: Client

Represents a Whatsapp bot.

after_event(ctx: Ctx) None[source]
after_event_message(ctx: Ctx) None[source]
after_event_status(ctx: Ctx) None[source]
before_event(ctx: Ctx) None[source]
before_event_message(ctx: Ctx) None[source]
before_event_status(ctx: Ctx) None[source]
handle(data: ~typing.Dict[str, ~typing.Any], *, cls_ctx: ~typing.Type[~wa_me.context.Ctx] = <class 'wa_me.context.Ctx'>) None[source]
on_event_error(ctx: Ctx) None[source]
on_event_message_audio(ctx: Ctx) None[source]
on_event_message_button(ctx: Ctx) None[source]
on_event_message_contacts(ctx: Ctx) None[source]
on_event_message_context(ctx: Ctx) None[source]
on_event_message_document(ctx: Ctx) None[source]
on_event_message_error(ctx: Ctx) None[source]
on_event_message_image(ctx: Ctx) None[source]
on_event_message_interactive(ctx: Ctx) None[source]
on_event_message_location(ctx: Ctx) None[source]
on_event_message_order(ctx: Ctx) None[source]
on_event_message_reaction(ctx: Ctx) None[source]
on_event_message_referral(ctx: Ctx) None[source]
on_event_message_sticker(ctx: Ctx) None[source]
on_event_message_system(ctx: Ctx) None[source]
on_event_message_template(ctx: Ctx) None[source]
on_event_message_text(ctx: Ctx) None[source]
on_event_message_unknown(ctx: Ctx) None[source]
on_event_message_video(ctx: Ctx) None[source]
on_event_status_deleted(ctx: Ctx) None[source]
on_event_status_delivered(ctx: Ctx) None[source]
on_event_status_error(ctx: Ctx) None[source]
on_event_status_failed(ctx: Ctx) None[source]
on_event_status_read(ctx: Ctx) None[source]
on_event_status_sent(ctx: Ctx) None[source]
on_exception(ctx: Ctx, e: Exception) None[source]

The default error handler provided by the handler.

wa_me.context module

class wa_me.context.Ctx(client: Client, data: Dict[str, Any])[source]

Bases: object

property client: Client
property datetime: Optional[datetime]
property error: Optional[Error]
property event: Event
media() Optional[bytes][source]
media_url() Optional[str][source]
property message: Optional[Message]
property phone_id: str
react(emoji: str) Optional[Response][source]
property reactions: List[str]
read() bool[source]
property readed: bool
property received_at: Optional[float]
property recipient_id: Optional[str]
property recipient_name: Optional[str]
property replies: List[Message]
property replies_ids: List[str]
send(message: Message, *, mention: bool = False) Response[source]
send_audio(audio_id: Optional[str] = None, audio_url: Optional[str] = None, *, mention: bool = False) Optional[Response][source]
send_contacts(contacts_data: List[Dict[str, Any]], *, mention: bool = False) Optional[Response][source]
send_document(document_id: Optional[str] = None, document_url: Optional[str] = None, *, caption: Optional[str] = None, filename: Optional[str] = None, mention: bool = False) Optional[Response][source]
send_image(image_url: Optional[str] = None, image_id: Optional[str] = None, *, caption: Optional[str] = None, mention: bool = False) Optional[Response][source]
send_interactive(*, interactive_data: Dict[str, Any], mention: bool = False) Optional[Response][source]
send_location(latitude: float, longitude: float, *, name: Optional[str] = None, address: Optional[str] = None, mention: bool = False) Optional[Response][source]
send_message(message: Message) Response[source]
send_options(text: str, options: List[Dict[str, Any]], *, button: str, title: str, header_text: Optional[str] = None, footer_text: Optional[str] = None, mention: bool = False) Optional[Response][source]
send_quick_replies(text: str, quick_replies: List[Dict[str, Any]], *, mention: bool = False) Optional[Response][source]
send_sticker(sticker_id: Optional[str] = None, sticker_url: Optional[str] = None, *, mention: bool = False) Optional[Response][source]
send_text(content: str, *, mention: bool = False) Optional[Response][source]
send_video(video_id: Optional[str] = None, video_url: Optional[str] = None, *, caption: Optional[str] = None, mention: bool = False) Optional[Response][source]
property status: Optional[Status]
property timestamp: Optional[int]
unreact() Optional[Response][source]

Module contents