You're seeing just the callback handle_event, go back to Nostrum.Consumer module for more information.


handle_event(event()) :: any()

Callback used to handle events.


event is a tuple describing the event. The tuple will include information in the following format:

{event_name, {event_payload(s)}, WSState.t}

For example, a message create will look like this

{:MESSAGE_CREATE, {Nostrum.Struct.Message.t}, WSState.t}

In some cases there will be multiple payloads when something is updated, so as to include the new and the old versions. In the event of there being two payloads, the old payload will always be first, followed by the new payload.

{:USER_UPDATE, {old_user :: Nostrum.Struct.User.t, new_user :: Nostrum.Struct.User.t}, WSState.t()}

For a full listing of events, please see Nostrum.Consumer.event/0.