DiscordPresenceUpdate

public struct DiscordPresenceUpdate : Encodable

Used to send updates to Discord about our presence.

  • The time at which we went idle. Nil if not idle

    Declaration

    Swift

    public var afkSince: Date?
  • The game we are currently playing. Nil if not playing a game.

    Declaration

    Swift

    public var game: DiscordActivity?
  • The status for this update.

    Declaration

    Swift

    public var status: DiscordPresenceStatus
  • Creates a new DiscordPresenceUpdate

    Declaration

    Swift

    public init(game: DiscordActivity?, status: DiscordPresenceStatus = .online, afkSince: Date? = nil)

    Parameters

    game

    The game we are currently playing. Nil if not playing a game

    status

    The current status

    afkSince

    The time the user went afk. Nil if the user is not afk

  • Declaration

    Swift

    public func encode(to encoder: Encoder) throws