1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
use std::time::Duration;

use super::AbstractRatelimitEvents;
use crate::RatelimitEvent;
use crate::RatelimitEventType;
use crate::ReferenceDb;
use revolt_result::Result;

#[async_trait]
impl AbstractRatelimitEvents for ReferenceDb {
    /// Insert a new ratelimit event
    async fn insert_ratelimit_event(&self, _event: &RatelimitEvent) -> Result<()> {
        // TODO: implement
        unimplemented!()
    }

    /// Count number of events in given duration and check if we've hit the limit
    async fn has_ratelimited(
        &self,
        _target_id: &str,
        _event_type: RatelimitEventType,
        _period: Duration,
        _count: usize,
    ) -> Result<bool> {
        // TODO: implement
        unimplemented!()
    }
}