CommandsClientExtension extension
- on
Methods
-
addCommand(
String command, FutureOr< String?> callback(CommandArgs)) → void -
Add a command to the command handler.
command
is its name, andcallback
is the callback to invoke -
parseAndRunCommand(
Room room, String msg, {Event? inReplyTo, String? editEventId, String? txid, String? threadRootEventId, String? threadLastEventId}) → Future< String?> -
Parse and execute a string,
msg
is the input. OptionallyinReplyTo
is the event being replied to andeditEventId
is the eventId of the event being replied to -
registerDefaultCommands(
) → void - Register all default commands
-
unregisterAllCommands(
) → void - Unregister all commands