# Cancel

TIP

  • cancel()
  • Cancels an event from happening, this function only works in commands that are ran from an event.

# Example

1: # Command added to the chat event
2: if ('.com' in $args$[1]) {
3:     cancel()
4:     sendMessage($args$[0], 'Please do not advertise')
5: }