IHttpEndpoints class abstract
Raw access to all http endpoints exposed by nyxx. Allows to execute specific action without any context.
Constructors
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
-
addRoleToUser(
Snowflake guildId, Snowflake roleId, Snowflake userId, {String? auditReason}) → Future< void> - Adds role to user
-
addThreadMember(
Snowflake channelId, Snowflake userId) → Future< void> - Adds member to thread given bot has sufficient permissions
-
bulkRemoveMessages(
Snowflake channelId, Iterable< SnowflakeEntity> messagesIds) → Future<void> -
Bulk removes messages in given
channelId
. -
changeGuildOwner(
Snowflake guildId, SnowflakeEntity member, {String? auditReason}) → Future< Guild> -
Changes guild owner of guild from bot to
member
. Bot needs to be owner of guild to use that endpoint. -
createDMChannel(
Snowflake userId) → Future< DMChannel> -
Creates and returns
DMChannel
for user with givenuserId
. -
createEmoji(
Snowflake guildId, String name, {List< SnowflakeEntity> ? roles, AttachmentBuilder? emojiAttachment}) → Future<GuildEmoji> - Creates emoji in given guild
-
createGuildChannel(
Snowflake guildId, ChannelBuilder channelBuilder) → Future< IChannel> - Allows to create guild channel.
-
createGuildRole(
Snowflake guildId, RoleBuilder roleBuilder, {String? auditReason}) → Future< Role> - Creates new role
-
createGuildSticker(
Snowflake guildId, StickerBuilder builder) → Future< GuildSticker> -
Creates
GuildSticker
in given Guild -
createInvite(
Snowflake channelId, {int? maxAge, int? maxUses, bool? temporary, bool? unique, String? auditReason}) → Future< Invite> -
Creates new invite for given
channelId
-
createMessageReaction(
Snowflake channelId, Snowflake messageId, IEmoji emoji) → Future< void> -
Creates reaction with given
emoji
on given message -
createStageChannelInstance(
Snowflake channelId, String topic, {StageChannelInstancePrivacyLevel? privacyLevel}) → Future< StageChannelInstance> - Creates a new Stage instance associated to a Stage channel.
-
createThread(
Snowflake channelId, ThreadBuilder builder) → Future< ThreadPreviewChannel> - Creates new thread.
-
createThreadWithMessage(
Snowflake channelId, Snowflake messageId, ThreadBuilder builder) → Future< ThreadPreviewChannel> - Sends message and creates new thread in one action.
-
createVoiceActivityInvite(
Snowflake activityId, Snowflake channelId, {int? maxAge, int? maxUses}) → Future< Invite> - Creates an activity invite
-
createWebhook(
Snowflake channelId, String name, {AttachmentBuilder? avatarAttachment, String? auditReason}) → Future< Webhook> - Crates new webhook
-
crossPostGuildMessage(
Snowflake channelId, Snowflake messageId) → Future< void> - Cross posts message in new channel to all subsribed channels
-
deleteChannel(
Snowflake channelId) → Future< void> - Deletes guild channel
-
deleteChannelPermission(
Snowflake channelId, SnowflakeEntity id, {String? auditReason}) → Future< void> -
Deletes permission overrides for given entity
id
-
deleteGuild(
Snowflake guildId) → Future< void> - Deletes guild. Requires bot to be owner of guild
-
deleteGuildEmoji(
Snowflake guildId, Snowflake emojiId) → Future< void> - Removes emoji from given guild
-
deleteGuildSticker(
Snowflake guildId, Snowflake stickerId) → Future< void> - Deletes GuildSticker for Guild
-
deleteInvite(
String code, {String? auditReason}) → Future< void> -
Deletes invite with given
code
-
deleteMessage(
Snowflake channelId, Snowflake messageId, {String? auditReason}) → Future< void> - Deletes message from given channel
-
deleteMessageAllReactions(
Snowflake channelId, Snowflake messageId) → Future< void> - Deletes all reactions on given message
-
deleteMessageReaction(
Snowflake channelId, Snowflake messageId, IEmoji emoji) → Future< void> -
Deletes all reactions for given
emoji
from message -
deleteMessageUserReaction(
Snowflake channelId, Snowflake messageId, IEmoji emoji, Snowflake userId) → Future< void> - Deletes all reactions of given user from message.
-
deleteRole(
Snowflake guildId, Snowflake roleId, {String? auditReason}) → Future< void> -
Deletes from with given
roleId
-
deleteStageChannelInstance(
Snowflake channelId) → Future< void> - Deletes the Stage instance.
-
deleteWebhook(
Snowflake id, {String token = "", String? auditReason}) → Future< void> -
Deletes webhook with given
id
using bot permissions ortoken
if supplied -
downloadMessages(
Snowflake channelId, {int limit = 50, Snowflake? after, Snowflake? before, Snowflake? around}) → Stream< Message> - Downloads messages in given channel.
-
editChannelPermissionOverrides(
Snowflake channelId, PermissionOverrideBuilder permissionBuilder, {String? auditReason}) → Future< void> - Allows to edit permission of channel (channel overrides)
-
editChannelPermissions(
Snowflake channelId, PermissionsBuilder perms, SnowflakeEntity entity, {String? auditReason}) → Future< void> - Allows to edit permission for channel
-
editGuild(
Snowflake guildId, {String? name, int? verificationLevel, int? notificationLevel, SnowflakeEntity? afkChannel, int? afkTimeout, String? icon, String? auditReason}) → Future< Guild> - Allows to edit basic guild properties
-
editGuildChannel<
T extends GuildChannel> (Snowflake channelId, ChannelBuilder builder, {String? auditReason}) → Future< T> - Allows to edit guild channel. Resulting updated channel can by cast using generics
-
editGuildEmoji(
Snowflake guildId, Snowflake emojiId, {String? name, List< Snowflake> ? roles, AttachmentBuilder? avatarAttachment}) → Future<GuildEmoji> - Allows to modify guild emoji.
-
editGuildMember(
Snowflake guildId, Snowflake memberId, {String? nick, List< SnowflakeEntity> ? roles, bool? mute, bool? deaf, Snowflake? channel = const Snowflake.zero(), String? auditReason}) → Future<void> - "Edits" guild member. Allows to manipulate other guild users.
-
editGuildSticker(
Snowflake guildId, Snowflake stickerId, StickerBuilder builder) → Future< GuildSticker> -
Edits
GuildSticker
. Only allows to update sticker metadata -
editMessage(
Snowflake channelId, Snowflake messageId, MessageBuilder builder) → Future< Message> -
Edits message with given id using
builder
-
editRole(
Snowflake guildId, Snowflake roleId, RoleBuilder role, {String? auditReason}) → Future< Role> -
Edits role using builder form
role
parameter -
editSelfUser(
{String? username, AttachmentBuilder? avatarAttachment}) → Future< User> - Edits self user.
-
editWebhook(
Snowflake webhookId, {String token = "", String? name, SnowflakeEntity? channel, AttachmentBuilder? avatarAttachment, String? auditReason}) → Future< Webhook> -
emojiUrl(
Snowflake emojiId) → String -
Returns url for given
emojiId
-
executeWebhook(
Snowflake webhookId, MessageBuilder builder, {String? token, bool? wait, String? avatarUrl, String? username, Snowflake? threadId}) → Future< Message?> -
Executes Webhook -- sends message using Webhook
To execute webhook in thread use
threadId
parameter. Webhooks can have overriddenavatarUrl
andusername
per each execution. -
fetchActiveThreads(
Snowflake channelId) → Future< ThreadListResultWrapper> - Returns all active threads in given channel
-
fetchAuditLogs(
Snowflake guildId, {Snowflake? userId, int? actionType, Snowflake? before, int? limit}) → Future< AuditLog> - Fetches audit logs of guild
-
fetchChannel<
T> (Snowflake id) → Future< T> - Fetches IChannel from API. Channel cas be cast to wanted type using generics
-
fetchChannelInvites(
Snowflake channelId) → Stream< InviteWithMeta> - Returns invites for given channel. Includes additional metadata.
-
fetchChannelWebhooks(
Snowflake channelId) → Stream< Webhook> -
Returns all
Webhook
s in given channel -
fetchGuild(
Snowflake guildId) → Future< Guild> -
Fetches
Guild
object from API -
fetchGuildEmoji(
Snowflake guildId, Snowflake emojiId) → Future< IGuildEmoji> -
Returns
IGuildEmoji
for givenemojiId
-
fetchGuildInvites(
Snowflake guildId) → Stream< Invite> - Returns list of all guild invites
-
fetchGuildMember(
Snowflake guildId, Snowflake memberId) → Future< Member> -
Fetches
Member
object from guild -
fetchGuildMembers(
Snowflake guildId, {int limit = 1, Snowflake? after}) → Stream< Member> - Fetches list of members from guild. Requires GUILD_MEMBERS intent to work properly.
-
fetchGuildPreview(
Snowflake guildId) → Future< GuildPreview> - Fetches preview of guild
-
fetchGuildRoles(
Snowflake guildId) → Stream< Role> - Returns all roles of guild
-
fetchGuildSticker(
Snowflake guildId, Snowflake stickerId) → Future< GuildSticker> -
Fetches
GuildSticker
-
fetchGuildStickers(
Snowflake guildId) → Stream< GuildSticker> -
Fetches all
GuildSticker
s in given Guild -
fetchGuildVoiceRegions(
Snowflake guildId) → Stream< VoiceRegion> - Returns list of all voice regions that guild has access to
-
fetchInvite(
String code) → Future< Invite> -
Fetches invite based on specified
code
-
fetchJoinedPrivateArchivedThreads(
Snowflake channelId, {DateTime? before, int? limit}) → Future< ThreadListResultWrapper> - Returns all joined private archived thread in given channel
-
fetchMessage(
Snowflake channelId, Snowflake messageId) → Future< Message> -
Fetches single message with given
messageId
-
fetchPinnedMessages(
Snowflake channelId) → Stream< Message> - Returns all pinned messages in channel
-
fetchPrivateArchivedThreads(
Snowflake channelId, {DateTime? before, int? limit}) → Future< ThreadListResultWrapper> - Returns all private archived thread in given channel
-
fetchPublicArchivedThreads(
Snowflake channelId, {DateTime? before, int? limit}) → Future< ThreadListResultWrapper> - Returns all public archived thread in given channel
-
fetchUser(
Snowflake userId) → Future< User> -
Fetches
User
object for givenuserId
-
fetchWebhook(
Snowflake id, {String token = ""}) → Future< Webhook> -
Fetches webhook using its
id
and optionallytoken
. Iftoken
is specified it will be used to fetch webhook data. If not authenticated or missing permissions for given webhook token can be used. -
getApplicationInviteUrl(
Snowflake applicationId, [int? permissions]) → String - Creates an OAuth2 URL with the specified permissions.
-
getGuildBan(
Snowflake guildId, Snowflake bannedUserId) → Future< Ban> -
Get
Ban
object for givenbannedUserId
-
getGuildBans(
Snowflake guildId) → Stream< Ban> - Get all guild bans.
-
getGuildDiscoveryURL(
Snowflake guildId, String? splashHash, {String format = "webp", int size = 128}) → String? -
Returns discovery url for given
guildId
andsplashHash
. Allows to additionally specifyformat
andsize
of returned image. -
getGuildIconUrl(
Snowflake guildId, String? iconHash, String format, int size) → String? -
Returns cdn url for given
guildId
andiconHash
. Requires to specify format and size of returned image. Format can be webp, png. Size should be power of 2, eg. 512, 1024 -
getGuildSplashURL(
Snowflake guildId, String? splashHash, String format, int size) → String? -
Returns cdn url for given
guildId
andsplashHash
. Requires to specify format and size of returned image. Format can be webp, png. Size should be power of 2, eg. 512, 1024 -
getGuildWidgetUrl(
Snowflake guildId, [String style = "shield"]) → String -
Returns url to guild widget for given
guildId
. Additionally acceptsstyle
parameter. -
getRoleIconUrl(
Snowflake roleId, String iconHash, String format, int size) → String - Returns cdn url for given icon hash of role
-
getStageChannelInstance(
Snowflake channelId) → Future< StageChannelInstance> - Gets the stage instance associated with the Stage channel, if it exists.
-
getSticker(
Snowflake id) → Future< StandardSticker> - Returns single nitro sticker
-
getThreadMembers(
Snowflake channelId, Snowflake guildId) → Stream< ThreadMember> - Returns all member of given thread
-
getUserBannerURL(
Snowflake userId, String hash, {String format = "png"}) → String - Returns url of user banner
-
guildBan(
Snowflake guildId, Snowflake userId, {int deleteMessageDays = 0, String? auditReason}) → Future< void> - Ban user with given id
-
guildKick(
Snowflake guildId, Snowflake userId, {String? auditReason}) → Future< void> - Kick user from guild
-
guildPrune(
Snowflake guildId, int days, {Iterable< Snowflake> ? includeRoles, String? auditReason}) → Future<int> - Executes actual prune action, returning how many users were pruned.
-
guildPruneCount(
Snowflake guildId, int days, {Iterable< Snowflake> ? includeRoles}) → Future<int> - Returns how many user will be pruned in prune operation
-
guildUnban(
Snowflake guildId, Snowflake userId) → Future< void> - Unban user with given id
-
joinThread(
Snowflake channelId) → Future< void> - Joins thread with given id
-
leaveGuild(
Snowflake guildId) → Future< void> - Leaves guild with given id
-
leaveThread(
Snowflake channelId) → Future< void> - Leave thread with given id
-
listNitroStickerPacks(
) → Stream< StickerPack> - Returns all nitro sticker packs
-
memberAvatarURL(
Snowflake memberId, Snowflake guildId, String avatarHash, {String format = "webp"}) → String - Returns url to member avatar url
-
modifyCurrentMember(
Snowflake guildId, {String? nick}) → Future< void> -
moveGuildChannel(
Snowflake guildId, Snowflake channelId, int position, {String? auditReason}) → Future< void> - Moves guild channel in hierachy.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
pinMessage(
Snowflake channelId, Snowflake messageId) → Future< void> - Pins message in channel
-
removeRoleFromUser(
Snowflake guildId, Snowflake roleId, Snowflake userId, {String? auditReason}) → Future< void> - Removes role from user
-
removeThreadMember(
Snowflake channelId, Snowflake userId) → Future< void> - Removes member from thread given bot has sufficient permissions
-
searchGuildMembers(
Snowflake guildId, String query, {int limit = 1}) → Stream< Member> -
Searches guild for user with
query
parameter Requires GUILD_MEMBERS intent to work properly. -
sendMessage(
Snowflake channelId, MessageBuilder builder) → Future< Message> -
Sends message in channel with given
channelId
usingbuilder
-
sendRawRequest(
String url, String method, {dynamic body, Map< String, dynamic> ? headers, List<AttachmentBuilder> files = const [], Map<String, dynamic> ? queryParams}) → Future<_HttpResponse> - Used to send a request including standard bot authentication.
-
stickerUrl(
Snowflake stickerId, String extension) → String - Returns url for sticker.
-
suppressMessageEmbeds(
Snowflake channelId, Snowflake messageId) → Future< Message> - Removes all embeds from given message
-
toString(
) → String -
A string representation of this object.
inherited
-
triggerTyping(
Snowflake channelId) → Future< void> - Triggers typing indicator in channel
-
unpinMessage(
Snowflake channelId, Snowflake messageId) → Future< void> - Unpins message from channel
-
updateStageChannelInstance(
Snowflake channelId, String topic, {StageChannelInstancePrivacyLevel? privacyLevel}) → Future< StageChannelInstance> - Updates fields of an existing Stage instance.
-
userAvatarURL(
Snowflake userId, String? avatarHash, int discriminator, {String format = "webp", int size = 128}) → String - Returns url to user avatar
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited