Skip to main content

$dialer.hangUp

This method makes the bot end the call.

Syntax

The method is called without arguments or with one string argument:

$dialer.hangUp();
$dialer.hangUp("The bot hung up the phone");
tip
When the string is passed, calling the method in a text channel causes it to be sent as a message from the bot.

Usage details

When the call is ended by the bot, a botHangup event is triggered in the script:

state: Goodbye
a: Thank you for your time! Take care!
script:
$dialer.hangUp();

state: BotHangUp
event: botHangup
script:
log("Call ended by bot");
caution
If the client ends the call, a hangup event is triggered instead:
state: ClientHangUp
event!: hangup
script:
log("Call ended by client");