DiscordExt

Trait DiscordExt 

Source
pub trait DiscordExt:
    Sized
    + Send
    + Sync
where Self: 'static,
{ // Required method fn into_discord_bot( self, token: &str, ) -> impl Future<Output = Client> + Send; // Provided method fn into_discord_bot_from_env(self) -> impl Future<Output = Client> + Send { ... } }
Available on crate feature discord-bot only.
Expand description

A trait for turning a type into a serenity client.

Required Methods§

Source

fn into_discord_bot(self, token: &str) -> impl Future<Output = Client> + Send

Provided Methods§

Source

fn into_discord_bot_from_env(self) -> impl Future<Output = Client> + Send

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<M> DiscordExt for Agent<M>
where M: CompletionModel + Send + Sync + 'static,