Structures
The following structures are available globally.
-
Represents a direct message channel with another user.
See moreDeclaration
Swift
public struct DiscordDMChannel : DiscordTextChannel -
Represents a direct message channel with a group of users.
See moreDeclaration
Swift
public struct DiscordGroupDMChannel : DiscordTextChannel
-
Represents a Discord chat message.
See moreDeclaration
Swift
public struct DiscordMessage : DiscordClientHolder, ExpressibleByStringLiteral -
Represents an attachment.
See moreDeclaration
Swift
public struct DiscordAttachment -
Represents an embeded entity.
See moreDeclaration
Swift
public struct DiscordEmbed : Encodable -
Represents a file to be uploaded to Discord.
See moreDeclaration
Swift
public struct DiscordFileUpload -
Represents a message reaction.
See moreDeclaration
Swift
public struct DiscordReaction
-
Used to index into a DiscordLazyDictionary. Holds the index into the backing dictonary
See moreDeclaration
Swift
public struct DiscordLazyDictionaryIndex<K: Hashable, V> : Comparable -
A value-lazy dictionary
To store a lazy value into the dictionary:
See morevar dict = [2: 4] as DiscordLazyDictionary dict[lazy: 24] = .lazy({ 2343 + 2343 })Declaration
Swift
public struct DiscordLazyDictionary<K: Hashable, V> : ExpressibleByDictionaryLiteral, Collection
-
The stored type of a Discord Snowflake ID
See moreDeclaration
Swift
public struct Snowflake
-
A type that represents a Discord JWT.
This type conforms to
ExpressibleByStringLiteralso it can be created via string literals.For example:
let token = "Bot adfadf.adfdafdafdfa.afdaf" as DiscordTokenThe
See moreBot
prefix indicates that this token is a bot. This must included if the token is for a bot. Likewise, if the token is an OAuth token, it must be preceded byBearer
. User tokens can omit a prefix.Declaration
Swift
public struct DiscordToken : ExpressibleByStringLiteral, CustomStringConvertible
-
Represents a gateway payload. This is lowest level of the Discord API.
See moreDeclaration
Swift
public struct DiscordGatewayPayload : Encodable
-
Struct that represents shard information. Used when a client is doing manual sharding.
See moreDeclaration
Swift
public struct DiscordShardInformation
-
Represents an Emoji.
See moreDeclaration
Swift
public struct DiscordEmoji
-
Represents a guild channel.
See moreDeclaration
Swift
public struct DiscordGuildTextChannel : DiscordTextChannel, DiscordGuildChannel -
Represents a voice channel.
See moreDeclaration
Swift
public struct DiscordGuildVoiceChannel : DiscordGuildChannel -
A Category channel.
See moreDeclaration
Swift
public struct DiscordGuildChannelCategory : DiscordGuildChannel
-
Represents a guild member.
See moreDeclaration
Swift
public struct DiscordGuildMember
-
Represents a webhook.
See moreDeclaration
Swift
public struct DiscordWebhook
-
An endpoint is made up of a REST api endpoint and any major parameters in that endpoint. Ex. /channels/232184444340011009/messages and /channels/186926276592795659/messages Are considered different endpoints
See moreDeclaration
Swift
public struct DiscordRateLimitKey : Hashable
-
Represents a Discord Permission. Calculating Permissions involves bitwise operations.
See moreDeclaration
Swift
public struct DiscordPermission : OptionSet, Encodable -
Represents a permission overwrite for a channel.
The
See moreallowanddenyproperties are bit fields.Declaration
Swift
public struct DiscordPermissionOverwrite : Encodable
-
Represents a presence.
See moreDeclaration
Swift
public struct DiscordPresence -
Represents a game
See moreDeclaration
Swift
public struct DiscordActivity : Encodable -
Represents the start/end of a game.
See moreDeclaration
Swift
public struct DiscordActivityTimestamps -
Represents the party status.
See moreDeclaration
Swift
public struct DiscordParty -
Represents presence assets.
See moreDeclaration
Swift
public struct DiscordActivityAssets -
Used to send updates to Discord about our presence.
See moreDeclaration
Swift
public struct DiscordPresenceUpdate : Encodable
-
Represents a Discord role.
See moreDeclaration
Swift
public struct DiscordRole : Encodable, Equatable
-
Represents a user guild.
See moreDeclaration
Swift
public struct DiscordUserGuild
-
A struct that is used to configure the high-level functions of a VoiceEngine
See moreDeclaration
Swift
public struct DiscordVoiceEngineConfiguration
-
Represents the information sent in a VoiceServerUpdate.
See moreDeclaration
Swift
public struct DiscordVoiceServerInformation
-
Represents a voice state.
See moreDeclaration
Swift
public struct DiscordVoiceState
Structures Reference