[][src]Struct spectacles_rest::ChannelView

pub struct ChannelView {
    pub messages: ChannelMessagesView,
    // some fields omitted
}

A view for interfacing with a Discord channel.

Fields

messages: ChannelMessagesView

A view for interfacing with a channel's messages.

Methods

impl ChannelView[src]

pub fn create_message<M: MessageResponse>(
    &self,
    payload: M
) -> impl Future<Item = Message, Error = Error>
[src]

Creates a message in the current channel. This endpoint requires the Create Messages permission on Discord.

pub fn messages(&self) -> ChannelMessagesView[src]

Returns a view representing the messages in this channel.

pub fn create_invite(
    &self,
    inv: CreateInviteOptions
) -> impl Future<Item = Invite, Error = Error>
[src]

Creates an invite for the current channel. Requires the Create Invite permission on Discord.

pub fn edit_overwrite(
    &self,
    id: &Snowflake
) -> impl Future<Item = (), Error = Error>
[src]

Edits a permission overwrite for a given channel.

pub fn delete_overwrite(
    &self,
    id: &Snowflake
) -> impl Future<Item = (), Error = Error>
[src]

Deletes a permission overwrite for the current channel.

pub fn get_invites(&self) -> impl Future<Item = Vec<Invite>, Error = Error>[src]

Gets a collection of all invites created for this channel.

pub fn get_pins(&self) -> impl Future<Item = Vec<Message>, Error = Error>[src]

Gets a list of all pinned messages in the channel.

pub fn fetch(&self) -> impl Future<Item = Channel, Error = Error>[src]

Fetches a Channel object using the provided ID.

pub fn delete(&self) -> impl Future<Item = Channel, Error = Error>[src]

Deletes this channel from Discord, or in the case of a direct messages, closes the channel.

pub fn delete_pin(
    &self,
    mid: &Snowflake
) -> impl Future<Item = (), Error = Error>
[src]

Deletes a pinned message from this channel.

pub fn edit_message(
    &self,
    mid: &Snowflake,
    payload: impl MessageResponse
) -> impl Future<Item = Message, Error = Error>
[src]

Edits the message in this channel, with the given message ID.

pub fn modify(
    &self,
    payload: ModifyChannelOptions
) -> impl Future<Item = Channel, Error = Error>
[src]

Modifies this channel.

pub fn trigger_typing(&self) -> impl Future<Item = (), Error = Error>[src]

Triggers the typing indicator, authored by the client user, in the current channel.

pub fn pin_message(
    &self,
    mid: &Snowflake
) -> impl Future<Item = (), Error = Error>
[src]

Adds a pinned message to this channel.

Auto Trait Implementations

impl Send for ChannelView

impl Sync for ChannelView

Blanket Implementations

impl<T> From for T[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Erased for T

impl<T, U> TryInto for T where
    U: TryFrom<T>, 

type Err = <U as TryFrom<T>>::Err