crux_structs v0.1.0 Crux.Structs.Channel View Source

Represents a Discord Channel Object.

List of where every property can be present:

PropertyText (0)DM (1)Voice (2)Group (3)Category (4)
idyesyesyesyesyes
type01234
guild_idyesnoyesnoyes
positionyesnoyesnoyes
permission_overwritesyesnoyesnoyes
nameyesnoyesyesyes
topicyesnoyesnoyes
nsfwyesnononono
last_message_idyesyesnoyesno
bitratenonoyesnono
user_limitnonoyesnono
recipientsnoyes
(One Element)
noyesno
iconnononoyesno
owner_idnononoyesno
application_idnononoyesno
parent_idyesnoyesnono
last_pin_timestampyesyesnoyesno

Differences opposed to the Discord API Object:

  • :recipients is a MapSet of user ids

Link to this section Summary

Link to this section Types

Link to this type t() View Source
t() :: %Crux.Structs.Channel{
  application_id: integer(),
  bitrate: term(),
  guild_id: integer(),
  icon: String.t(),
  id: integer(),
  last_message_id: term(),
  last_pin_timestamp: String.t(),
  name: String.t(),
  nsfw: boolean(),
  owner_id: integer(),
  parent_id: integer(),
  permission_overwrites: %{optional(integer()) => Crux.Structs.Overwrite.t()},
  position: integer(),
  recipients: MapSet.t(integer()),
  topic: String.t(),
  type: integer(),
  user_limit: non_neg_integer()
}