mirror of
https://github.com/natsukagami/youmubot.git
synced 2025-04-15 23:08:55 +00:00
Fix cargo fmt stuff
This commit is contained in:
parent
0b60396f81
commit
328bb44d23
2 changed files with 7 additions and 6 deletions
|
@ -60,9 +60,12 @@ fn update_user(
|
|||
let mut send_message = |rc: RatingChange| -> CommandResult {
|
||||
let channels =
|
||||
channels_list.get_or_insert_with(|| channels.channels_of(http.clone(), user_id));
|
||||
if channels.is_empty() { return Ok(()); }
|
||||
let (contest, _, _) =
|
||||
codeforces::Contest::standings(reqwest, rc.contest_id, |f| f.limit(1, 1))?; for channel in channels {
|
||||
if channels.is_empty() {
|
||||
return Ok(());
|
||||
}
|
||||
let (contest, _, _) =
|
||||
codeforces::Contest::standings(reqwest, rc.contest_id, |f| f.limit(1, 1))?;
|
||||
for channel in channels {
|
||||
if let Err(e) = channel.send_message(http.http(), |e| {
|
||||
e.content(format!("Rating change for {}!", user_id.mention()))
|
||||
.embed(|c| {
|
||||
|
|
|
@ -1,9 +1,7 @@
|
|||
use chrono::{DateTime, Utc};
|
||||
|
||||
use serde::{Deserialize, Serialize};
|
||||
use serenity::{
|
||||
model::id::{RoleId, UserId},
|
||||
};
|
||||
use serenity::model::id::{RoleId, UserId};
|
||||
use std::collections::HashMap;
|
||||
use youmubot_db::{GuildMap, DB};
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue