ContextEntityExtension extension

Entity text extraction and manipulation methods for Context

on

Methods

getAllCommands() List<String>

Available on Context, provided by the ContextEntityExtension extension

Gets all commands from the message.
getAllEntitiesWithText() Map<MessageEntityType, List<String>>

Available on Context, provided by the ContextEntityExtension extension

Gets all entities with their corresponding text content.
getAllEntityTexts(MessageEntityType type) List<String>

Available on Context, provided by the ContextEntityExtension extension

Extracts text for all entities of the specified type.
getCommand() String?

Available on Context, provided by the ContextEntityExtension extension

Gets the first command from the message (if any).
getEntityText(MessageEntityType type) String?

Available on Context, provided by the ContextEntityExtension extension

Extracts text for entities of the specified type from the current message.
getHashtags() List<String>

Available on Context, provided by the ContextEntityExtension extension

Gets all hashtags from the message.
getMentions() List<String>

Available on Context, provided by the ContextEntityExtension extension

Gets all mentions from the message.
getRawText() String?

Available on Context, provided by the ContextEntityExtension extension

Gets the raw text content without any entity processing.
getUrls() List<String>

Available on Context, provided by the ContextEntityExtension extension

Gets all URLs from the message.
hasEntities() bool

Available on Context, provided by the ContextEntityExtension extension

Checks if the message contains any entities.
hasEntityType(MessageEntityType type) bool

Available on Context, provided by the ContextEntityExtension extension

Checks if the message contains entities of the specified type.