EntityUtility class

Entity Utility is a Utility that lets you create Entities from outside of the nyxx project. Typically used in nyxx.* projects. An example getting a user is below:

void main() {
    var bot = Nyxx("TOKEN");
    RawApiMap rawJson = /* rawJson from the API */
    User user = EntityUtility.createUser(bot, rawJson);
}

Constructors

EntityUtility()

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

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

createCategoryGuildChannel(INyxx client, Snowflake guildId, RawApiMap rawJson) CategoryGuildChannel
Creates a CategoryGuildChannel object, can be used for other classes where you have correct rawJson data from the API.
createDMChannel(INyxx client, RawApiMap rawJson) DMChannel
Creates a Guild object, can be used for other classes where you have correct rawJson data from the API.
createGuild(INyxx client, RawApiMap rawJson, [bool guildCreate = false]) Guild
Creates a Guild object, can be used for other classes where you have correct rawJson data from the API.
createGuildMember(INyxx client, Snowflake guildId, RawApiMap rawJson) Member
Creates a Guild Member object, can be used for other classes where you have correct rawJson data from the API.
createMessage(INyxx client, RawApiMap rawJson) Message
Creates a Guild Member object, can be used for other classes where you have correct rawJson data from the API.
createRole(INyxx client, Snowflake guildId, RawApiMap rawJson) Role
Creates a Role object, can be used for other classes where you have correct rawJson data from the API.
createTextGuildChannel(INyxx client, Snowflake guildId, RawApiMap rawJson) TextGuildChannel
Creates a Guild object, can be used for other classes where you have correct rawJson data from the API.
createUser(INyxx client, RawApiMap rawJson) User
Creates a User object, can be used for other classes where you have correct rawJson data from the API.
createVoiceGuildChannel(INyxx client, Snowflake guildId, RawApiMap rawJson) VoiceGuildChannel
Creates a VoiceGuildChannel object, can be used for other classes where you have correct rawJson data from the API.