Difference between revisions of "Bot Playground/Events/region restart cancelled"

From SmartBots Developers Docs
Jump to: navigation, search
(Created page with "{{DISPLAYTITLE:region_restart_cancelled}} <onlyinclude>Fires when bot receives a region restart cancellation notification.</onlyinclude> <syntaxhighlight lang="javascript"> B...")
 
Line 24: Line 24:
 
});
 
});
 
</syntaxhighlight>
 
</syntaxhighlight>
 +
 +
Also see [[Bot_Playground/Examples/Region_restart|complex region restart script]].
  
 
{{NavMenu}}
 
{{NavMenu}}

Revision as of 18:06, 6 October 2022

Fires when bot receives a region restart cancellation notification.

Bot.on("region_restart_cancelled", function(event) { ... });

Reference

This event comes with the following event object:

Variable Required Description
event object properties:
name The name of the event in this case region_restart_cancelled
bot_uuid The UUID of the bot which receives the notification.
message The message of the region_restart_cancelled
region_name The name of the region.

Example

console.log(`${process.name} started`);

Bot.on("region_restart_cancelled", (event) => {
    console.log(`Region restart cancelled:`, event);
});

Also see complex region restart script.