peyk.dispatcher.polling

Functions

make_poller(bot, timeout, allowed_updates)

Performs the make poller operation for the dispatcher client.

prepare_polling(bot, *, skip_updates)

Clear supported webhooks before polling when requested.

Classes

BalePoller(bot, timeout, allowed_updates)

BalePoller provides the dispatcher API surface used by peyk.

Poller(*args, **kwargs)

Fetch raw updates while owning the platform-specific offset.

RubikaPoller(bot, timeout, allowed_updates)

RubikaPoller provides the dispatcher API surface used by peyk.

TelegramPoller(bot, timeout, allowed_updates)

TelegramPoller provides the dispatcher API surface used by peyk.

class peyk.dispatcher.polling.BalePoller(bot: Bot[object], timeout: int, allowed_updates: Sequence[str] | None)[source]

Bases: object

BalePoller provides the dispatcher API surface used by peyk.

async fetch() Sequence[Update][source]

Performs the fetch operation for the dispatcher client.

Returns:

Result produced by the dispatcher operation.

class peyk.dispatcher.polling.Poller(*args, **kwargs)[source]

Bases: Protocol[RawT]

Fetch raw updates while owning the platform-specific offset.

async fetch() Sequence[RawT][source]

Performs the fetch operation for the dispatcher client.

Returns:

Result produced by the dispatcher operation.

class peyk.dispatcher.polling.RubikaPoller(bot: Bot[object], timeout: int, allowed_updates: Sequence[str] | None)[source]

Bases: object

RubikaPoller provides the dispatcher API surface used by peyk.

async fetch() Sequence[Update][source]

Performs the fetch operation for the dispatcher client.

Returns:

Result produced by the dispatcher operation.

class peyk.dispatcher.polling.TelegramPoller(bot: Bot[object], timeout: int, allowed_updates: Sequence[str] | None)[source]

Bases: object

TelegramPoller provides the dispatcher API surface used by peyk.

async fetch() Sequence[Update][source]

Performs the fetch operation for the dispatcher client.

Returns:

Result produced by the dispatcher operation.

peyk.dispatcher.polling.make_poller(bot: Bot[object], timeout: int, allowed_updates: Sequence[str] | None) Poller[object][source]

Performs the make poller operation for the dispatcher client.

Parameters:
  • bot – Value used by this operation.

  • timeout – Maximum time to wait for the operation.

  • allowed_updates – Value used by this operation.

Returns:

Result produced by the dispatcher operation.

async peyk.dispatcher.polling.prepare_polling(bot: Bot[object], *, skip_updates: bool) None[source]

Clear supported webhooks before polling when requested.

Rubika’s endpoint-update parameters are intentionally not touched: the project decisions mark their semantics as low-confidence.