alchemy v0.6.0 Alchemy.Channel

This module contains useful functions for operating on Channels.

Summary

Types

DMChannels represent a private message between 2 users; in this case, between a client and a user

Represents an Invite object along with the metadata

Represents the channel an invite is for

Represents the guild an invite is for

Represents a permission OverWrite object

t()

Represents a standard channel in a Guild

Types

dm_channel :: %Alchemy.DMChannel{id: String.t, last_message_id: String.t, recipients: User.t, type: atom}

DMChannels represent a private message between 2 users; in this case, between a client and a user

  • id

    the private channel’s id

  • recipients

    the users with which the private channel is open

  • last_message_id

    The id of the last message sent

invite :: %Alchemy.Channel.Invite{channel: invite_channel, code: String.t, created_at: datetime, guild: invite_guild, inviter: User.t, max_age: Integer, max_uses: Integer, revoked: Boolean, temporary: Boolean, uses: Integer}

Represents an Invite object along with the metadata.

  • code

    The unique invite code

  • guild

    The guild this invite is for

  • channel

    The channel this invite is for

  • inviter

    The user who created the invite

  • uses

    The amount of time this invite has been used

  • max_uses

    The max number of times this invite can be used

  • max_age

    The duration (seconds) after which the invite will expire

  • temporary

    Whether this invite grants temporary membership

  • created_at

    When this invite was created

  • revoked

    Whether this invite was revoked

invite_channel :: %Alchemy.Channel.Invite.InviteChannel{id: snowflake, name: String.t, type: String.t}

Represents the channel an invite is for

  • id

    The id of the channel

  • name

    The name of the channel

  • type

    The type of the channel, either “text” or “voice”

invite_guild :: %Alchemy.Channel.Invite.InviteGuild{icon: hash, id: snowflake, name: String.t, splash: hash}

Represents the guild an invite is for.

  • id

    The id of the guild

  • name

    The name of the guild

  • splash

    The hash of the guild splash (or nil)

  • icon

    The hash of the guild icon (or nil)

overwrite :: %Alchemy.OverWrite{allow: Integer, deny: Integer, id: String.t, type: String.t}

Represents a permission OverWrite object

  • id

    role or user id

  • type

    either “role”, or “member”

  • allow

    the bit set of that permission

  • deny

    the bit set of that permission

t :: %Alchemy.Channel{bitrate: Integer | nil, guild_id: String.t, id: String.t, last_message_id: String.t | nil, name: String.t, permission_overwrites: [overwrite], position: Integer, topic: String.t | nil, type: atom, user_limit: Integer | nil}

Represents a standard channel in a Guild.

  • id

    The id of this specific channel. Will be the same as the guild for the “#general” channel

  • guild_id

    The id of the guild this channel is a part of

  • name

    The name of the channel

  • type

    :text, :voice, or :group

  • position

    Sorting position of the channel

  • permission_overwrites

    An array of %OverWrite{} objects

  • topic

    The topic of a channel, nil for voice

  • last_message_id

    The id of the last message sent in the channel, nil for voice

  • bitrate

    The bitrate of a voice channel, nil for text

  • user_limit

    The user limit of a voice channel, nil for text