onMessage method

void onMessage(
  1. dynamic callback(
    1. Message message
    )
)

callback will be called when the MESSAGE_CREATE event has been recieved

Implementation

void onMessage(Function(Message message) callback) => _onMessage = callback;