[][src]Struct automate::gateway::Session

pub struct Session { /* fields omitted */ }

Methods

impl Session[src]

pub fn send<M: Into<Message>>(&self, msg: M) -> Result<(), Error>[src]

pub fn bot(&self) -> &User[src]

pub fn invite_bot(&self, permission: u32) -> String[src]

Methods from Deref<Target = HttpAPI>

pub fn token(&self) -> &String[src]

pub async fn gateway<'_>(&'_ self) -> Result<Gateway, Error>[src]

pub async fn gateway_bot<'_>(&'_ self) -> Result<GatewayBot, Error>[src]

pub async fn audit_logs<'_, S: Into<Snowflake>>(
    &'_ self,
    guild: S
) -> Result<AuditLog, Error>
[src]

pub async fn channel<'_, S: Into<Snowflake>>(
    &'_ self,
    channel: S
) -> Result<Channel, Error>
[src]

pub async fn modify_channel<'_, S: Into<Snowflake>>(
    &'_ self,
    channel: S,
    modification: ModifyChannel
) -> Result<Channel, Error>
[src]

pub async fn delete_channel<'_, S: Into<Snowflake>>(
    &'_ self,
    channel: S
) -> Result<Channel, Error>
[src]

pub async fn message<'_, S: Into<Snowflake>>(
    &'_ self,
    channel: S,
    message: S
) -> Result<Message, Error>
[src]

pub async fn messages<'_, S: Into<Snowflake>>(
    &'_ self,
    channel: S,
    messages: MessagesPosition
) -> Result<Vec<Message>, Error>
[src]

pub async fn create_message<'_, S: Into<Snowflake>>(
    &'_ self,
    channel: S,
    message: CreateMessage
) -> Result<Message, Error>
[src]

pub async fn modify_message<'_, S: Into<Snowflake>>(
    &'_ self,
    channel: S,
    message: S,
    modification: ModifyMessage
) -> Result<Message, Error>
[src]

pub async fn delete_message<'_, S: Into<Snowflake>>(
    &'_ self,
    channel: S,
    message: S
) -> Result<(), Error>
[src]

pub async fn delete_message_bulk<'_, S: Into<Snowflake> + AsJson>(
    &'_ self,
    channel: S,
    messages: Vec<S>
) -> Result<(), Error>
[src]

pub async fn reactions<'_, '_, S: Into<Snowflake>>(
    &'_ self,
    channel: S,
    message: S,
    emoji: &'_ str,
    reactions: ReactionsPosition
) -> Result<Vec<User>, Error>
[src]

pub async fn create_reaction<'_, '_, S: Into<Snowflake>, U: UrlEncode>(
    &'_ self,
    channel: S,
    message: S,
    emoji: &'_ U
) -> Result<(), Error>
[src]

pub async fn delete_reaction<'_, '_, S: Into<Snowflake>, U: UrlEncode>(
    &'_ self,
    channel: S,
    message: S,
    emoji: &'_ U,
    user: S
) -> Result<(), Error>
[src]

pub async fn delete_own_reaction<'_, '_, S: Into<Snowflake>, U: UrlEncode>(
    &'_ self,
    channel: S,
    message: S,
    emoji: &'_ U
) -> Result<(), Error>
[src]

pub async fn delete_all_reaction<'_, S: Into<Snowflake>>(
    &'_ self,
    channel: S,
    message: S
) -> Result<(), Error>
[src]

pub async fn emojis<'_, S: Into<Snowflake>>(
    &'_ self,
    guild: S
) -> Result<Vec<Emoji>, Error>
[src]

pub async fn emoji<'_, S: Into<Snowflake>>(
    &'_ self,
    guild: S,
    emoji: S
) -> Result<Emoji, Error>
[src]

pub async fn create_emoji<'_, S: Into<Snowflake>>(
    &'_ self,
    guild: S,
    emoji: NewEmoji
) -> Result<Emoji, Error>
[src]

pub async fn modify_emoji<'_, S: Into<Snowflake>>(
    &'_ self,
    guild: S,
    emoji: UpdateEmoji
) -> Result<Emoji, Error>
[src]

pub async fn delete_emoji<'_, S: Into<Snowflake>>(
    &'_ self,
    guild: S,
    emoji: S
) -> Result<(), Error>
[src]

pub async fn invite<'_, '_>(&'_ self, code: &'_ str) -> Result<Invite, Error>[src]

Retrieves an invite by its code.

pub async fn invite_with_counts<'_, '_>(
    &'_ self,
    code: &'_ str
) -> Result<Invite, Error>
[src]

Retrieves an invite by its code with the approximate member counts of the server.

pub async fn invites<'_, S: Into<Snowflake>>(
    &'_ self,
    channel: S
) -> Result<Vec<Invite>, Error>
[src]

Retrieves all the invites in a channel.

pub async fn create_invite<'_, S: Into<Snowflake>>(
    &'_ self,
    channel: S,
    invite: NewInvite
) -> Result<Invite, Error>
[src]

Create an invite for the specified channel.

pub async fn delete_invite<'_, '_>(
    &'_ self,
    code: &'_ str
) -> Result<Invite, Error>
[src]

Create an invite for the specified channel.

pub async fn modify_channel_permissions<'_, S: Into<Snowflake>>(
    &'_ self,
    channel: S,
    overwrite: S,
    permissions: NewOverwrite
) -> Result<(), Error>
[src]

pub async fn delete_channel_permission<'_, S: Into<Snowflake>>(
    &'_ self,
    channel: S,
    overwrite: S
) -> Result<(), Error>
[src]

pub async fn trigger_typing<'_, S: Into<Snowflake>>(
    &'_ self,
    channel: S
) -> Result<(), Error>
[src]

pub async fn pinned_messages<'_, S: Into<Snowflake>>(
    &'_ self,
    channel: S
) -> Result<Vec<Message>, Error>
[src]

pub async fn pin_message<'_, S: Into<Snowflake>>(
    &'_ self,
    channel: S,
    message: S
) -> Result<(), Error>
[src]

pub async fn delete_pinned_message<'_, S: Into<Snowflake>>(
    &'_ self,
    channel: S,
    message: S
) -> Result<(), Error>
[src]

pub async fn group_dm_add_recipient<'_, S: Into<Snowflake>>(
    &'_ self,
    channel: S,
    user: S,
    access_token: String,
    nick: String
) -> Result<(), Error>
[src]

pub async fn group_dm_remove_recipient<'_, S: Into<Snowflake>>(
    &'_ self,
    channel: S,
    user: S
) -> Result<(), Error>
[src]

Trait Implementations

impl Deref for Session[src]

type Target = HttpAPI

The resulting type after dereferencing.

Auto Trait Implementations

impl Send for Session

impl Sync for Session

impl Unpin for Session

impl !UnwindSafe for Session

impl !RefUnwindSafe for Session

Blanket Implementations

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

impl<T> From<T> for T[src]

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

type Error = !

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> 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> Borrow<T> for T where
    T: ?Sized
[src]

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

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

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,