[][src]Struct serenity::collector::reaction_collector::ReactionCollectorBuilder

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

Implementations

impl<'a> ReactionCollectorBuilder<'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 collect_limit(self, limit: u32) -> Self[src]

Limits how many reactions can be collected.

A reaction is considered collected, if the reaction passes all the requirements.

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

Sets a filter function where reactions passed to the function must return true, otherwise the reaction won't be collected. This is the last instance to pass for a reaction to count as collected.

This function is intended to be a reaction content filter.

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

Sets the required author ID of a reaction. If a reaction is not issued by a user with this ID, it won't be received.

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

Sets the message on which the reaction must occur. If a reaction is not on a message with this ID, it won't be received.

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

Sets the guild in which the reaction must occur. If a reaction is not on a message with this ID, it won't be received.

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

Sets the channel on which the reaction must occur. If a reaction is not on a message with this ID, it won't be received.

pub fn added(self, is_accepted: bool) -> Self[src]

If set to true, added reactions will be collected.

Set to true by default.

pub fn removed(self, is_accepted: bool) -> Self[src]

If set to true, removed reactions will be collected.

Set to false by default.

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

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

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

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

Trait Implementations

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

type Output = ReactionCollector

The type of value produced on completion.

Auto Trait Implementations

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]