diff options
| author | acdenisSK <[email protected]> | 2017-07-22 01:55:07 +0200 |
|---|---|---|
| committer | acdenisSK <[email protected]> | 2017-07-22 01:55:07 +0200 |
| commit | ea1eba89087825e526e54fffdb27642fe72f9602 (patch) | |
| tree | caba7f750e8034ecf1dd71547d4470b256ed5487 /src/framework/buckets.rs | |
| parent | match -> and_then (diff) | |
| download | serenity-ea1eba89087825e526e54fffdb27642fe72f9602.tar.xz serenity-ea1eba89087825e526e54fffdb27642fe72f9602.zip | |
Make bucket checks less cache dependent
Diffstat (limited to 'src/framework/buckets.rs')
| -rw-r--r-- | src/framework/buckets.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/framework/buckets.rs b/src/framework/buckets.rs index c4b81b6..76a8c0b 100644 --- a/src/framework/buckets.rs +++ b/src/framework/buckets.rs @@ -20,7 +20,9 @@ pub(crate) struct Bucket { pub ratelimit: Ratelimit, pub users: HashMap<u64, MemberRatelimit>, #[cfg(feature="cache")] - pub check: Option<Box<Fn(&mut Context, GuildId, ChannelId, UserId) -> bool + 'static>>, + pub check: Option<Box<Fn(&mut Context, Option<GuildId>, ChannelId, UserId) -> bool + 'static>>, + #[cfg(not(feature="cache"))] + pub checK: Option<Box<Fn(&mut Context, ChannelId, UserId) -> bool + 'static>>, } impl Bucket { |