nyxx_extensions library

Classes

EmojiDefinition
Information about a text emoji.
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.
TimestampStyle

Extensions

ChannelUtils on Channel
EmbedExtension on Embed
GuildExtension on Guild
MessageUtils on Message
NyxxEmojiDefinitions on NyxxRest
Extensions relating to EmojiDefinitions on NyxxRest.
PartialChannelUtils on PartialChannel
RoleExtension on PartialRole
TextEmojiDefinition on TextEmoji
Extensions relating to EmojiDefinitions on TextEmoji.
TimestampStyleDateTime on DateTime
TimestampStyleDuration on Duration
UserExtension on PartialUser

Properties

channelMentionRegex RegExp
A pattern that matches channel mentions 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
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.
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.
Format the content and the URL into a hyperlink (aka Markdown link), and optionally, add a title that will be displayed on hover.
inlineCode(String content) String
Wraps the content inside backticks.
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 to action.
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.