UniverseChatResource class

Constructors

UniverseChatResource(APIHttpClient httpClient, {required String universeChatBaseUrl})
const

Properties

hashCode int
The hash code for this object.
no setterinherited
httpClient → APIHttpClient
finalinherited
isConnected bool
no setter
onMessageSent Stream<UniverseChatMessage>
Receive messages sent by other users
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
universeChatBaseUrl String
final

Methods

connect({String? minecraftUUID, String? token, bool onlyListenMessage = false}) Future<void>
Connect to the Universe Chat server
disconnect() → void
Disconnect from the Universe Chat server
getInfo() Future<UniverseChatInfo>
Get universe chat info (online users, protocolVersion, etc.)
getMessage(String uuid) Future<UniverseChatMessage>
Get message by message uuid
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
replyMessage(String message, {required String uuid, String? nickname}) Future<String>
Reply message by message uuid, and return the replied status.
sendDiscordMessage({required String message, required String username, required String userId, String? avatarUrl, String? nickname, String? replyMessageUUID}) Future<String>
sendMessage(String message, {String? nickname}) Future<String>
Send a message to the server, and return the sent status.
toString() String
A string representation of this object.
inherited

Operators

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