nyxx_extensions library
Extensions and additional utilities for working with nyxx.
Classes
- EmojiDefinition
- Information about a text emoji.
- GuildJoins
-
Provides a way to know when the client joins or leaves a
Guild
. - Pagination
- A plugin that adds support for pagination to nyxx clients.
- PaginationOptions
- Options for controlling pagination.
Enums
- SanitizerAction
- An action sanitizeContent can take on a target.
- SanitizerTarget
- A type of target sanitizeContent can operate on.
- StreamOrder
- Controls the order in which entities from paginated endpoints are streamed.
- TimestampStyle
Extensions
- AuditLogManagerExtensions on AuditLogManager
-
Extensions on
AuditLogManager
. - CdnAssetExtensions on CdnAsset
- ChannelExtensions on Channel
-
Extensions on
Channel
s. - ChannelManagerExtensions on ChannelManager
-
Extensions on
ChannelManager
s. - DateTimeExtensions on DateTime
- Extensions on DateTime.
- DurationExtensions on Duration
- Extensions on Duration.
- EmbedExtensions on Embed
-
Extensions on
Embed
. - EntitlementManagerExtensions on EntitlementManager
-
Extensions on
EntitlementManager
s. - GuildCategoryExtensions on GuildCategory
-
Extensions on
GuildCategory
s. - GuildChannelExtensions on GuildChannel
-
Extensions on
GuildChannel
s. - GuildChannelsExtension on T
-
Extensions on all
GuildChannel
types - GuildDeleteEventExtensions on GuildDeleteEvent
- GuildExtensions on Guild
-
Extensions on
Guild
s. - GuildManagerExtensions on GuildManager
-
Extensions on
GuildManager
s. -
ManagedSnowflakeEntityExtensions
on ManagedSnowflakeEntity<
T> -
Extensions on
ManagedSnowflakeEntity
s. - MemberExtensions on Member
- MemberManagerExtensions on MemberManager
-
Extensions on
MemberManager
s. - MessageExtensions on Message
-
Extensions on
Message
s. - MessageManagerExtensions on MessageManager
-
Extensions on
MessageManager
s. - NyxxRestExtensions on NyxxRest
-
Extensions on
NyxxRest
. - PartialApplicationExtensions on PartialApplication
-
Extensions on
PartialApplication
s. - PartialChannelExtensions on PartialChannel
-
Extensions on
PartialChannel
s. - PartialGuildExtensions on PartialGuild
-
Extensions on
PartialGuild
s. -
PartialList
on List<
SnowflakeEntity< T> > -
Extensions for fetching lists of
SnowflakeEntity
s. - PartialMemberExtensions on PartialMember
-
Extensions on
PartialMember
s. - PartialRoleExtensions on PartialRole
-
Extensions on
PartialRole
s. - PartialScheduledEventExtensions on PartialScheduledEvent
-
Extensions on
PartialScheduledEvent
. - PartialUserExtensions on PartialUser
-
Extensions on
PartialUser
. -
RoleList
on List<
Role> -
Extensions on Lists of
Role
s. - ScheduledEventManagerExtensions on ScheduledEventManager
-
Extensions on
ScheduledEventManager
s. -
SnowflakeEntityExtensions
on SnowflakeEntity<
T> -
Extensions on
SnowflakeEntity
s. - TextEmojiExtensions on TextEmoji
-
Extensions on
TextEmoji
. - ThreadExtensions on Thread
-
Extensions on
Thread
s. - UserExtensions on User
- UserManagerExtensions on UserManager
-
Extensions on
UserManager
s.
Properties
- channelMentionRegex → RegExp
-
A pattern that matches channel mentions in a message.
final
- commandMentionRegex → RegExp
-
A pattern that matches slash commands in a message.
final
- everyoneMentionRegex → RegExp
-
A pattern that matches
@everyone
and@here
mentions in a message.final - guildEmojiRegex → RegExp
-
A pattern that matches guild emojis in a message.
final
- guildJoins → GuildJoins
-
A global instance of the GuildJoins plugin.
final
- pagination → Pagination
-
A global instance of the Pagination plugin with default options.
final
- roleMentionRegex → RegExp
-
A pattern that matches role mentions in a message.
final
- userMentionRegex → RegExp
-
A pattern that matches user mentions in a message.
final
Functions
-
bold(
String content) → String -
Wraps the
content
inside**
. -
channelMention(
Snowflake id) → String - Formats a channel ID into a channel mention.
-
codeBlock(
String code, [String language = '']) → String -
Wraps the
code
in a code block with the specified language, if any. -
computePermissions(
GuildChannel channel, Member member) → Future< Permissions> -
Compute the permissions for
member
in a givenchannel
. -
formatDate(
DateTime date, [TimestampStyle style = TimestampStyle.none]) → String -
Formats the
date
into a date string timestamp. -
getEmojiDefinitions(
) → Future< List< EmojiDefinition> > - List all the emoji definitions currently available.
-
hideEmbed(
String url) → String -
Wraps the
url
inside<>
, used to remove its embed. -
hyperlink(
String content, String url, [String? title]) → String -
Format the
content
and the URL into a hyperlink (aka Markdown link), and optionally, add atitle
that will be displayed on hover. -
inlineCode(
String content) → String -
Wraps the
content
insidebackticks
. -
italic(
String content) → String -
Wraps the
content
inside*
. -
quote(
String content) → String -
Quotes the
content
. -
quoteBlock(
String content) → String -
Quotes the
content
in a quote block. -
roleMention(
Snowflake id) → String - Formats a role ID into a role mention.
-
sanitizeContent(
String content, {required PartialTextChannel channel, SanitizerAction action = SanitizerAction.sanitize, Map< SanitizerTarget, SanitizerAction> ? actionOverrides}) → Future<String> -
Find SanitizerTargets in
content
and sanitize them according toaction
. -
spoiler(
String content) → String -
Wraps the
content
inside||
. -
strikethrough(
String content) → String -
Wraps the
content
inside~~
. -
underline(
String content) → String -
Wraps the
content
inside__
. -
userMention(
Snowflake id) → String - Formats a user ID into a user mention.