$awaitedCommand

Triggered when an awaited command gets initiated.

$awaitedCommand[] is a callback, which means it’s used in the command trigger (not the code). The command is ran when an awaited command gets initiated.

Syntax

$awaitedCommand[Name;(Filter)]

Parameters

  • Name (Type: String || Flag: Required): The name used in the $awaitFunc[] function.
  • Filter (Type: String || Flag: Optional): It is used to limit the user input.

Supported filters

  • <numeric> - Accepts only number input.
  • <word1/word2> - Accepts only specified words provided inside <>. Use / as a separator for multiple words.

Example

Without filter

Trigger: $awaitedCommand[say;]

$nomention
$message
!say What do you want me to say? I love BDFD! I love BDFD!

With choose filter

Trigger: $awaitedCommand[odd;<yes/no/cancel>]

$nomention
$if[$message==yes]
   Your answer is correct!
$elseif[$message==no]
   Your answer is incorrect!
$elseif[$message==cancel]
   Command cancelled!
$endif
!odd Is "19" an odd number? yes Your answer is correct! !odd Is "19" an odd number? no Your answer is incorrect! !odd Is "19" an odd number? cancel Command cancelled!

With numeric filter

Trigger: $awaitedCommand[odd;<numeric>]

$nomention
You have provided a number: $message
!number Provide a number! 7 You have provided a number: 7

For more info, see the Awaited Commands Guide.