Bot<Ctx extends Context<Update>> class

Bot class for creating and running Max bots

Inheritance

Constructors

Bot(String token, {BotConfig<Ctx>? config})

Properties

api Api
final
botInfo BotInfo?
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

action(Triggers triggers, List<Middleware<Ctx>> middlewares) Composer<Ctx>
Handle callback actions
inherited
catch_(void handler(Object error, StackTrace stackTrace, Ctx ctx)) Bot<Ctx>
Set custom error handler
command(Triggers command, List<Middleware<Ctx>> middlewares) Composer<Ctx>
Handle command
inherited
filter(Object filters, List<Middleware<Ctx>> middlewares) MiddlewareFn<Ctx>
Create a filter middleware
inherited
hears(Triggers triggers, List<Middleware<Ctx>> middlewares) Composer<Ctx>
Handle text patterns
inherited
middleware() MiddlewareFn<Ctx>
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
on(Object filters, List<Middleware<Ctx>> middlewares) Composer<Ctx>
Handle specific update types
inherited
start([LaunchOptions? options]) Future<void>
Start the bot
stop() → void
Stop the bot
toString() String
A string representation of this object.
inherited
use(List<Middleware<Ctx>> middlewares) Composer<Ctx>
Use middleware
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited