nyxx library Null safety

Nyxx Discord API wrapper for Dart

Main library which contains all stuff needed to connect and interact with Discord API.

Classes

ActivityType
Represents type of presence activity
AllowedMentions
The allowed mention field allows for more granular control over mentions without various hacks to the message content. This will always validate against message content to avoid phantom pings (e.g. to ping everyone, you must still have @everyone in the message content), and check against user/bot permissions.
AttachmentBuilder
Helper for sending attachment in messages. Allows to create attachment from path, File or bytes.
AttachmentMetadataBuilder
AuditLogEntryType
BasePlugin
Builder
Provides abstraction for builders
Cacheable<T extends Snowflake, S extends SnowflakeEntity>
Wraps SnowflakeEntity that can be taken from cache or optionally downloaded from API. Always provides id of entity. download() method tries to get entity from API and returns it upon success or throws Error if something happens in the process.
CacheOptions
Options for configuring cache. Allows to specify where and which entities should be cached and preserved in cache
CachePolicy<T extends SnowflakeEntity>
CachePolicy is set of rules which will decide if entity should be cached.
CachePolicyLocation
Describes in which places entity should be cached
ChangeKeyType
Type of change in audit log
ChannelBuilder
Builder for creating mini channel instance
ChannelCachePolicy
Cache policies for caching channels
ChannelType
Enum for possible channel types
ClientOptions
Optional client settings which can be used when creating new instance of client. It allows to tune up client to your needs.
CliIntegration
ComponentStyle
Style for a button.
ComponentType
Type of interaction component
Constants
The client constants.
Convertable<T>
Specifies objects which can be converted to Builder
DisconnectEventReason
Reason why shard was disconnected.
DiscordColor
Wrapper for colors. Simplifies creation and provides interface to interact with colors for nyxx.
Disposable
Provides abstraction for disposing object's resources when isn't needed anymore
EmbedAuthorBuilder
Build new instance of author which can be used in EmbedBuilder
EmbedBuilder
Builds up embed object.
EmbedFieldBuilder
Builder for embed Field.
EmbedFooterBuilder
Build new instance of Embed's footer
GatewayIntents
When identifying to the gateway, you can specify an intents parameter which allows you to conditionally subscribe to pre-defined "intents", groups of events defined by Discord. If you do not specify a certain intent, you will not receive any of the gateway events that are batched into that group. Reference
GuildBuilder
Allows to build guild object for creating new one or modifying existing
GuildEventBuilder
GuildFeature
Guild features
GuildNsfwLevel
IActivity
IActivityEmoji
IActivityFlags
IActivityParty
IActivityTimestamps
IAppTeam
Object of team that manages given app
IAppTeamMember
Represent membership of user in app team
IAppTeamUser
IAttachment
IAuditLog
IAuditLogChange
IAuditLogEntry
IBan
IBaseGuildEmoji
ICache<K, V>
ICacheableTextChannel<T extends IChannel>
ICategoryGuildChannel
IChannel
IChannelCreateEvent
IChannelDeleteEvent
Sent when a channel is deleted.
IChannelPinsUpdateEvent
IChannelUpdateEvent
IClientOAuth2Application
The client's OAuth2 app, if the client is a bot.
IClientStatus
IClientUser
ClientUser is bot's discord account. Allows to change bot's presence.
ICustomMessageButton
IDisconnectEvent
IDMChannel
IEmbed
IEmbedAuthor
IEmbedField
IEmbedFooter
IEmbedProvider
IEmbedThumbnail
IEmbedVideo
IEmoji
Represents emoji. Subclasses provides abstraction to custom emojis(like GuildEmoji).
IEnum<T>
Abstract interface for enums in library
IGameAssets
IGameSecrets
IgnoreExceptions
IGuild
IGuildBanAddEvent
IGuildBanRemoveEvent
IGuildChannel
IGuildCreateEvent
IGuildDeleteEvent
IGuildEmoji
IGuildEmojiPartial
IGuildEmojisUpdateEvent
IGuildMemberAddEvent
IGuildMemberRemoveEvent
IGuildMemberUpdateEvent
IGuildPreview
IGuildSticker
IGuildStickerUpdate
IGuildUpdateEvent
IHttpEndpoints
Raw access to all http endpoints exposed by nyxx. Allows to execute specific action without any context.
IHttpErrorEvent
IHttpResponse
IHttpResponseEvent
IHttpResponseSucess
IInvite
IInviteCreatedEvent
IInviteDeletedEvent
IInviteWithMeta
ILinkMessageButton
IMember
IMemberChunkEvent
Sent in response to GUILD_REQUENT_MEMBERS websocket command. You can use the chunk_index and chunk_count to calculate how many chunks are left for your request.
IMessage
IMessageAuthor
Could be either User, Member or Webhook. Webhook will have most of field missing.
IMessageButton
IMessageComponent
IMessageComponentEmoji
IMessageDeleteBulkEvent
IMessageDeleteEvent
IMessageMultiselect
IMessageMultiselectOption
IMessageReactionAddedEvent
IMessageReactionEvent
IMessageReactionRemovedEvent
IMessageReactionRemoveEmojiEvent
IMessageReactionsRemovedEvent
IMessageReceivedEvent
Sent when a new message is received.
IMessageReference
IMessageTimestamp
IMessageUpdateEvent
IMinimalGuildChannel
InMemoryCache<K, V>
INyxx
Generic interface for Nyxx. Represents basic functionality of Nyxx that are always available.
INyxxRest
INyxxWebsocket
IOAuth2Application
IPartialSticker
IPermissions
IPermissionsOverrides
IPluginManager
IPresenceUpdateEvent
IRatelimitEvent
IRawEvent
Raw gateway event RawEvent is dispatched ONLY for payload that doesn't match any event built in into Nyxx.
IReaction
IReadyEvent
IReferencedMessage
IRestEventController
IRole
IRoleCreateEvent
IRoleDeleteEvent
IRoleTags
IRoleUpdateEvent
ISend
Marks entity to which message can be sent
IShard
IShardManager
Spawns, connects, monitors, manages and terminates shards. Sharding will be automatic if no user settings are supplied in ClientOptions when instantiating Nyxx client instance.
IStageChannelInstance
IStageInstanceEvent
IStageVoiceGuildChannel
IStandardSticker
ISticker
Base interface for all sticker types
IStickerPack
ITextChannel
ITextGuildChannel
ITextVoiceTextChannel
IThreadChannel
IThreadCreateEvent
IThreadDeletedEvent
IThreadListResultWrapper
IThreadMember
IThreadMembersUpdateEvent
IThreadPreviewChannel
ITypingEvent
IUnicodeEmoji
IUser
IUserFlags
IUserUpdateEvent
IVoiceGuildChannel
IVoiceRegion
IVoiceServerUpdateEvent
IVoiceState
IVoiceStateUpdateEvent
IWebhook
Webhooks are a low-effort way to post messages to channels in Discord. They do not require a bot user or authentication to use.
IWebsocketEventController
Logging
MemberCachePolicy
Cache policies for caching members
Mentionable
Provides abstraction for entities which can be mentioned
MessageBuilder
Allows to create pre built custom messages which can be passed to classes which inherits from ISend.
MessageCachePolicy
MessageComponentEmoji
Spacial emoji object for MessageComponent
MessageDecoration
Specifies formatting of String appended with MessageBuilder
MessageFlags
Extra features of the message
MessageType
Represents messgae type
NitroType
Premium types denote the level of premium a user has.
NyxxFactory
OPCodes
Gateway constants
PermissionOverrideBuilder
Builder for manipulating PermissionsOverrides. Created from existing override or manually by passing type and id of enttiy.
PermissionsBuilder
Builder for permissions.
PermissionsConstants
Permissions constants
PermissionsUtils
Util function for manipulating permissions
PremiumTier
Boost level of guild
PresenceBuilder
Allows to build object of user presence used later when setting user presence.
ReplyBuilder
Builder for replying to message
RoleBuilder
Creates role
Snowflake
Snowflake represents id system used by Discord. id property is actual id of entity which holds Snowflake.
SnowflakeCache<V>
SnowflakeEntity
Marks a snowflake entity. Snowflake entities are ones that have an id that uniquely identifies them. Includes only actual id of entity and createdAt which is timestamp when entity was created.
StickerBuilder
Create a new sticker for the guild
TextChannelBuilder
ThreadArchiveTime
Simplifies the process of setting an auto archive time.
ThreadBuilder
TimeStampStyle
Style of inline timestamp that can be embedded into message
UnicodeEmoji
Represents unicode emoji. Contains only emoji code.
UserStatus
Provides values for user status.
VoiceActivityType
Activity Types
VoiceChannelBuilder
WebhookType
Type of webhook. Either incoming if it its normal webhook executable with token, or channelFollower if its discord internal webhook

Extensions

IntExtensions
Extension on int
ListSafeFirstWhere
SnowflakeEntityListExtensions
Extensions on Iterable of Snowflakes entities
StringExtensions
Extension on int

Typedefs

CachePolicyPredicate<T extends SnowflakeEntity> = bool Function(T)
Predicate which will decide if entity could be cached
RawApiMap = Map<String, dynamic>
Typedef of default json deserialization

Exceptions / Errors

EmbedBuilderArgumentException
Thrown when embed doesnt meet requirements to be valid
HttpClientException
Exception of http client
IHttpResponseError
InvalidShardException
Thrown when operation is unsupported due invalid or wrong shard being accessed.
InvalidSnowflakeException
Thrown when cannot convert provided data to Snowflake
MissingTokenError
Thrown when token is empty or null
UnrecoverableNyxxError