[−][src]Struct spectacles_rest::ChannelView
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]
&self,
payload: M
) -> impl Future<Item = Message, Error = Error>
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]
&self,
inv: CreateInviteOptions
) -> impl Future<Item = Invite, Error = Error>
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]
&self,
id: &Snowflake
) -> impl Future<Item = (), Error = Error>
Edits a permission overwrite for a given channel.
pub fn delete_overwrite(
&self,
id: &Snowflake
) -> impl Future<Item = (), Error = Error>
[src]
&self,
id: &Snowflake
) -> impl Future<Item = (), Error = Error>
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]
&self,
mid: &Snowflake
) -> impl Future<Item = (), Error = Error>
Deletes a pinned message from this channel.
pub fn edit_message(
&self,
mid: &Snowflake,
payload: impl MessageResponse
) -> impl Future<Item = Message, Error = Error>
[src]
&self,
mid: &Snowflake,
payload: impl MessageResponse
) -> impl Future<Item = Message, Error = Error>
Edits the message in this channel, with the given message ID.
pub fn modify(
&self,
payload: ModifyChannelOptions
) -> impl Future<Item = Channel, Error = Error>
[src]
&self,
payload: ModifyChannelOptions
) -> impl Future<Item = Channel, Error = Error>
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]
&self,
mid: &Snowflake
) -> impl Future<Item = (), Error = Error>
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]
U: From<T>,
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Erased for T
impl<T, U> TryInto for T where
U: TryFrom<T>,
U: TryFrom<T>,