nyxx library
Nyxx Discord API wrapper for Dart
Main library which contains all stuff needed to connect and interact with Discord API.
Classes
- ActionMetadataBuilder
- ActionStructureBuilder
- ActivityBuilder
- Allows to change status and presence of bot
- 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
- AutoModerationRuleBuilder
- AvailableTagBuilder
- BasePlugin
- Builder
- Provides abstraction for builders
- ButtonStyle
- Style for a button.
-
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
- CdnConstants
- CdnHttpRouteParam
- Represents a HTTP CDN route.
- CdnHttpRoutePart
- Represents a static CDN HTTP route part.
- 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
- 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.
- Build new instance of Embed's footer
- EntityMetadataBuilder
- ForumChannelBuilder
- ForumTagBuilder
- ForumThreadBuilder
- 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
- GuildEventPrivacyLevel
- GuildEventStatus
- GuildEventType
- GuildFeature
- Guild features
- GuildNsfwLevel
- HttpRouteParam
- Represents a HTTP route parameter.
- HttpRoutePart
- Represents a HTTP route part.
- IActionMetadata
- IActionStructure
- 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
- IAuditLogOptions
- Additional info for certain action types
- IAutoModerationActionExecutionEvent
- IAutoModerationRule
- IAutoModerationRuleCreateEvent
- IAutoModerationRuleDeleteEvent
- IAutoModerationRuleUpdateEvent
- IBan
- IBaseGuildEmoji
-
ICache<
K, V> -
ICacheableTextChannel<
T extends IChannel> - ICategoryGuildChannel
- ICdnHttpEndpoints
- All known routes for Discord's CDN endpoints. Theses are used internally by specific classes; however it's possible to use them like IHttpEndpoints.
- ICdnHttpRoute
- Build static cdn routes that are not constrained by rate-limits.
- 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.
- IDisconnectEvent
- IDMChannel
- IEmbed
- IEmbedAuthor
- IEmbedField
- IEmbedProvider
- IEmbedThumbnail
- IEmbedVideo
- IEmoji
-
Represents emoji. Subclasses provides abstraction to custom emojis(like
GuildEmoji
). - IEntityMetadata
-
IEnum<
T> - Abstract interface for enums in library
- IFieldError
- IForumChannel
- IForumChannelTags
- IForumTag
- IGameAssets
- IGameSecrets
- IgnoreExceptions
- IGuild
- IGuildBanAddEvent
- IGuildBanRemoveEvent
- IGuildChannel
- IGuildCreateEvent
- IGuildDeleteEvent
- IGuildEmoji
- IGuildEmojiPartial
- IGuildEmojisUpdateEvent
- IGuildEvent
- A representation of a scheduled event in a guild.
- IGuildEventCreateEvent
- IGuildEventDeleteEvent
- IGuildEventUpdateEvent
- IGuildEventUser
- IGuildMemberAddEvent
- IGuildMemberRemoveEvent
- IGuildMemberUpdateEvent
- IGuildPreview
- IGuildSticker
- IGuildStickerUpdate
- IGuildUpdateEvent
- IGuildWelcomeChannel
- IGuildWelcomeScreen
- IHttpEndpoints
- Raw access to all http endpoints exposed by nyxx. Allows to execute specific action without any context.
- IHttpErrorData
- IHttpErrorEvent
- IHttpResponse
- Represents a HTTP result from the API.
- IHttpResponseEvent
- IHttpResponseSuccess
- A successful HTTP response.
- IHttpRoute
- Builds routes according to Discord's dynamic bucket rate limiting scheme.
- IInvite
- IInviteCreatedEvent
- IInviteDeletedEvent
- IInviteWithMeta
- ILinkMessageButton
- IMember
- IMemberChunkEvent
-
Sent in response to
GUILD_REQUENT_MEMBERS
websocket command. You can use thechunk_index
andchunk_count
to calculate how many chunks are left for your request. - IMemberFlags
- The flags associated with a member.
- IMessage
- IMessageAuthor
- Could be either IUser, IMember or IWebhook. IWebhook will have most of field missing.
- IMessageButton
- IMessageChannelMultiSelect
- IMessageComponent
- IMessageComponentEmoji
- IMessageDeleteBulkEvent
- IMessageDeleteEvent
- IMessageMentionableMultiSelect
- IMessageMultiselect
- IMessageMultiselectOption
- IMessageReactionAddedEvent
- IMessageReactionEvent
- IMessageReactionRemovedEvent
- IMessageReactionRemoveEmojiEvent
- IMessageReactionsRemovedEvent
- IMessageReceivedEvent
- Sent when a new message is received.
- IMessageReference
- IMessageRoleMultiSelect
- IMessageTextInput
- Text input component
- IMessageTimestamp
- IMessageUpdateEvent
- IMessageUserMultiSelect
- IMinimalGuildChannel
-
InMemoryCache<
K, V> - INyxx
- Generic interface for Nyxx. Represents basic functionality of Nyxx that are always available.
- INyxxRest
- INyxxWebsocket
- IOAuth2Application
- IPartialPresence
- IPartialSticker
- IPermissions
- IPermissionsOverrides
- IPluginManager
- IPresenceUpdateEvent
- IRatelimitEvent
- IRawEvent
- Raw gateway event
- IReaction
- IReadyEvent
- IReferencedMessage
- IResolvableGuildEmojiPartial
- IRestEventController
- IRole
- IRoleCreateEvent
- IRoleDeleteEvent
- IRoleTags
- IRoleUpdateEvent
- ISend
- Marks entity to which message can be sent
- IShard
- A connection to the Discord Gateway.
- 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
- Animated (or not) image like emoji
- ISticker
- Base interface for all sticker types
- IStickerPack
- ITextChannel
- ITextGuildChannel
- ITextVoiceTextChannel
- IThreadChannel
- IThreadCreateEvent
- IThreadDeletedEvent
- IThreadListResultWrapper
- IThreadListSyncEvent
- IThreadMember
- IThreadMembersUpdateEvent
- IThreadMemberUpdateEvent
- IThreadMemberWithMember
- IThreadPreviewChannel
- IThreadUpdateEvent
- ITriggerMetadata
- 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.
- IWebhookUpdateEvent
- When a webhook is created, updated or deleted.
- IWebsocketEventController
- Level
- Levels to control logging output. Logging can be enabled to include all levels above certain Level. Levels are ordered using an integer value Level.value. The predefined Level constants below are sorted as follows (in descending order): Level.SHOUT, Level.SEVERE, Level.WARNING, Level.INFO, Level.CONFIG, Level.FINE, Level.FINER, Level.FINEST, and Level.ALL.
- Logging
- MemberBuilder
- MemberCachePolicy
- Cache policies for caching members
- MemberFlagsBuilder
- Flags that can be applied or removed from a member.
- 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
- MessageFlagBuilder
- 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
- RetryOptions
- Object holding options for retrying a function.
- 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.
- StageChannelInstancePrivacyLevel
- The privacy level of the Stage instance
- StickerBuilder
- Create a new sticker for the guild
- SystemChannelFlags
- TextChannelBuilder
- ThreadArchiveTime
- Simplifies the process of setting an auto archive time.
- ThreadBuilder
- TimeStampStyle
- Style of inline timestamp that can be embedded into message
- TriggerMetadataBuilder
- 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
Enums
- ActionTypes
- Encoding
- The type of encoding to receive/send payloads to discord.
- EventTypes
- ForumLayout
- ForumSortOrder
- KeywordPresets
- TriggerTypes
- VideoQualityMode
Typedefs
-
CachePolicyPredicate<
T extends SnowflakeEntity> = bool Function(T) - Predicate which will decide if entity could be cached
- RawApiList = List
- Typedef of default json list deserialization
-
RawApiListOfMaps
= List<
RawApiMap> - Typedef of default json list of raw api maps
-
RawApiMap
= Map<
String, dynamic> - Typedef of default json deserialization
Exceptions / Errors
- EmbedBuilderArgumentException
- Thrown when embed doesnt meet requirements to be valid
- 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