Types

Types

This page is organized in mostly-alphabetical order. Note that Snowflake === UInt64, Optional{T} === Union{T, Missing}, Nullable{T} === Union{T, Nothing}, and OptionalNullable{T} === Union{T, Missing, Nothing}. More details here.

Most of the time, you'll receive objects of these types as return values rather than creating them yourself. However, should you wish to create your own instances from scratch, all of these types have keyword constructors. If a field value can be missing, then its keyword is optional.

A User activity. More details here.

Fields

name           :: String
type           :: ActivityType
url            :: OptionalNullable{String}
timestamps     :: Optional{ActivityTimestamps}
application_id :: Optional{Snowflake}
details        :: OptionalNullable{String}
state          :: OptionalNullable{String}
emoji          :: OptionalNullable{ActivityEmoji}
party          :: Optional{ActivityParty}
assets         :: Optional{ActivityAssets}
secrets        :: Optional{ActivitySecrets}
instance       :: Optional{Bool}
flags          :: Optional{Int}
source

The start and stop times of an Activity. More details here.

Fields

start :: Optional{DateTime}
stop  :: Optional{DateTime}
source

The current party of an Activity's player. More details here.

Fields

id   :: Optional{String}
size :: Optional{Vector{Int}}
source

Images and hover text for an Activity. More details here.

Fields

large_image :: Optional{String}
large_text  :: Optional{String}
small_image :: Optional{String}
small_text  :: Optional{String}
source

Secrets for Rich Presence joining and spectating of an Activity. More details here.

Fields

join     :: Optional{String}
spectate :: Optional{String}
match    :: Optional{String}
source

An Activity's type. Available values are AT_GAME, AT_STREAMING, AT_LISTENING, and AT_WATCHING. More details here.

source

Flags which indicate what an Activity payload contains. More details here.

source

A Message attachment. More details here.

Fields

id        :: Snowflake
filename  :: String
size      :: Int
url       :: String
proxy_url :: String
height    :: Optional{Int}
width     :: Optional{Int}
source

An audit log. More details here.

Fields

webhooks          :: Vector{Webhook}
users             :: Vector{User}
audit_log_entries :: Vector{AuditLogEntry}
source

An entry in an AuditLog. More details here.

Fields

target_id   :: Nullable{Snowflake}
changes     :: Optional{Vector{AuditLogChange}}
user_id     :: Snowflake
id          :: Snowflake
action_type :: ActionType
options     :: Optional{AuditLogOptions}
reason      :: Optional{String}
source

A change item in an AuditLogEntry.

The first type parameter is the type of new_value and old_value. The second is the type of the entity that new_value and old_value belong(ed) to.

More details here.

Fields

new_value :: Optional{T} where T
old_value :: Optional{T} where T
key       :: String
type      :: Type{U} where U
source

Optional information in an AuditLogEntry. More details here.

Fields

delete_member_days :: Optional{Int}
members_removed    :: Optional{Int}
channel_id         :: Optional{Snowflake}
count              :: Optional{Int}
id                 :: Optional{Snowflake}
type               :: Optional{OverwriteType}
role_name          :: Optional{String}
source

AuditLog action types. More details here.

source
Discord.BanType.

A User ban. More details here.

Fields

reason :: Nullable{String}
user   :: User
source

A Discord channel. More details here.

Note: The name Channel is already used, hence the prefix.

Fields

id                    :: Snowflake
type                  :: ChannelType
guild_id              :: Optional{Snowflake}
position              :: Optional{Int}
permission_overwrites :: Optional{Vector{Overwrite}}
name                  :: Optional{String}
topic                 :: OptionalNullable{String}
nsfw                  :: Optional{Bool}
last_message_id       :: OptionalNullable{Snowflake}
bitrate               :: Optional{Int}
user_limit            :: Optional{Int}
rate_limit_per_user   :: Optional{Int}
recipients            :: Optional{Vector{User}}
icon                  :: OptionalNullable{String}
owner_id              :: Optional{Snowflake}
application_id        :: Optional{Snowflake}
parent_id             :: OptionalNullable{Snowflake}
last_pin_timestamp    :: OptionalNullable{DateTime}
source

A DiscordChannel's type. Available values are CT_GUILD_TEXT, CT_DM, CT_GUILD_VOICE, CT_GROUP_DM, CT_GUILD_CATEGORY, CT_GUILD_NEWS and CT_GUILD_STORE.

source

A User connection to an external service (Twitch, YouTube, etc.). More details here.

Fields

id           :: String
name         :: String
type         :: String
revoked      :: Bool
integrations :: Vector{Integration}
source
Discord.EmbedType.

A Message embed. More details here.

Fields

title       :: Optional{String}
type        :: Optional{String}
description :: Optional{String}
url         :: Optional{String}
timestamp   :: Optional{DateTime}
color       :: Optional{Int}
footer      :: Optional{EmbedFooter}
image       :: Optional{EmbedImage}
thumbnail   :: Optional{EmbedThumbnail}
video       :: Optional{EmbedVideo}
provider    :: Optional{EmbedProvider}
author      :: Optional{EmbedAuthor}
fields      :: Optional{Vector{EmbedField}}
source

An Embed's thumbnail image information. More details here.

Fields

url       :: Optional{String}
proxy_url :: Optional{String}
height    :: Optional{Int}
width     :: Optional{Int}
source

An Embed's video information. More details here.

Fields

url    :: Optional{String}
height :: Optional{Int}
width  :: Optional{Int}
source

An Embed's image information. More details here.

Fields

url       :: Optional{String}
proxy_url :: Optional{String}
height    :: Optional{Int}
width     :: Optional{Int}
source

An Embed's provider information. More details here.

Fields

name :: Optional{String}
url  :: OptionalNullable{String}
source

An Embed's author information. More details here.

Fields

name           :: Optional{String}
url            :: Optional{String}
icon_url       :: Optional{String}
proxy_icon_url :: Optional{String}
source

An Embed's footer information. More details here.

Fields

text           :: String
icon_url       :: Optional{String}
proxy_icon_url :: Optional{String}
source

An Embed field. More details here.

Fields

name   :: String
value  :: String
inline :: Optional{Bool}
source
Discord.EmojiType.

An emoji. More details here.

Fields

id             :: Nullable{Snowflake}
name           :: String
roles          :: Optional{Vector{Snowflake}}
user           :: Optional{User}
require_colons :: Optional{Bool}
managed        :: Optional{Bool}
animated       :: Optional{Bool}
source

A Discord guild (server). Can either be an UnavailableGuild or a Guild.

source
Discord.GuildType.

A Discord guild (server). More details here.

Fields

id                            :: Snowflake
name                          :: String
icon                          :: Nullable{String}
splash                        :: OptionalNullable{String}
owner                         :: Optional{Bool}
owner_id                      :: Optional{Snowflake}
permissions                   :: Optional{Int}
region                        :: Optional{String}
afk_channel_id                :: OptionalNullable{Snowflake}
afk_timeout                   :: Optional{Int}
embed_enabled                 :: Optional{Bool}
embed_channel_id              :: OptionalNullable{Snowflake}
verification_level            :: Optional{VerificationLevel}
default_message_notifications :: Optional{MessageNotificationLevel}
explicit_content_filter       :: Optional{ExplicitContentFilterLevel}
roles                         :: Optional{Vector{Role}}
emojis                        :: Optional{Vector{Emoji}}
features                      :: Optional{Vector{String}}
mfa_level                     :: Optional{MFALevel}
application_id                :: OptionalNullable{Snowflake}
widget_enabled                :: Optional{Bool}
widget_channel_id             :: OptionalNullable{Snowflake}
system_channel_id             :: OptionalNullable{Snowflake}
joined_at                     :: Optional{DateTime}
large                         :: Optional{Bool}
unavailable                   :: Optional{Bool}
member_count                  :: Optional{Int}
max_members                   :: Optional{Int}
voice_states                  :: Optional{Vector{VoiceState}}
members                       :: Optional{Vector{Member}}
channels                      :: Optional{Vector{DiscordChannel}}
presences                     :: Optional{Vector{Presence}}
max_presences                 :: OptionalNullable{Int}
vanity_url_code               :: OptionalNullable{String}
description                   :: OptionalNullable{String}
banner                        :: OptionalNullable{String}
source

An unavailable Discord guild (server). More details here.

Fields

id          :: Snowflake
unavailable :: Optional{Bool}
source

A Guild's verification level. More details here.

source

A Guild's default message notification level. More details here.

source

A Guild's explicit content filter level. More details here.

source

A Guild's MFA level. More details here.

source

A Guild embed. More details here.

Fields

enabled    :: Bool
channel_id :: Nullable{Snowflake}
source

A Guild integration. More details here.

Fields

id                  :: Snowflake
name                :: String
type                :: String
enabled             :: Bool
syncing             :: Bool
role_id             :: Snowflake
expire_behaviour    :: Int
expire_grace_period :: Int
user                :: User
account             :: IntegrationAccount
synced_at           :: DateTime
source

An Integration account. More details here.

Fields

id   :: String
name :: String
source
Discord.InviteType.

An invite to a Guild. More details here.

Fields

code                       :: String
guild                      :: Optional{Guild}
channel                    :: DiscordChannel
approximate_presence_cound :: Optional{Int}
approximate_member_count   :: Optional{Int}
source

Metadata for an Invite. More details here.

Fields

inviter    :: User
uses       :: Int
max_uses   :: Int
max_age    :: Int
temporary  :: Bool
created_at :: DateTime
revoked    :: Bool
source
Discord.MemberType.

A Guild member. More details here.

Fields

user          :: Optional{User}
nick          :: OptionalNullable{String}
roles         :: Vector{Snowflake}
joined_at     :: DateTime
premium_since :: OptionalNullable{DateTime}
deaf          :: Bool
mute          :: Bool
source
Discord.MessageType.

A message sent to a DiscordChannel. More details here.

Fields

id               :: Snowflake
channel_id       :: Snowflake
guild_id         :: Optional{Snowflake}
author           :: Optional{User}
member           :: Optional{Member}
content          :: Optional{String}
timestamp        :: Optional{DateTime}
edited_timestamp :: OptionalNullable{DateTime}
tts              :: Optional{Bool}
mention_everyone :: Optional{Bool}
mentions         :: Optional{Vector{User}}
mention_roles    :: Optional{Vector{Snowflake}}
attachments      :: Optional{Vector{Attachment}}
embeds           :: Optional{Vector{Embed}}
reactions        :: Optional{Vector{Reaction}}
nonce            :: OptionalNullable{Snowflake}
pinned           :: Optional{Bool}
webhook_id       :: Optional{Snowflake}
type             :: Optional{MessageType}
activity         :: Optional{MessageActivity}
application      :: Optional{MessageApplication}
source

A Message activity. More details here.

Fields

type     :: MessageActivityType
party_id :: Optional{String}
source

A Rich Presence Message's application information. More details here.

Fields

id          :: Snowflake
cover_image :: Optional{String}
description :: String
icon        :: String
name        :: String
source

A Message's type. More details here.

source

A Message's activity type. More details here.

source

A permission overwrite. More details here.

Fields

id    :: Snowflake
type  :: OverwriteType
allow :: Int
deny  :: Int
source

An Overwrite's type. More details here.

source

A User's presence. More details here.

Fields

user       :: User
roles      :: Optional{Vector{Snowflake}}
game       :: Nullable{Activity}
guild_id   :: Optional{Snowflake}
status     :: PresenceStatus
activities :: Vector{Activity}
source

A User's status sent in a Presence. Available values are PS_IDLE, PS_DND, PS_ONLINE, and PS_OFFLINE. More details here.

source

A Message reaction. More details here.

Fields

count :: Int
me    :: Bool
emoji :: Emoji
source
Discord.RoleType.

A User role. More details here.

Fields

id          :: Snowflake
name        :: String
color       :: Optional{Int}
hoist       :: Optional{Bool}
position    :: Optional{Int}
permissions :: Optional{Int}
managed     :: Optional{Bool}
mentionable :: Optional{Bool}
source
Discord.UserType.

A Discord user. More details here.

Fields

id            :: Snowflake
username      :: Optional{String}
discriminator :: Optional{String}
avatar        :: OptionalNullable{String}
bot           :: Optional{Bool}
mfa_enabled   :: Optional{Bool}
locale        :: Optional{String}
verified      :: Optional{Bool}
email         :: OptionalNullable{String}
source

A region for a Guild's voice server. More details here.

Fields

id         :: String
name       :: String
vip        :: Bool
optimal    :: Bool
deprecated :: Bool
custom     :: Bool
source

A User's voice connection status. More details here.

Fields

guild_id   :: Optional{Snowflake}
channel_id :: Nullable{Snowflake}
user_id    :: Snowflake
member     :: Optional{Member}
session_id :: String
deaf       :: Bool
mute       :: Bool
self_deaf  :: Bool
self_mute  :: Bool
suppress   :: Bool
source
Discord.WebhookType.

A Webhook. More details here.

Fields

id         :: Snowflake
guild_id   :: Optional{Snowflake}
channel_id :: Snowflake
user       :: Optional{User}
name       :: Nullable{String}
avatar     :: Nullable{String}
token      :: Optional{String}
source