Match Responses

There are some matched-based responses, which should normally come after a regexp trigger

class MatchResponses

Regexp-based responses. These responses use the regexp match result from the trigger, as well as the given template, to build the response text.

message = <class 'gramhopper.responses.match_responses._MatchMessageResponse'>

A regexp-based message response. See more in _MatchMessageResponse.

reply = <class 'gramhopper.responses.match_responses._MatchReplyResponse'>

A regexp-based reply response. See more in _MatchReplyResponse.

match.message

class _MatchMessageResponse(template: str)

A regexp-based response in which the response method is a normal message

__init__(template: str)

Constructs the response.

Parameters:template – The template to use when building the response text

match.reply

class _MatchReplyResponse(template: str)

A regexp-based response in which the response method is a reply to the triggering message

__init__(template: str)

Constructs the response.

Parameters:template – The template to use when building the response text