Class: ChannelAction

HungryGames~ ChannelAction


new ChannelAction(handler [, delay])

Action to perform on the channel where the game is taking place.
Parameters:
Name Type Argument Default Description
handler HungryGames~Action~ChannelActionHandler Handler to override.
delay number <optional>
0 Delay calling the handler by this many milliseconds after triggered.
Source:

Extends

Members


<private, constant> _handler :HungryGames~Action~ActionHandler

Passed handler to fire once triggered.
Type:
Inherited From:
Overrides:
Source:

<private> _saveData :object

Data injected into save file that the `create` function uses to restore data. Must be serializable.
Type:
  • object
Inherited From:
Overrides:
Default Value:
  • {}
Source:

delay :number

Delay handler call by this many milliseconds after triggered.
Type:
  • number
Inherited From:
Overrides:
Default Value:
  • 0
Source:

id :string

The unique ID for this action. Probably globally unique, definitely unique per-trigger in a guild.
Type:
  • string
Inherited From:
Overrides:
Source:

serializable

Convert this object to serializable format for saving to file. Injects data from `this._saveData`.
Inherited From:
Overrides:
Source:

Methods


trigger(hg, game [, args])

Trigger the action to be performed.
Parameters:
Name Type Argument Description
hg HungryGames HG context.
game HungryGames~GuildGame Game context.
args * <optional>
<repeatable>
Additional arguments to pass.
Inherited From:
Overrides:
Source: