[][src]Struct serenity::collector::message_collector::CollectReply

pub struct CollectReply<'a> { /* fields omitted */ }

Implementations

impl<'a> CollectReply<'a>[src]

pub fn filter_limit(self, limit: u32) -> Self[src]

Limits how many messages will attempt to be filtered.

The filter checks whether the message has been sent in the right guild, channel, and by the right author.

pub fn filter<F: Fn(&Arc<Message>) -> bool + 'static + Send + Sync>(
    self,
    function: F
) -> Self
[src]

Sets a filter function where messages passed to the function must return true, otherwise the message won't be collected and failed the filter process. This is the last instance to pass for a message to count as collected.

This function is intended to be a message content filter.

pub fn author_id(self, author_id: impl Into<u64>) -> Self[src]

Sets the required author ID of a message. If a message does not meet this ID, it won't be received.

pub fn channel_id(self, channel_id: impl Into<u64>) -> Self[src]

Sets the required channel ID of a message. If a message does not meet this ID, it won't be received.

pub fn guild_id(self, guild_id: impl Into<u64>) -> Self[src]

Sets the required guild ID of a message. If a message does not meet this ID, it won't be received.

pub fn timeout(self, duration: Duration) -> Self[src]

Sets a duration for how long the collector shall receive messages.

impl<'a> CollectReply<'a>[src]

pub fn new(shard_messenger: impl AsRef<ShardMessenger>) -> Self[src]

Trait Implementations

impl<'a> Future for CollectReply<'a>[src]

type Output = Option<Arc<Message>>

The type of value produced on completion.

Auto Trait Implementations

impl<'a> !RefUnwindSafe for CollectReply<'a>

impl<'a> Send for CollectReply<'a>

impl<'a> !Sync for CollectReply<'a>

impl<'a> Unpin for CollectReply<'a>

impl<'a> !UnwindSafe for CollectReply<'a>

Blanket Implementations

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

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

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

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

impl<T> FutureExt for T where
    T: Future + ?Sized
[src]

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

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

impl<F> IntoFuture for F where
    F: Future
[src]

type Output = <F as Future>::Output

🔬 This is a nightly-only experimental API. (into_future)

The output that the future will produce on completion.

type Future = F

🔬 This is a nightly-only experimental API. (into_future)

Which kind of future are we turning this into?

impl<T> Same<T> for T

type Output = T

Should always be Self

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

type Error = Infallible

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<V, T> VZip<V> for T where
    V: MultiLane<T>, 

impl<T> WithSubscriber for T[src]