semaphore.Job

class semaphore.Job(handler: Callable, context: ChatContext, repeat: bool = False, monthly: bool = False, interval: int | None = None)[source]

Bases: object

This object represents a bot job.

get_interval() int[source]

Get the interval of the (repeating) job.

get_message() Message[source]

Get the message of this job.

is_repeating() bool[source]

Check if the job is repeating.

remove() bool[source]

Check if job should be removed.

async run() Reply | None[source]

Run the job by calling the handler.

schedule_removal() None[source]

Schedule the job for removal from the job queue.