fix(tripple): Check for absolute value for time diff
This commit is contained in:
parent
82102b954e
commit
caa2ec1182
@ -108,7 +108,7 @@ fn main() {
|
|||||||
format!("{} just hit leet! New score: {}", message.from.first_name, *entry)
|
format!("{} just hit leet! New score: {}", message.from.first_name, *entry)
|
||||||
));
|
));
|
||||||
|
|
||||||
let current_leet_count = time_scored_map.iter().filter(|(_,t)| (**t - Local::now()).num_seconds() < allowed_timegap * 2).count();
|
let current_leet_count = time_scored_map.iter().filter(|(_,t)| (**t - Local::now()).num_seconds().abs() < allowed_timegap * 2).count();
|
||||||
|
|
||||||
if current_leet_count == 3 {
|
if current_leet_count == 3 {
|
||||||
api.spawn(message.chat.text("OH BABY A TRIPPLE!!!"));
|
api.spawn(message.chat.text("OH BABY A TRIPPLE!!!"));
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user