Struct serenity::collector::modal_interaction_collector::ModalInteractionCollectorBuilder
source · [−]pub struct ModalInteractionCollectorBuilder { /* private fields */ }
collector
only.Implementations
sourceimpl ModalInteractionCollectorBuilder
impl ModalInteractionCollectorBuilder
sourcepub fn filter_limit(self, limit: u32) -> Self
pub fn filter_limit(self, limit: u32) -> Self
Limits how many interactions will attempt to be filtered.
The filter checks whether the message has been sent in the right guild, channel, and by the right author.
sourcepub fn collect_limit(self, limit: u32) -> Self
pub fn collect_limit(self, limit: u32) -> Self
Limits how many interactions can be collected.
An interaction is considered collected, if the interaction passes all the requirements.
sourcepub fn filter<F: Fn(&Arc<ModalSubmitInteraction>) -> bool + 'static + Send + Sync>(
self,
function: F
) -> Self
pub fn filter<F: Fn(&Arc<ModalSubmitInteraction>) -> bool + 'static + Send + Sync>(
self,
function: F
) -> Self
Sets a filter function where interactions passed to the function must
return true
, otherwise the interaction won’t be collected.
This is the last instance to pass for an interaction to count as collected.
This function is intended to be an interaction filter.
Sets the required author ID of an interaction. If an interaction is not triggered by a user with this ID, it won’t be received.
sourcepub fn message_id(self, message_id: impl Into<u64>) -> Self
pub fn message_id(self, message_id: impl Into<u64>) -> Self
Sets the message on which the interaction must occur. If an interaction is not on a message with this ID, it won’t be received.
sourcepub fn guild_id(self, guild_id: impl Into<u64>) -> Self
pub fn guild_id(self, guild_id: impl Into<u64>) -> Self
Sets the guild in which the interaction must occur. If an interaction is not on a message with this guild ID, it won’t be received.
sourcepub fn channel_id(self, channel_id: impl Into<u64>) -> Self
pub fn channel_id(self, channel_id: impl Into<u64>) -> Self
Sets the channel on which the interaction must occur. If an interaction is not on a message with this channel ID, it won’t be received.
sourceimpl ModalInteractionCollectorBuilder
impl ModalInteractionCollectorBuilder
pub fn new(shard_messenger: impl AsRef<ShardMessenger>) -> Self
sourcepub fn build(self) -> ModalInteractionCollector
pub fn build(self) -> ModalInteractionCollector
Use the given configuration to build the ModalInteractionCollector
.
Auto Trait Implementations
impl !RefUnwindSafe for ModalInteractionCollectorBuilder
impl Send for ModalInteractionCollectorBuilder
impl Sync for ModalInteractionCollectorBuilder
impl Unpin for ModalInteractionCollectorBuilder
impl !UnwindSafe for ModalInteractionCollectorBuilder
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more