EntityUtility class Null safety
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");
Map<String, dynamic> rawJson = /* rawJson from the API */
User user = EntityUtility.createUser(bot, rawJson);
}
Constructors
Properties
- hashCode → int
-
The hash code for this object. [...]
read-only, inherited
- runtimeType → Type
-
A representation of the runtime type of the object.
read-only, inherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent 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(
Nyxx client, Snowflake guildId, Map< String, dynamic> rawJson) → CategoryGuildChannel - Creates a CategoryGuildChannel object, can be used for other classes where you have correct rawJson data from the API. [...]
-
createDMChannel(
Nyxx client, Map< String, dynamic> rawJson) → DMChannel - Creates a Guild object, can be used for other classes where you have correct rawJson data from the API. [...]
-
createGuild(
Nyxx client, Map< String, dynamic> rawJson) → Guild - Creates a Guild object, can be used for other classes where you have correct rawJson data from the API. [...]
-
createGuildMember(
Nyxx client, Snowflake guildId, Map< String, dynamic> rawJson) → Member - Creates a Guild Member object, can be used for other classes where you have correct rawJson data from the API. [...]
-
createRole(
Nyxx client, Snowflake guildId, Map< String, dynamic> rawJson) → Role - Creates a Role object, can be used for other classes where you have correct rawJson data from the API. [...]
-
createTextGuildChannel(
Nyxx client, Snowflake guildId, Map< String, dynamic> rawJson) → TextGuildChannel - Creates a Guild object, can be used for other classes where you have correct rawJson data from the API. [...]
-
createUser(
Nyxx client, Map< String, dynamic> rawJson) → User - Creates a User object, can be used for other classes where you have correct rawJson data from the API. [...]
-
createVoiceGuildChannel(
Nyxx client, Snowflake guildId, Map< String, dynamic> rawJson) → VoiceGuildChannel - Creates a VoiceGuildChannel object, can be used for other classes where you have correct rawJson data from the API. [...]