Client class
Represents a Discord Client, usually a bot user
Constructors
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 theCHANNEL_CREATE
event has been recieved -
onChannelDelete(
dynamic callback(Channel channel)) → void -
callback
will be called when theCHANNEL_DELETE
event has been recieved -
onChannelUpdate(
dynamic callback(Channel channel)) → void -
callback
will be called when theCHANNEL_UPDATE
event has been recieved -
onMessage(
dynamic callback(Message message)) → void -
callback
will be called when theMESSAGE_CREATE
event has been recieved -
onMessageDelete(
dynamic callback(Message message)) → void -
callback
will be called when theMESSAGE_DELETE
event has been recieved -
onMessageUpdate(
dynamic callback(Message message)) → void -
callback
will be called when theMESSAGE_UPDATE
event has been recieved -
onReady(
dynamic callback(User user)) → void -
callback
will be called when theREADY
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