[−][src]Struct serenity::collector::reaction_collector::ReactionCollectorBuilder
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]
self,
function: F
) -> Self
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.
fn poll(self: Pin<&mut Self>, ctx: &mut FutContext<'_>) -> Poll<Self::Output>
[src]
Auto Trait Implementations
impl<'a> !RefUnwindSafe for ReactionCollectorBuilder<'a>
impl<'a> Send for ReactionCollectorBuilder<'a>
impl<'a> !Sync for ReactionCollectorBuilder<'a>
impl<'a> Unpin for ReactionCollectorBuilder<'a>
impl<'a> !UnwindSafe for ReactionCollectorBuilder<'a>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T> FutureExt for T where
T: Future + ?Sized,
[src]
T: Future + ?Sized,
fn map<U, F>(self, f: F) -> Map<Self, F> where
F: FnOnce(Self::Output) -> U,
[src]
F: FnOnce(Self::Output) -> U,
fn map_into<U>(self) -> MapInto<Self, U> where
Self::Output: Into<U>,
[src]
Self::Output: Into<U>,
fn then<Fut, F>(self, f: F) -> Then<Self, Fut, F> where
F: FnOnce(Self::Output) -> Fut,
Fut: Future,
[src]
F: FnOnce(Self::Output) -> Fut,
Fut: Future,
fn left_future<B>(self) -> Either<Self, B> where
B: Future<Output = Self::Output>,
[src]
B: Future<Output = Self::Output>,
fn right_future<A>(self) -> Either<A, Self> where
A: Future<Output = Self::Output>,
[src]
A: Future<Output = Self::Output>,
fn into_stream(self) -> IntoStream<Self>
[src]
fn flatten(self) -> Flatten<Self> where
Self::Output: Future,
[src]
Self::Output: Future,
fn flatten_stream(self) -> FlattenStream<Self> where
Self::Output: Stream,
[src]
Self::Output: Stream,
fn fuse(self) -> Fuse<Self>
[src]
fn inspect<F>(self, f: F) -> Inspect<Self, F> where
F: FnOnce(&Self::Output),
[src]
F: FnOnce(&Self::Output),
fn catch_unwind(self) -> CatchUnwind<Self> where
Self: UnwindSafe,
[src]
Self: UnwindSafe,
fn shared(self) -> Shared<Self> where
Self::Output: Clone,
[src]
Self::Output: Clone,
fn remote_handle(self) -> (Remote<Self>, RemoteHandle<Self::Output>)
[src]
fn boxed<'a>(self) -> Pin<Box<dyn Future<Output = Self::Output> + 'a + Send>> where
Self: Send + 'a,
[src]
Self: Send + 'a,
fn boxed_local<'a>(self) -> Pin<Box<dyn Future<Output = Self::Output> + 'a>> where
Self: 'a,
[src]
Self: 'a,
fn unit_error(self) -> UnitError<Self>
[src]
fn never_error(self) -> NeverError<Self>
[src]
fn poll_unpin(&mut self, cx: &mut Context<'_>) -> Poll<Self::Output> where
Self: Unpin,
[src]
Self: Unpin,
fn now_or_never(self) -> Option<Self::Output>
[src]
impl<T> Instrument for T
[src]
fn instrument(self, span: Span) -> Instrumented<Self>
[src]
fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T> Instrument for T
[src]
fn instrument(self, span: Span) -> Instrumented<Self>
[src]
fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<F> IntoFuture for F where
F: Future,
[src]
F: Future,
type Output = <F as Future>::Output
into_future
)The output that the future will produce on completion.
type Future = F
into_future
)Which kind of future are we turning this into?
pub fn into_future(self) -> <F as IntoFuture>::Future
[src]
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]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub 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.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,
pub fn vzip(self) -> V
impl<T> WithSubscriber for T
[src]
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
[src]
S: Into<Dispatch>,