trait Commands extends AnyRef
Commands
Makes a bot command-aware using a nice declarative interface
- Self Type
- Commands with TelegramBot
- Alphabetic
- By Inheritance
- Commands
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
- val cmdAt: String
- val cmdPrefix: String
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def handleUpdate(update: Update): Unit
handleUpdate
handleUpdate
- update
the update to be processed. Parses messages and spawns bot commands accordingly, supports targeting specific bots. Commands and bot names are case INSENSITIVE, additional parameters are NOT. General syntax: /command[@BotUsername]* args* Assuming cmdPrefix = '/' and cmdAt = '@' here are some usage examples: To broadcast 'command' to ALL bots: /command To send 'command' (parameterless) to FooBot ONLY: /command@FooBot To send 'command' with args = ("hello", "world") to FooBot and BarBot: /command@FooBot@BarBot hello world
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def onCommand(command: String)(action: (Long, Seq[String]) => Unit): Unit
on
on
Makes the bot able react to 'command' with the specified handler. 'action' will receive the sender (chatId) and the arguments as parameters.
- def replyTo(chatId: Long, disableWebPagePreview: Option[Boolean] = None, replyToMessageId: Option[Int] = None)(text: String): Future[Message]
replyTo
replyTo
Handy wrapper to send text replies
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated