Discord

Common. Namespace

Discord

Description:
  • Discord Common Interface Implementation

Source:

Methods

(async, static) answerCallback(interaction, response) → {Promise}

Description:
  • Process answer callback

Source:
Parameters:
Name Type Description
interaction Interaction

Discord context

response object

Response object

Returns:
Type
Promise

(static) commonizeInteraction(interaction, definition) → {Common.DiscordInteraction}

Source:
Parameters:
Name Type Description
interaction Interaction
definition Common.CommandDefinition
Returns:
Type
Common.DiscordInteraction

(async, static) handleCallback(interaction, handle)

Description:
  • Callback handler interface

Source:
Parameters:
Name Type Description
interaction Interaction

Discord context

handle Common.CommandHandler

Handler function for callback

(static) handleCommand(interaction, handler, definition)

Description:
  • Command handler interface

Source:
Parameters:
Name Type Description
interaction Interaction

Discord context

handler Common.CommandHandler

Handler function for command

definition Common.CommandDefinition

Command definition

(static) reply(interaction, response, logger)

Description:
  • Command reply interface

Source:
Parameters:
Name Type Description
interaction Interaction

Discord context

response object

Response object

logger

(static) replyWithEmbed(interaction, response, logger)

Description:
  • Reply to command with embeded component

Source:
Parameters:
Name Type Description
interaction Interaction

Discord context

response object

Response object

logger

(static) replyWithFile(interaction, response, logger)

Description:
  • Reply to command with file

Source:
Parameters:
Name Type Description
interaction Interaction

Discord context

response object

Response object

logger

(static) replyWithText(interaction, response, logger)

Description:
  • Reply to command with text message

Source:
Parameters:
Name Type Description
interaction Interaction

Discord context

response object

Response object

logger

(static) transformOverrides(response) → {object}

Description:
  • Transform response object by converting overrides to platfrom specific parameters

Source:
Parameters:
Name Type Description
response object
Returns:

Updated response object

Type
object