CacheUtility class

Cache Utility is a Utility that lets you retrieve Entities (from the cache) from outside of the nyxx project. Typically used in nyxx.* projects. An example getting a user is below:

void main() {
    var bot = Nyxx("TOKEN");
    Cacheable<Snowflake, User> cachedUser = CacheUtility.users(bot, Snowflake(''));
}

Constructors

CacheUtility()

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

createCacheableChannel(INyxx client, Snowflake id) Cacheable<Snowflake, IChannel>
Retrieves a cached IChannel. Can be cast.
createCacheableDMChannel(INyxx client, Snowflake id) Cacheable<Snowflake, DMChannel>
Retrieves a cached DMChannel.
createCacheableGuild(INyxx client, Snowflake id) Cacheable<Snowflake, Guild>
Retrieves a cached Guild.
createCacheableMember(INyxx client, Snowflake id, Cacheable<Snowflake, Guild> guild) Cacheable<Snowflake, Member>
Retrieves a cached Guild Member.
createCacheableMessage(INyxx client, Snowflake id, Cacheable<Snowflake, TextChannel> channel) Cacheable<Snowflake, Message>
Retrieves a cached Guild Message.
createCacheableRole(INyxx client, Snowflake id, Cacheable<Snowflake, Guild> guild) Cacheable<Snowflake, Role>
Retrieves a cached Role.
createCacheableTextChannel(INyxx client, Snowflake id) Cacheable<Snowflake, TextChannel>
Retrieves a cached TextChannel.
createCacheableUser(INyxx client, Snowflake id) Cacheable<Snowflake, User>
Retrieves a cached User.
createCacheableVoiceChannel(INyxx client, Snowflake id) Cacheable<Snowflake, VoiceGuildChannel>
Retrieves a cached VoiceChannel.