symphony.bdk.core.activity.help_command.HelpCommand#

class symphony.bdk.core.activity.help_command.HelpCommand(bdk: symphony.bdk.core.symphony_bdk.SymphonyBdk)#

Bases: symphony.bdk.core.activity.command.SlashCommandActivity

The help command is a particular CommandActivity which returns the list of all commands available for the specific bot The Slash command is triggered if we receive a MESSAGESENT event with message text:

  • “@{bot_display name} /help”

__init__(bdk: symphony.bdk.core.symphony_bdk.SymphonyBdk)#
Parameters
  • name – the command name

  • requires_mention_bot – if the command requires the bot mention to trigger the slash command

  • callback – the coroutine to be executed if message text matches

Methods

__init__(bdk)

param name

the command name

before_matcher(context)

This callback can be used to prepare ActivityContext before actually processing the matches method.

build_command_description()

matches(context)

Matches the ActivityContext to decide whether an AbstractActivity can be executed or not.

on_activity(context)

Contains the activity business logic.

Attributes

bot_user_id

name

before_matcher(context: symphony.bdk.core.activity.api.C)#

This callback can be used to prepare ActivityContext before actually processing the matches method.

Parameters

context – an instance of ActivityContext

matches(context: symphony.bdk.core.activity.command.CommandContext) bool#

Matches the ActivityContext to decide whether an AbstractActivity can be executed or not.

Parameters

context – an instance of ActivityContext

Returns

True if activity has to be triggered, False otherwise.

async on_activity(context: symphony.bdk.core.activity.command.CommandContext)#

Contains the activity business logic. Executed only if the matches method returned a true value.

Parameters

context – an instance of ActivityContext