[][src]Struct serenity::framework::standard::buckets::BucketBuilder

pub struct BucketBuilder { /* fields omitted */ }

Implementations

impl BucketBuilder[src]

pub fn delay(&mut self, n: i64) -> &mut Self[src]

The "break" time between invocations of a command.

Expressed in seconds.

pub fn time_span(&mut self, n: i64) -> &mut Self[src]

How long the bucket will apply for.

Expressed in seconds.

pub fn limit(&mut self, n: i32) -> &mut Self[src]

Number of invocations allowed per time_span.

Expressed in seconds.

pub fn check<F>(&mut self, f: F) -> &mut Self where
    F: Fn(&mut Context, Option<GuildId>, ChannelId, UserId) -> bool + Send + Sync + 'static, 
[src]

Middleware confirming (or denying) that the bucket is eligible to apply. For instance, to limit the bucket to just one user.

Trait Implementations

impl Default for BucketBuilder[src]

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, U> Into<U> for T where
    U: From<T>, 
[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]

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<T> UnsafeAny for T where
    T: Any

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,