package requests
- Alphabetic
- By Inheritance
- requests
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
- case class AddGuildMember(guildId: GuildId, userId: UserId, params: AddGuildMemberData) extends GuildMemberRequest[AddGuildMemberData] with Product with Serializable
Adds a user to a guild.
Adds a user to a guild. Requires the
guilds.join
OAuth2 scope. - case class AddGuildMemberData(accessToken: String, nick: Option[String] = None, roles: Option[Seq[RoleId]] = None, mute: Option[Boolean] = None, deaf: Option[Boolean] = None) extends Product with Serializable
- accessToken
The OAuth2 access token.
- nick
The nickname to give to the user.
- roles
The roles to give to the user.
- mute
If the user should be muted.
- deaf
If the user should be deafened.
- case class AddGuildMemberRole(guildId: GuildId, userId: UserId, roleId: RoleId) extends NoParamsResponseRequest with Product with Serializable
Add a role to a guild member.
- case class AddPinnedChannelMessages(channelId: TextChannelId, messageId: MessageId) extends NoParamsResponseRequest with Product with Serializable
Add a new pinned message to a channel.
- case class AllowedMention(parse: Seq[AllowedMentionTypes] = Seq.empty, roles: Seq[RoleId] = Seq.empty, users: Seq[UserId] = Seq.empty) extends Product with Serializable
- sealed abstract class AllowedMentionTypes extends StringEnumEntry
- trait BaseRESTRequest[RawResponse, NiceResponse] extends Request[RawResponse]
Base trait for all REST requests in AckCord.
Base trait for all REST requests in AckCord. If you feel an endpoint is missing, and AckCord hasn't added it yet, you can extend this and create your own request. I'd recommend you to extend RESTRequest tough for simplicity.
- RawResponse
The response type of the request
- NiceResponse
A nicer and less raw type of response created from the response.
- case class BeginGuildPrune(guildId: GuildId, queryParams: BeginGuildPruneData, reason: Option[String] = None) extends NoParamsNiceResponseRequest[BeginGuildPruneResponse] with NoParamsNiceResponseReasonRequest[BeginGuildPrune, BeginGuildPruneResponse] with Product with Serializable
Begin a guild prune.
- case class BeginGuildPruneData(days: Int, computePruneCount: Option[Boolean]) extends Product with Serializable
- days
The amount of days to prune for.
- computePruneCount
If the pruned return field should be present.
- case class BeginGuildPruneResponse(pruned: Option[Int]) extends Product with Serializable
- pruned
The number of members that were removed.
- case class BulkDeleteMessages(channelId: TextChannelId, params: BulkDeleteMessagesData) extends NoResponseRequest[BulkDeleteMessagesData] with Product with Serializable
Delete multiple messages in a single request.
Delete multiple messages in a single request. Can only be used on guild channels.
- case class BulkDeleteMessagesData(messages: Seq[MessageId]) extends Product with Serializable
- messages
All the messages to delete.
- case class CreateChannelInvite(channelId: GuildChannelId, params: CreateChannelInviteData, reason: Option[String] = None) extends NoNiceResponseReasonRequest[CreateChannelInvite, CreateChannelInviteData, Invite] with Product with Serializable
Create a new invite for a channel.
Create a new invite for a channel. Can only be used on guild channels.
- case class CreateChannelInviteData(maxAge: Int = 86400, maxUses: Int = 0, temporary: Boolean = false, unique: Boolean = false, targetUser: Option[UserId], targetUserType: Option[Int]) extends Product with Serializable
- maxAge
Duration in seconds before this invite expires.
- maxUses
Amount of times this invite can be used before expiring, or 0 for unlimited.
- temporary
If this invite only grants temporary membership.
- unique
If true, guarantees to create a new invite.
- targetUser
The target user for this invite.
- case class CreateDMData(recipientId: UserId) extends Product with Serializable
- recipientId
User to send a DM to.
- case class CreateDm(params: CreateDMData) extends RESTRequest[CreateDMData, RawChannel, Option[DMChannel]] with Product with Serializable
Create a new DM channel.
- case class CreateGroupDMData(accessTokens: Seq[String], nicks: SnowflakeMap[User, String]) extends Product with Serializable
- accessTokens
The access tokens of users that have granted the bot the
gdm.join
scope.- nicks
A map specifying the nicknames for the users in this group DM.
- case class CreateGuild(params: CreateGuildData) extends RESTRequest[CreateGuildData, RawGuild, Option[Guild]] with Product with Serializable
Create a new guild.
Create a new guild. Can only be used by bots in less than 10 guilds.
- case class CreateGuildBan(guildId: GuildId, userId: UserId, queryParams: CreateGuildBanData, reason: Option[String] = None) extends NoParamsResponseReasonRequest[CreateGuildBan] with Product with Serializable
Ban a user from a guild.
- case class CreateGuildBanData(deleteMessageDays: Option[Int], reason: Option[String]) extends Product with Serializable
- deleteMessageDays
The number of days to delete messages for this banned user.
- reason
The reason for the ban.
- case class CreateGuildChannel(guildId: GuildId, params: CreateGuildChannelData, reason: Option[String] = None) extends ReasonRequest[CreateGuildChannel, CreateGuildChannelData, RawChannel, Option[GuildChannel]] with Product with Serializable
Create a channel in a guild.
- case class CreateGuildChannelData(name: String, type: JsonOption[ChannelType] = JsonUndefined, topic: JsonOption[String] = JsonUndefined, bitrate: JsonOption[Int] = JsonUndefined, userLimit: JsonOption[Int] = JsonUndefined, rateLimitPerUser: JsonOption[Int] = JsonUndefined, permissionOverwrites: JsonOption[Seq[PermissionOverwrite]] = JsonUndefined, parentId: JsonOption[SnowflakeType[GuildCategory]] = JsonUndefined, nsfw: JsonOption[Boolean] = JsonUndefined) extends Product with Serializable
- name
The name of the channel.
- topic
The topic to give this channel.
- bitrate
The bitrate for the channel if it's a voice channel.
- userLimit
The user limit for the channel if it's a voice channel.
- rateLimitPerUser
The user ratelimit to give this channel.
- permissionOverwrites
The permission overwrites for the channel.
- parentId
The category id for the channel.
- nsfw
If the channel is NSFW.
- case class CreateGuildData(name: String, region: Option[String], icon: Option[ImageData], verificationLevel: Option[VerificationLevel], defaultMessageNotifications: Option[NotificationLevel], explicitContentFilter: Option[FilterLevel], roles: Option[Seq[Role]], channels: Option[Seq[CreateGuildChannelData]], afkChannelId: Option[VoiceGuildChannelId], afkTimeout: Option[Int], systemChannelId: Option[TextGuildChannelId]) extends Product with Serializable
- name
The name of the guild
- region
The voice region for the guild
- icon
The icon to use for the guild. Must be 128x128 jpeg.
- verificationLevel
The verification level to use for the guild.
- defaultMessageNotifications
The notification level to use for the guild.
- roles
The roles for the new guild. Note, here the snowflake is just a placeholder.
- channels
The channels for the new guild.
- afkChannelId
The id for the AFK channel
- afkTimeout
The timeout in seconds until users are moved to the AFK channel.
- systemChannelId
The id of the system channel.
- case class CreateGuildEmoji(guildId: GuildId, params: CreateGuildEmojiData, reason: Option[String] = None) extends ReasonRequest[CreateGuildEmoji, CreateGuildEmojiData, RawEmoji, Emoji] with Product with Serializable
Create a new emoji for a guild.
- case class CreateGuildEmojiData(name: String, image: ImageData, roles: Seq[RoleId]) extends Product with Serializable
- name
The name of the emoji.
- image
The image data for the emoji.
- roles
Whitelist of roles that can use this emoji.
- case class CreateGuildIntegration(guildId: GuildId, params: CreateGuildIntegrationData) extends NoResponseRequest[CreateGuildIntegrationData] with Product with Serializable
Attach an integration to a guild.
- case class CreateGuildIntegrationData(type: String, id: IntegrationId) extends Product with Serializable
- id
The integration id
- case class CreateGuildRole(guildId: GuildId, params: CreateGuildRoleData, reason: Option[String] = None) extends ReasonRequest[CreateGuildRole, CreateGuildRoleData, RawRole, Role] with Product with Serializable
Create a new role in a guild.
- case class CreateGuildRoleData(name: Option[String] = None, permissions: Option[Permission] = None, color: Option[Int] = None, hoist: Option[Boolean] = None, mentionable: Option[Boolean] = None) extends Product with Serializable
- name
The name of the role.
- permissions
The permissions this role has.
- color
The color of the role.
- hoist
If this role is shown in the right sidebar.
- mentionable
If this role is mentionable.
- case class CreateMessage(channelId: TextChannelId, params: CreateMessageData) extends RESTRequest[CreateMessageData, RawMessage, Message] with Product with Serializable
Create a message in a channel.
- case class CreateMessageData(content: String = "", nonce: Option[RawSnowflake] = None, tts: Boolean = false, files: Seq[CreateMessageFile] = Seq.empty, embed: Option[OutgoingEmbed] = None, allowedMentions: AllowedMention = AllowedMention.all) extends Product with Serializable
- content
The content of the message.
- nonce
A nonce used for optimistic message sending.
- tts
If this is a text-to-speech message.
- files
The files to send with this message. You can reference these files in the embed using
attachment://filename
.- embed
An embed to send with this message.
- sealed trait CreateMessageFile extends AnyRef
- case class CreateReaction(channelId: TextChannelId, messageId: MessageId, emoji: String) extends NoParamsResponseRequest with Product with Serializable
Create a reaction for a message.
Create a reaction for a message.
- emoji
The emoji to send.
- case class CreateWebhook(channelId: TextChannelId, params: CreateWebhookData, reason: Option[String] = None) extends NoNiceResponseReasonRequest[CreateWebhook, CreateWebhookData, Webhook] with Product with Serializable
Create a new webhook in a channel.
- case class CreateWebhookData(name: String, avatar: Option[ImageData]) extends Product with Serializable
- name
Name of the webhook
- avatar
The avatar data of the webhook
- case class DeleteAllReactions(channelId: TextChannelId, messageId: MessageId) extends NoParamsResponseRequest with Product with Serializable
Clear all reactions from a message.
- case class DeleteAllReactionsForEmoji(channelId: TextChannelId, messageId: MessageId, emoji: String) extends NoParamsResponseRequest with Product with Serializable
Clear all reactions for a single emoji from a message.
- case class DeleteChannelPermission(channelId: GuildChannelId, overwriteId: UserOrRoleId, reason: Option[String] = None) extends NoParamsResponseReasonRequest[DeleteChannelPermission] with Product with Serializable
Delete a permission overwrite for a channel.
- case class DeleteCloseChannel(channelId: ChannelId, reason: Option[String] = None) extends NoParamsReasonRequest[DeleteCloseChannel, RawChannel, Option[Channel]] with Product with Serializable
Delete a guild channel, or close a DM channel.
- case class DeleteGuild(guildId: GuildId) extends NoParamsResponseRequest with Product with Serializable
Delete a guild.
Delete a guild. Must be the owner.
- case class DeleteGuildEmoji(emojiId: EmojiId, guildId: GuildId, reason: Option[String] = None) extends NoParamsResponseReasonRequest[DeleteGuildEmoji] with Product with Serializable
Delete an emoji from a guild.
- case class DeleteGuildIntegration(guildId: GuildId, integrationId: IntegrationId) extends NoParamsResponseRequest with Product with Serializable
Delete an integration.
- case class DeleteGuildRole(guildId: GuildId, roleId: RoleId, reason: Option[String] = None) extends NoParamsResponseReasonRequest[DeleteGuildRole] with Product with Serializable
Delete a role in a guild.
- case class DeleteInvite(inviteCode: String, reason: Option[String] = None) extends NoParamsNiceResponseReasonRequest[DeleteInvite, Invite] with Product with Serializable
Delete an invite.
- case class DeleteMessage(channelId: TextChannelId, messageId: MessageId, reason: Option[String] = None) extends NoParamsResponseReasonRequest[DeleteMessage] with Product with Serializable
Delete a message
- case class DeleteOwnReaction(channelId: TextChannelId, messageId: MessageId, emoji: String) extends NoParamsResponseRequest with Product with Serializable
Delete the clients reaction to a message.
- case class DeletePinnedChannelMessages(channelId: TextChannelId, messageId: MessageId) extends NoParamsResponseRequest with Product with Serializable
Delete a pinned message in a channel.
- case class DeleteUserReaction(channelId: TextChannelId, messageId: MessageId, emoji: String, userId: UserId) extends NoParamsResponseRequest with Product with Serializable
Delete the reaction of another user to a message.
- case class DeleteWebhook(id: SnowflakeType[Webhook], reason: Option[String] = None) extends NoParamsResponseReasonRequest[DeleteWebhook] with Product with Serializable
Delete a webhook.
- case class DeleteWebhookWithToken(id: SnowflakeType[Webhook], token: String, reason: Option[String] = None) extends NoParamsResponseReasonRequest[DeleteWebhookWithToken] with Product with Serializable
Delete a webhook with a token.
Delete a webhook with a token. Doesn't require authentication
- class DroppedRequestException extends Exception
An exception that signals that a request was dropped.
- case class EditChannelPermissions(channelId: GuildChannelId, overwriteId: UserOrRoleId, params: EditChannelPermissionsData, reason: Option[String] = None) extends NoResponseReasonRequest[EditChannelPermissions, EditChannelPermissionsData] with Product with Serializable
Edit a permission overwrite for a channel.
- case class EditChannelPermissionsData(allow: Permission, deny: Permission, type: PermissionOverwriteType) extends Product with Serializable
- allow
The permissions to allow.
- deny
The permissions to deny.
- case class EditMessage(channelId: TextChannelId, messageId: MessageId, params: EditMessageData) extends RESTRequest[EditMessageData, RawMessage, Message] with Product with Serializable
Edit an existing message
- case class EditMessageData(content: JsonOption[String] = JsonUndefined, embed: JsonOption[OutgoingEmbed] = JsonUndefined, flags: JsonOption[MessageFlags] = JsonUndefined) extends Product with Serializable
- content
The content of the new message
- embed
The embed of the new message
- sealed trait FailedRequest extends RequestAnswer[Nothing]
A failed request.
- trait FlattenUnflatten[In, Out] extends AnyRef
- case class GetApplicationAssetImage(desiredSize: Int, format: ImageFormat, applicationId: RawSnowflake, assetId: String) extends ImageRequest with Product with Serializable
Get the asset of an application.
Get the asset of an application. Allowed formats are PNG, JPEG and WebP.
- case class GetApplicationIconImage(desiredSize: Int, format: ImageFormat, applicationId: RawSnowflake, iconHash: String) extends ImageRequest with Product with Serializable
Get the icon of an application.
Get the icon of an application. Allowed formats are PNG, JPEG and WebP.
- case class GetChannel(channelId: ChannelId) extends NoParamsRequest[RawChannel, Option[Channel]] with Product with Serializable
Get a channel by id.
- case class GetChannelInvites(channelId: GuildChannelId) extends NoParamsNiceResponseRequest[Seq[InviteWithMetadata]] with Product with Serializable
Get all invites for this channel.
Get all invites for this channel. Can only be used on guild channels.
- case class GetChannelMessage(channelId: TextChannelId, messageId: MessageId) extends NoParamsRequest[RawMessage, Message] with Product with Serializable
Get a specific message in a channel.
- case class GetChannelMessages(channelId: TextChannelId, query: GetChannelMessagesData) extends NoParamsRequest[Seq[RawMessage], Seq[Message]] with Product with Serializable
Get the messages in a channel.
- case class GetChannelMessagesData(around: Option[MessageId] = None, before: Option[MessageId] = None, after: Option[MessageId] = None, limit: Option[Int] = None) extends Product with Serializable
- around
Get messages around this message id.
- before
Get messages before this message id.
- after
Get messages after this message id.
- limit
The max amount of messages to return. The default is 50.
- case class GetChannelWebhooks(channelId: TextChannelId) extends NoParamsNiceResponseRequest[Seq[Webhook]] with Product with Serializable
Get the webhooks in a channel.
- case class GetCurrentUserGuilds(queryParams: GetCurrentUserGuildsData) extends NoParamsNiceResponseRequest[Seq[GetUserGuildsGuild]] with Product with Serializable
Get the guilds the client user is in.
- case class GetCurrentUserGuildsData(before: Option[GuildId] = None, after: Option[GuildId] = None, limit: Option[Int] = None) extends Product with Serializable
- before
Get guilds before this id.
- after
Get guilds after this id.
- limit
The max amount of guilds to return.
- case class GetCustomEmojiImage(desiredSize: Int, format: ImageFormat, emojiId: EmojiId) extends ImageRequest with Product with Serializable
Get the image of a custom emoji.
Get the image of a custom emoji. Always returns a PNG.
- case class GetDefaultUserAvatarImage(desiredSize: Int, discriminator: Int) extends ImageRequest with Product with Serializable
Get the default avatar of a user.
Get the default avatar of a user. Always returns a PNG.
- case class GetDiscoverySplashImage(desiredSize: Int, format: ImageFormat, guildId: GuildId, splashHash: String) extends ImageRequest with Product with Serializable
- case class GetGuild(guildId: GuildId) extends NoParamsRequest[RawGuild, Option[Guild]] with Product with Serializable
Get a guild by id.
- case class GetGuildAuditLog(guildId: GuildId, queryParams: GetGuildAuditLogData) extends NoParamsNiceResponseRequest[AuditLog] with Product with Serializable
Get an audit log for a given guild.
- case class GetGuildAuditLogData(userId: Option[UserId] = None, actionType: Option[AuditLogEvent] = None, before: Option[RawSnowflake] = None, limit: Option[Int] = None) extends Product with Serializable
- case class GetGuildBan(guildId: GuildId, userId: UserId) extends NoParamsRequest[RawBan, Ban] with Product with Serializable
Get the ban object for a specific member in a guild.
- case class GetGuildBannerImage(desiredSize: Int, format: ImageFormat, guildId: GuildId, bannerHash: String) extends ImageRequest with Product with Serializable
- case class GetGuildBans(guildId: GuildId) extends NoParamsRequest[Seq[RawBan], Seq[Ban]] with Product with Serializable
Get all the bans for this guild.
- case class GetGuildChannels(guildId: GuildId) extends NoParamsRequest[Seq[RawChannel], Seq[Option[GuildChannel]]] with Product with Serializable
Get all the channels for a guild.
- case class GetGuildEmbed(guildId: GuildId) extends NoParamsNiceResponseRequest[GuildEmbed] with Product with Serializable
Get the guild embed for a guild.
- case class GetGuildEmoji(emojiId: EmojiId, guildId: GuildId) extends NoParamsRequest[RawEmoji, Emoji] with Product with Serializable
Get an emoji in a guild by id.
- case class GetGuildIconImage(desiredSize: Int, format: ImageFormat, guildId: GuildId, iconHash: String) extends ImageRequest with Product with Serializable
Get a guild icon image.
Get a guild icon image. Allowed formats are PNG, JPEG and WebP.
- case class GetGuildIntegrations(guildId: GuildId) extends NoParamsNiceResponseRequest[Seq[Integration]] with Product with Serializable
Get the integrations for this guild.
- case class GetGuildInvites(guildId: GuildId) extends NoParamsNiceResponseRequest[Seq[InviteWithMetadata]] with Product with Serializable
Get the invites for this guild.
- case class GetGuildMember(guildId: GuildId, userId: UserId) extends GuildMemberRequest[NotUsed] with Product with Serializable
Get a guild member by id.
- case class GetGuildPreview(guildId: GuildId) extends NoParamsNiceResponseRequest[GuildPreview] with Product with Serializable
Get a guild preview by it's id.
Get a guild preview by it's id. Only usable for public guilds.
- case class GetGuildPruneCount(guildId: GuildId, queryParams: GuildPruneCountData) extends NoParamsNiceResponseRequest[GuildPruneCountResponse] with Product with Serializable
Check how many members would be removed if a prune was started now.
- case class GetGuildRoles(guildId: GuildId) extends RESTRequest[NotUsed, Seq[RawRole], Seq[Role]] with Product with Serializable
Get all the roles in a guild.
- case class GetGuildSplashImage(desiredSize: Int, format: ImageFormat, guildId: GuildId, splashHash: String) extends ImageRequest with Product with Serializable
Get a guild splash image.
Get a guild splash image. Allowed formats are PNG, JPEG and WebP.
- case class GetGuildVanityUrl(guildId: GuildId) extends NoParamsNiceResponseRequest[VanityUrlResponse] with Product with Serializable
Get a partial invite object for guilds with that feature enabled.
- case class GetGuildVoiceRegions(guildId: GuildId) extends NoParamsNiceResponseRequest[Seq[VoiceRegion]] with Product with Serializable
Get the voice regions for this guild.
- case class GetGuildWebhooks(guildId: GuildId) extends NoParamsNiceResponseRequest[Seq[Webhook]] with Product with Serializable
Get the webhooks in a guild.
- case class GetGuildWidgetImage(guildId: GuildId, style: WidgetImageStyle = WidgetImageStyle.Shield) extends ImageRequest with Product with Serializable
Get the widget image for a specific guild.
Get the widget image for a specific guild.
- guildId
The guild to get the widget for.
- style
Which style should be gotten.
- case class GetInvite(inviteCode: String, withCounts: Boolean = false) extends NoParamsNiceResponseRequest[Invite] with Product with Serializable
Get an invite for a given invite code.
Get an invite for a given invite code.
- withCounts
If the returned invite object should return approximate counts for members and people online.
- case class GetPinnedMessages(channelId: TextChannelId) extends NoParamsRequest[Seq[RawMessage], Seq[Message]] with Product with Serializable
Get all the pinned messages in a channel.
- case class GetReactions(channelId: TextChannelId, messageId: MessageId, emoji: String, queryParams: GetReactionsData) extends NoParamsNiceResponseRequest[Seq[User]] with Product with Serializable
Get all the users that have reacted with an emoji for a message.
- case class GetReactionsData(before: Option[UserId] = None, after: Option[UserId] = None, limit: Option[Int] = None) extends Product with Serializable
- before
Get users before this user.
- after
Get users after this user.
- limit
The max amount of users to return. Defaults to 25.
- case class GetTeamIconImage(desiredSize: Int, format: ImageFormat, teamId: SnowflakeType[Team], teamIcon: String) extends ImageRequest with Product with Serializable
Get the icon for a team
Get the icon for a team
- teamId
The id of the team to get the icon for
- teamIcon
The icon identifier
- case class GetUser(userId: UserId) extends NoParamsNiceResponseRequest[User] with Product with Serializable
Get a user by id.
- case class GetUserAvatarImage(desiredSize: Int, format: ImageFormat, userId: UserId, avatarHash: String) extends ImageRequest with Product with Serializable
Get the image of a user avatar.
Get the image of a user avatar. Allowed formats are PNG, JPEG, WebP and GIF.
- case class GetUserGuildsGuild(id: GuildId, name: String, icon: Option[String], owner: Boolean, permissions: Permission) extends Product with Serializable
- case class GetWebhook(id: SnowflakeType[Webhook]) extends NoParamsNiceResponseRequest[Webhook] with Product with Serializable
Get a webhook by id.
- case class GetWebhookWithToken(id: SnowflakeType[Webhook], token: String) extends NoParamsNiceResponseRequest[Webhook] with Product with Serializable
Get a webhook by id with a token.
Get a webhook by id with a token. Doesn't require authentication.
- trait GuildMemberRequest[Params] extends RESTRequest[Params, RawGuildMember, GuildMember]
- case class GuildPruneCountData(days: Int) extends Product with Serializable
- days
The amount of days to prune for.
- case class GuildPruneCountResponse(pruned: Int) extends Product with Serializable
- pruned
The number of members that would be removed.
- class HttpException extends Exception
An exception for Http errors.
- class HttpJsonDecodeException extends Exception
An exception thrown when parsing JSON if something goes wrong.
- trait ImageRequest extends Request[ByteString]
Base traits for all traits to get images
- case class LeaveGuild(guildId: GuildId) extends NoParamsResponseRequest with Product with Serializable
Leave a guild.
- case class ListGuildEmojis(guildId: GuildId) extends RESTRequest[NotUsed, Seq[RawEmoji], Seq[Emoji]] with Product with Serializable
Get all the emojis for this guild.
- case class ListGuildMembers(guildId: GuildId, queryParams: ListGuildMembersData) extends NoParamsRequest[Seq[RawGuildMember], Seq[GuildMember]] with Product with Serializable
Get all the guild members in this guild.
- case class ListGuildMembersData(limit: Option[Int] = None, after: Option[UserId] = None) extends Product with Serializable
- limit
The max amount of members to get
- after
Get userIds after this id
- trait LowPriorityFlatten extends AnyRef
- sealed trait MaybeRequest[+Data] extends AnyRef
Base trait for all requests before they enter the network flow.
Base trait for all requests before they enter the network flow.
- Data
The response type for the request.
- case class ModifyBotUsersNick(guildId: GuildId, params: ModifyBotUsersNickData, reason: Option[String] = None) extends NoNiceResponseReasonRequest[ModifyBotUsersNick, ModifyBotUsersNickData, String] with Product with Serializable
Modify the clients nickname.
- case class ModifyBotUsersNickData(nick: String) extends Product with Serializable
- case class ModifyChannel(channelId: ChannelId, params: ModifyChannelData, reason: Option[String] = None) extends ReasonRequest[ModifyChannel, ModifyChannelData, RawChannel, Option[Channel]] with Product with Serializable
Update the settings of a channel.
Update the settings of a channel.
- channelId
The channel to update.
- case class ModifyChannelData(name: JsonOption[String] = JsonUndefined, position: JsonOption[Int] = JsonUndefined, topic: JsonOption[String] = JsonUndefined, nsfw: JsonOption[Boolean] = JsonUndefined, rateLimitPerUser: JsonOption[Int] = JsonUndefined, bitrate: JsonOption[Int] = JsonUndefined, userLimit: JsonOption[Int] = JsonUndefined, permissionOverwrites: JsonOption[Seq[PermissionOverwrite]] = JsonUndefined, parentId: JsonOption[SnowflakeType[GuildCategory]] = JsonUndefined) extends Product with Serializable
- name
New name of the channel.
- position
New position of the channel.
- topic
The new channel topic for text channels.
- nsfw
If the channel is NSFW for text channels.
- rateLimitPerUser
The new user ratelimit for guild text channels.
- bitrate
The new channel bitrate for voice channels.
- userLimit
The new user limit for voice channel.
- permissionOverwrites
The new channel permission overwrites.
- parentId
The new category id of the channel.
- case class ModifyCurrentUser(params: ModifyCurrentUserData) extends NoNiceResponseRequest[ModifyCurrentUserData, User] with Product with Serializable
Modify the current user.
- case class ModifyCurrentUserData(username: Option[String], avatar: Option[ImageData]) extends Product with Serializable
- case class ModifyGuild(guildId: GuildId, params: ModifyGuildData, reason: Option[String] = None) extends ReasonRequest[ModifyGuild, ModifyGuildData, RawGuild, Option[Guild]] with Product with Serializable
Modify an existing guild.
- case class ModifyGuildChannelPositions(guildId: GuildId, params: Seq[ModifyGuildChannelPositionsData], reason: Option[String] = None) extends NoResponseReasonRequest[ModifyGuildChannelPositions, Seq[ModifyGuildChannelPositionsData]] with Product with Serializable
Modify the positions of several channels.
- case class ModifyGuildChannelPositionsData(id: GuildChannelId, position: Int) extends Product with Serializable
- id
The channel id
- position
It's new position
- case class ModifyGuildData(name: Option[String] = None, region: Option[String] = None, verificationLevel: Option[VerificationLevel] = None, defaultMessageNotifications: Option[NotificationLevel] = None, explicitContentFilter: Option[FilterLevel] = None, afkChannelId: Option[VoiceGuildChannelId] = None, afkTimeout: Option[Int] = None, icon: Option[ImageData] = None, ownerId: Option[UserId] = None, splash: Option[ImageData] = None, banner: Option[ImageData] = None, systemChannelId: Option[TextGuildChannelId] = None) extends Product with Serializable
- name
The new name of the guild
- region
The new voice region for the guild
- verificationLevel
The new verification level to use for the guild.
- defaultMessageNotifications
The new notification level to use for the guild.
- afkChannelId
The new afk channel of the guild.
- afkTimeout
The new afk timeout in seconds for the guild.
- icon
The new icon to use for the guild. Must be 128x128 jpeg.
- ownerId
Transfer ownership of this guild. Must be the owner.
- splash
The new splash for the guild. Must be 128x128 jpeg. VIP only.
- banner
The new banner for the guild. Must be 128x128 jpeg. VIP only.
- systemChannelId
The new channel which system messages will be sent to.
- case class ModifyGuildEmbed(guildId: GuildId, params: GuildEmbed) extends NoNiceResponseRequest[GuildEmbed, GuildEmbed] with Product with Serializable
Modify a guild embed for a guild.
- case class ModifyGuildEmoji(emojiId: EmojiId, guildId: GuildId, params: ModifyGuildEmojiData, reason: Option[String] = None) extends ReasonRequest[ModifyGuildEmoji, ModifyGuildEmojiData, RawEmoji, Emoji] with Product with Serializable
Modify an existing emoji.
- case class ModifyGuildEmojiData(name: String, roles: Seq[RoleId]) extends Product with Serializable
- name
The new emoji name.
- roles
Whitelist of roles that can use this emoji.
- case class ModifyGuildIntegration(guildId: GuildId, integrationId: IntegrationId, params: ModifyGuildIntegrationData) extends NoResponseRequest[ModifyGuildIntegrationData] with Product with Serializable
Modify an existing integration for a guild.
- case class ModifyGuildIntegrationData(expireBehavior: IntegrationExpireBehavior, expireGracePeriod: Int, enableEmoticons: Boolean) extends Product with Serializable
- expireBehavior
The behavior of expiring subscribers.
- expireGracePeriod
The grace period before expiring subscribers.
- enableEmoticons
If emojis should be synced for this integration. (Twitch only)
- case class ModifyGuildMember(guildId: GuildId, userId: UserId, params: ModifyGuildMemberData, reason: Option[String] = None) extends NoResponseReasonRequest[ModifyGuildMember, ModifyGuildMemberData] with Product with Serializable
Modify a guild member.
- case class ModifyGuildMemberData(nick: JsonOption[String] = JsonUndefined, roles: JsonOption[Seq[RoleId]] = JsonUndefined, mute: JsonOption[Boolean] = JsonUndefined, deaf: JsonOption[Boolean] = JsonUndefined, channelId: JsonOption[VoiceGuildChannelId] = JsonUndefined) extends Product with Serializable
- nick
The nickname to give to the user.
- roles
The roles to give to the user.
- mute
If the user should be muted. Will return an error if the user is not in a voice channel.
- deaf
If the user should be deafened. Will return an error if the user is not in a voice channel.
- channelId
The id of the channel to move the user to.
- case class ModifyGuildRole(guildId: GuildId, roleId: RoleId, params: ModifyGuildRoleData, reason: Option[String] = None) extends ReasonRequest[ModifyGuildRole, ModifyGuildRoleData, RawRole, Role] with Product with Serializable
Modify a role.
- case class ModifyGuildRoleData(name: Option[String] = None, permissions: Option[Permission] = None, color: Option[Int] = None, hoist: Option[Boolean] = None, mentionable: Option[Boolean] = None) extends Product with Serializable
- name
The new name of the role.
- permissions
The new permissions this role has.
- color
The new color of the role.
- hoist
If this role is shown in the right sidebar.
- mentionable
If this role is mentionable.
- case class ModifyGuildRolePositions(guildId: GuildId, params: Seq[ModifyGuildRolePositionsData], reason: Option[String] = None) extends ReasonRequest[ModifyGuildRolePositions, Seq[ModifyGuildRolePositionsData], Seq[RawRole], Seq[Role]] with Product with Serializable
Modify the positions of several roles.
- case class ModifyGuildRolePositionsData(id: RoleId, position: Int) extends Product with Serializable
- id
The role id.
- position
The new position of the role.
- case class ModifyWebhook(id: SnowflakeType[Webhook], params: ModifyWebhookData, reason: Option[String] = None) extends NoNiceResponseReasonRequest[ModifyWebhook, ModifyWebhookData, Webhook] with Product with Serializable
Modify a webhook.
- case class ModifyWebhookData(name: Option[String] = None, avatar: Option[ImageData] = None, channelId: Option[TextGuildChannelId] = None) extends Product with Serializable
- name
Name of the webhook.
- avatar
The avatar data of the webhook.
- channelId
The channel this webhook should be moved to.
- case class ModifyWebhookWithToken(id: SnowflakeType[Webhook], token: String, params: ModifyWebhookData, reason: Option[String] = None) extends NoNiceResponseReasonRequest[ModifyWebhookWithToken, ModifyWebhookData, Webhook] with Product with Serializable
Modify a webhook with a token.
Modify a webhook with a token. Doesn't require authentication
- trait NoNiceResponseReasonRequest[Self <: NoNiceResponseReasonRequest[Self, Params, Response], Params, Response] extends ReasonRequest[Self, Params, Response, Response] with NoNiceResponseRequest[Params, Response]
A request, with an audit log reason, where the response type and the nice response type are the same.
- trait NoNiceResponseRequest[Params, Response] extends RESTRequest[Params, Response, Response]
A request where the response type and the nice response type are the same.
- trait NoParamsNiceResponseReasonRequest[Self <: NoParamsNiceResponseReasonRequest[Self, Response], Response] extends NoParamsReasonRequest[Self, Response, Response] with NoNiceResponseReasonRequest[Self, NotUsed, Response]
A request, with an audit log reason, that takes no params, and where the response type and the nice response type are the same.
- trait NoParamsNiceResponseRequest[Response] extends NoParamsRequest[Response, Response] with NoNiceResponseRequest[NotUsed, Response]
A request that takes no params, and where the response type and the nice response type are the same.
- trait NoParamsReasonRequest[Self <: NoParamsReasonRequest[Self, RawResponse, NiceResponse], RawResponse, NiceResponse] extends ReasonRequest[Self, NotUsed, RawResponse, NiceResponse] with NoParamsRequest[RawResponse, NiceResponse]
A request that takes no params with an audit log reason.
- trait NoParamsRequest[RawResponse, NiceResponse] extends RESTRequest[NotUsed, RawResponse, NiceResponse]
A request that takes no params.
- trait NoParamsResponseReasonRequest[Self <: NoParamsResponseReasonRequest[Self]] extends NoParamsReasonRequest[Self, NotUsed, NotUsed] with NoResponseReasonRequest[Self, NotUsed]
A request that has neither params nor a response with a reason.
- trait NoParamsResponseRequest extends NoParamsRequest[NotUsed, NotUsed] with NoResponseRequest[NotUsed]
A request that has neither params nor a response.
- trait NoResponseReasonRequest[Self <: NoResponseReasonRequest[Self, Params], Params] extends NoNiceResponseReasonRequest[Self, Params, NotUsed] with NoResponseRequest[Params]
A request, with an audit log reason, that doesn't have a response.
- trait NoResponseRequest[Params] extends NoNiceResponseRequest[Params, NotUsed]
A request that doesn't have a response.
- trait RESTRequest[Params, RawResponse, NiceResponse] extends BaseRESTRequest[RawResponse, NiceResponse]
A simpler, request trait where the params are defined explicitly and converted to json.
A simpler, request trait where the params are defined explicitly and converted to json.
- Params
The json parameters of the request.
- class RatelimitException extends Exception
An exception that signals than an endpoint is ratelimited.
- case class RatelimitInfo(tilReset: FiniteDuration, tilRatelimit: Int, bucketLimit: Int, bucket: String) extends Product with Serializable
Misc info needed to handle ratelimits correctly.
Misc info needed to handle ratelimits correctly.
- tilReset
The amount of time until this endpoint ratelimit is reset. Minus if unknown.
- tilRatelimit
The amount of requests that can be made until this endpoint is ratelimited. -1 if unknown.
- bucketLimit
The total amount of requests that can be sent to this to this endpoint until a ratelimit kicks in. -1 if unknown.
- bucket
The ratelimit bucket for this request. Does not include any parameters.
- class Ratelimiter extends AbstractBehavior[Command]
- trait ReasonRequest[Self <: ReasonRequest[Self, Params, RawResponse, NiceResponse], Params, RawResponse, NiceResponse] extends RESTRequest[Params, RawResponse, NiceResponse]
A complex REST request with an audit log reason.
- case class RemoveGuildBan(guildId: GuildId, userId: UserId, reason: Option[String] = None) extends NoParamsResponseReasonRequest[RemoveGuildBan] with Product with Serializable
Unban a user from a guild.
- case class RemoveGuildMember(guildId: GuildId, userId: UserId, reason: Option[String] = None) extends NoParamsResponseReasonRequest[RemoveGuildMember] with Product with Serializable
Kicks a guild member.
- case class RemoveGuildMemberRole(guildId: GuildId, userId: UserId, roleId: RoleId) extends NoParamsResponseRequest with Product with Serializable
Remove a role from a guild member.
- trait Request[+Data] extends MaybeRequest[Data]
Base super simple trait for all HTTP requests in AckCord.
Base super simple trait for all HTTP requests in AckCord.
- Data
The parsed response type.
- sealed trait RequestAnswer[+Data] extends AnyRef
Sent as a response to a request.
- case class RequestDropped(route: RequestRoute, identifier: UUID) extends MaybeRequest[Nothing] with FailedRequest with Product with Serializable
A request that was dropped before it entered the network, most likely because of timing out while waiting for ratelimits.
- case class RequestError(e: Throwable, route: RequestRoute, identifier: UUID) extends FailedRequest with Product with Serializable
A request that failed for some other reason.
- case class RequestRatelimited(global: Boolean, ratelimitInfo: RatelimitInfo, route: RequestRoute, identifier: UUID) extends FailedRequest with Product with Serializable
A request that did not succeed because of a ratelimit.
- case class RequestResponse[+Data](data: Data, ratelimitInfo: RatelimitInfo, route: RequestRoute, identifier: UUID) extends RequestAnswer[Data] with Product with Serializable
A successful request response.
- case class RequestRoute(uriWithMajor: String, uriWithoutMajor: String, uri: Uri, method: HttpMethod) extends Product with Serializable
Used by requests for specifying an uri to send to, together with a method to use.
Used by requests for specifying an uri to send to, together with a method to use.
- uriWithMajor
A string containing the route without any minor parameters filled in
- uriWithoutMajor
A string containing the route without any major or minor parameters filled in
- uri
The uri to send to
- method
The method to use
- case class Requests(credentials: HttpCredentials, ratelimitActor: ActorRef[Command], millisecondPrecision: Boolean = true, relativeTime: Boolean = false, parallelism: Int = 4, maxRetryCount: Int = 3, bufferSize: Int = 32, overflowStrategy: OverflowStrategy = OverflowStrategy.backpressure, maxAllowedWait: FiniteDuration = 2.minutes, alsoProcessRequests: Sink[(Request[Data], RequestAnswer[Data]) forSome {type Data}, NotUsed] = Sink.ignore.mapMaterializedValue(_ => NotUsed))(implicit system: ActorSystem[Nothing]) extends Product with Serializable
A class holding all the relevant information to create a request stream.
A class holding all the relevant information to create a request stream. Also contains some convenience methods for common operations with requests.
This should be instantiated once per bot, and shared between shards.
- class RequestsHelper extends AnyRef
A small layer on top of Requests for use in high level code.
- final class Retry-After extends ModeledCustomHeader[Retry-After]
- case class SyncGuildIntegration(guildId: GuildId, integrationId: IntegrationId) extends NoParamsResponseRequest with Product with Serializable
Sync an integration.
- case class TriggerTypingIndicator(channelId: TextChannelId) extends NoParamsResponseRequest with Product with Serializable
Triggers a typing indicator in a channel.
- case class VanityUrlResponse(code: String) extends Product with Serializable
- final class X-Audit-Log-Reason extends ModeledCustomHeader[X-Audit-Log-Reason]
- final class X-RateLimit-Bucket extends ModeledCustomHeader[X-RateLimit-Bucket]
- final class X-RateLimit-Limit extends ModeledCustomHeader[X-RateLimit-Limit]
- final class X-RateLimit-Precision extends ModeledCustomHeader[X-RateLimit-Precision]
- final class X-RateLimit-Remaining extends ModeledCustomHeader[X-RateLimit-Remaining]
- final class X-RateLimit-Reset extends ModeledCustomHeader[X-RateLimit-Reset]
- final class X-RateLimit-Reset-After extends ModeledCustomHeader[X-RateLimit-Reset-After]
- final class X-Ratelimit-Global extends ModeledCustomHeader[X-Ratelimit-Global]
Deprecated Type Members
- case class CreateGroupDm(params: CreateGroupDMData) extends RESTRequest[CreateGroupDMData, RawChannel, Option[GroupDMChannel]] with Product with Serializable
Create a group DM.
Create a group DM. By default the client is limited to 10 active group DMs.
- Annotations
- @deprecated
- Deprecated
(Since version 0.13) Deprecated by Discord
Value Members
- def hasPermissionsChannel(channelId: ChannelId, permissions: Permission)(implicit c: CacheSnapshot): Boolean
Check if a client has the needed permissions in a channel
Check if a client has the needed permissions in a channel
- channelId
The channel to check for
- permissions
The needed permissions
- c
The cache
- def hasPermissionsGuild(guildId: GuildId, permissions: Permission)(implicit c: CacheSnapshot): Boolean
Check if a client has the needed permissions in a guild
Check if a client has the needed permissions in a guild
- guildId
The guild to check for
- permissions
The needed permissions
- c
The cache
- object AllowedMention extends Serializable
- object AllowedMentionTypes extends StringEnum[AllowedMentionTypes] with StringCirceEnumWithUnknown[AllowedMentionTypes]
- object BeginGuildPrune extends Serializable
- object BotAuthentication
- object BulkDeleteMessages extends Serializable
- object CreateChannelInvite extends Serializable
- object CreateDm extends Serializable
- object CreateGuildBan extends Serializable
- object CreateGuildChannelData extends Serializable
- object CreateGuildEmoji extends Serializable
- object CreateMessage extends Serializable
- object CreateMessageData extends Serializable
- object CreateMessageFile
- object EditChannelPermissions extends Serializable
- object EditMessage extends Serializable
- object EditMessageData extends Serializable
- object FlattenUnflatten extends LowPriorityFlatten
- object GetChannelMessages extends Serializable
- case object GetCurrentUser extends NoParamsNiceResponseRequest[User] with Product with Serializable
Fetch the client user.
- object GetCurrentUserGuilds extends Serializable
- object GetGuildPruneCount extends Serializable
- object GetReactions extends Serializable
- case object GetUserConnections extends NoParamsNiceResponseRequest[Seq[Connection]] with Product with Serializable
Get a list of connection objects.
Get a list of connection objects. Requires the
connection
OAuth2 scope. - object ImageRequest
- object ListGuildMembers extends Serializable
- case object ListVoiceRegions extends NoParamsNiceResponseRequest[Seq[VoiceRegion]] with Product with Serializable
List all the voice regions that can be used when creating a guild.
- object ModifyBotUsersNick extends Serializable
- object ModifyChannelData extends Serializable
- object ModifyGuildEmoji extends Serializable
- object ModifyGuildMemberData extends Serializable
- object OAuth
- object Ratelimiter
- object RequestRoute extends Serializable
- object RequestStreams
- object Requests extends Serializable
- object Retry-After extends ModeledCustomHeaderCompanion[Retry-After]
- object Routes
All the routes used by AckCord
- object SupervisionStreams
- object X-Audit-Log-Reason extends ModeledCustomHeaderCompanion[X-Audit-Log-Reason]
- object X-RateLimit-Bucket extends ModeledCustomHeaderCompanion[X-RateLimit-Bucket]
- object X-RateLimit-Limit extends ModeledCustomHeaderCompanion[X-RateLimit-Limit]
- object X-RateLimit-Precision extends ModeledCustomHeaderCompanion[X-RateLimit-Precision]
- object X-RateLimit-Remaining extends ModeledCustomHeaderCompanion[X-RateLimit-Remaining]
- object X-RateLimit-Reset extends ModeledCustomHeaderCompanion[X-RateLimit-Reset]
- object X-RateLimit-Reset-After extends ModeledCustomHeaderCompanion[X-RateLimit-Reset-After]
- object X-Ratelimit-Global extends ModeledCustomHeaderCompanion[X-Ratelimit-Global]