Client class

Represents a Discord Client, usually a bot user

Constructors

Client([int apiVersion = 10])
When apiVersion is specified, the api will use a different version

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

login(String token) → void
Authenticates the Client at the discord gateway and listens for any event
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onChannelCreate(dynamic callback(Channel channel)) → void
callback will be called when the CHANNEL_CREATE event has been recieved
onChannelDelete(dynamic callback(Channel channel)) → void
callback will be called when the CHANNEL_DELETE event has been recieved
onChannelUpdate(dynamic callback(Channel channel)) → void
callback will be called when the CHANNEL_UPDATE event has been recieved
onMessage(dynamic callback(Message message)) → void
callback will be called when the MESSAGE_CREATE event has been recieved
onMessageDelete(dynamic callback(Message message)) → void
callback will be called when the MESSAGE_DELETE event has been recieved
onMessageUpdate(dynamic callback(Message message)) → void
callback will be called when the MESSAGE_UPDATE event has been recieved
onReady(dynamic callback(User user)) → void
callback will be called when the READY event has been recieved.
quit() → void
Closes the discord gateway websocket
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited