-
Notifications
You must be signed in to change notification settings - Fork 25
Discord Message
Erik Little edited this page Oct 17, 2016
·
1 revision
A message is represented as a DiscordMessage struct.
public struct DiscordMessage {
public let attachments: [DiscordAttachment]
public let author: DiscordUser
public let channelId: String
public let content: String
public let editedTimestamp: Date
public let embeds: [DiscordEmbed]
public let id: String
public let mentionEveryone: Bool
public let mentionRoles: [String]
public let mentions: [DiscordUser]
public let timestamp: Date
public let tts: Bool
}
Attachments are represented as a DiscordAttachment struct
public struct DiscordAttachment {
public let id: String
public let filename: String
public let height: Int?
public let proxyUrl: URL
public let size: Int
public let url: URL
public let width: Int?
}
While embeds are represented as a DiscordEmbed, along with its nested structs.
public struct DiscordEmbed {
public struct Provider {
public let name: String
public let url: URL
}
public struct Thumbnail {
public let height: Int
public let proxyUrl: URL
public let url: URL
public let width: Int
}
public let description: String
public let provider: Provider
public let thumbnail: Thumbnail
public let title: String
public let type: String
public let url: URL
}