[−][src]Struct automate::gateway::Session
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]
&'_ self,
guild: S
) -> Result<AuditLog, Error>
pub async fn channel<'_, S: Into<Snowflake>>(
&'_ self,
channel: S
) -> Result<Channel, Error>
[src]
&'_ self,
channel: S
) -> Result<Channel, Error>
pub async fn modify_channel<'_, S: Into<Snowflake>>(
&'_ self,
channel: S,
modification: ModifyChannel
) -> Result<Channel, Error>
[src]
&'_ self,
channel: S,
modification: ModifyChannel
) -> Result<Channel, Error>
pub async fn delete_channel<'_, S: Into<Snowflake>>(
&'_ self,
channel: S
) -> Result<Channel, Error>
[src]
&'_ self,
channel: S
) -> Result<Channel, Error>
pub async fn message<'_, S: Into<Snowflake>>(
&'_ self,
channel: S,
message: S
) -> Result<Message, Error>
[src]
&'_ self,
channel: S,
message: S
) -> Result<Message, Error>
pub async fn messages<'_, S: Into<Snowflake>>(
&'_ self,
channel: S,
messages: MessagesPosition
) -> Result<Vec<Message>, Error>
[src]
&'_ self,
channel: S,
messages: MessagesPosition
) -> Result<Vec<Message>, Error>
pub async fn create_message<'_, S: Into<Snowflake>>(
&'_ self,
channel: S,
message: CreateMessage
) -> Result<Message, Error>
[src]
&'_ self,
channel: S,
message: CreateMessage
) -> Result<Message, Error>
pub async fn modify_message<'_, S: Into<Snowflake>>(
&'_ self,
channel: S,
message: S,
modification: ModifyMessage
) -> Result<Message, Error>
[src]
&'_ self,
channel: S,
message: S,
modification: ModifyMessage
) -> Result<Message, Error>
pub async fn delete_message<'_, S: Into<Snowflake>>(
&'_ self,
channel: S,
message: S
) -> Result<(), Error>
[src]
&'_ self,
channel: S,
message: S
) -> Result<(), Error>
pub async fn delete_message_bulk<'_, S: Into<Snowflake> + AsJson>(
&'_ self,
channel: S,
messages: Vec<S>
) -> Result<(), Error>
[src]
&'_ self,
channel: S,
messages: Vec<S>
) -> Result<(), Error>
pub async fn reactions<'_, '_, S: Into<Snowflake>>(
&'_ self,
channel: S,
message: S,
emoji: &'_ str,
reactions: ReactionsPosition
) -> Result<Vec<User>, Error>
[src]
&'_ self,
channel: S,
message: S,
emoji: &'_ str,
reactions: ReactionsPosition
) -> Result<Vec<User>, Error>
pub async fn create_reaction<'_, '_, S: Into<Snowflake>, U: UrlEncode>(
&'_ self,
channel: S,
message: S,
emoji: &'_ U
) -> Result<(), Error>
[src]
&'_ self,
channel: S,
message: S,
emoji: &'_ U
) -> Result<(), Error>
pub async fn delete_reaction<'_, '_, S: Into<Snowflake>, U: UrlEncode>(
&'_ self,
channel: S,
message: S,
emoji: &'_ U,
user: S
) -> Result<(), Error>
[src]
&'_ self,
channel: S,
message: S,
emoji: &'_ U,
user: S
) -> Result<(), Error>
pub async fn delete_own_reaction<'_, '_, S: Into<Snowflake>, U: UrlEncode>(
&'_ self,
channel: S,
message: S,
emoji: &'_ U
) -> Result<(), Error>
[src]
&'_ self,
channel: S,
message: S,
emoji: &'_ U
) -> Result<(), Error>
pub async fn delete_all_reaction<'_, S: Into<Snowflake>>(
&'_ self,
channel: S,
message: S
) -> Result<(), Error>
[src]
&'_ self,
channel: S,
message: S
) -> Result<(), Error>
pub async fn emojis<'_, S: Into<Snowflake>>(
&'_ self,
guild: S
) -> Result<Vec<Emoji>, Error>
[src]
&'_ self,
guild: S
) -> Result<Vec<Emoji>, Error>
pub async fn emoji<'_, S: Into<Snowflake>>(
&'_ self,
guild: S,
emoji: S
) -> Result<Emoji, Error>
[src]
&'_ self,
guild: S,
emoji: S
) -> Result<Emoji, Error>
pub async fn create_emoji<'_, S: Into<Snowflake>>(
&'_ self,
guild: S,
emoji: NewEmoji
) -> Result<Emoji, Error>
[src]
&'_ self,
guild: S,
emoji: NewEmoji
) -> Result<Emoji, Error>
pub async fn modify_emoji<'_, S: Into<Snowflake>>(
&'_ self,
guild: S,
emoji: UpdateEmoji
) -> Result<Emoji, Error>
[src]
&'_ self,
guild: S,
emoji: UpdateEmoji
) -> Result<Emoji, Error>
pub async fn delete_emoji<'_, S: Into<Snowflake>>(
&'_ self,
guild: S,
emoji: S
) -> Result<(), Error>
[src]
&'_ self,
guild: S,
emoji: S
) -> Result<(), Error>
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]
&'_ self,
code: &'_ str
) -> Result<Invite, Error>
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]
&'_ self,
channel: S
) -> Result<Vec<Invite>, Error>
Retrieves all the invites in a channel.
pub async fn create_invite<'_, S: Into<Snowflake>>(
&'_ self,
channel: S,
invite: NewInvite
) -> Result<Invite, Error>
[src]
&'_ self,
channel: S,
invite: NewInvite
) -> Result<Invite, Error>
Create an invite for the specified channel.
pub async fn delete_invite<'_, '_>(
&'_ self,
code: &'_ str
) -> Result<Invite, Error>
[src]
&'_ self,
code: &'_ str
) -> Result<Invite, Error>
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]
&'_ self,
channel: S,
overwrite: S,
permissions: NewOverwrite
) -> Result<(), Error>
pub async fn delete_channel_permission<'_, S: Into<Snowflake>>(
&'_ self,
channel: S,
overwrite: S
) -> Result<(), Error>
[src]
&'_ self,
channel: S,
overwrite: S
) -> Result<(), Error>
pub async fn trigger_typing<'_, S: Into<Snowflake>>(
&'_ self,
channel: S
) -> Result<(), Error>
[src]
&'_ self,
channel: S
) -> Result<(), Error>
pub async fn pinned_messages<'_, S: Into<Snowflake>>(
&'_ self,
channel: S
) -> Result<Vec<Message>, Error>
[src]
&'_ self,
channel: S
) -> Result<Vec<Message>, Error>
pub async fn pin_message<'_, S: Into<Snowflake>>(
&'_ self,
channel: S,
message: S
) -> Result<(), Error>
[src]
&'_ self,
channel: S,
message: S
) -> Result<(), Error>
pub async fn delete_pinned_message<'_, S: Into<Snowflake>>(
&'_ self,
channel: S,
message: S
) -> Result<(), Error>
[src]
&'_ self,
channel: S,
message: S
) -> Result<(), Error>
pub async fn group_dm_add_recipient<'_, S: Into<Snowflake>>(
&'_ self,
channel: S,
user: S,
access_token: String,
nick: String
) -> Result<(), Error>
[src]
&'_ self,
channel: S,
user: S,
access_token: String,
nick: String
) -> Result<(), Error>
pub async fn group_dm_remove_recipient<'_, S: Into<Snowflake>>(
&'_ self,
channel: S,
user: S
) -> Result<(), Error>
[src]
&'_ self,
channel: S,
user: S
) -> Result<(), Error>
Trait Implementations
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]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
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, U> TryInto<U> 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> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,