#3 wolves api #10
2 changed files with 3 additions and 4 deletions
|
@ -7,7 +7,7 @@ use serenity::{
|
|||
},
|
||||
Client,
|
||||
};
|
||||
use skynet_discord_bot::{db_init, get_config, get_server_config_bulk, Accounts, Config, DataBase, Servers, get_now_iso};
|
||||
use skynet_discord_bot::{db_init, get_config, get_now_iso, get_server_config_bulk, Accounts, Config, DataBase, Servers};
|
||||
use sqlx::{Pool, Sqlite};
|
||||
use std::{process, sync::Arc};
|
||||
use tokio::sync::RwLock;
|
||||
|
|
|
@ -8,13 +8,13 @@ use serenity::{
|
|||
prelude::TypeMapKey,
|
||||
};
|
||||
|
||||
use chrono::{Datelike, SecondsFormat, Utc};
|
||||
use sqlx::{
|
||||
sqlite::{SqliteConnectOptions, SqlitePoolOptions, SqliteRow},
|
||||
Error, FromRow, Pool, Row, Sqlite,
|
||||
};
|
||||
use std::{env, str::FromStr, sync::Arc};
|
||||
use tokio::sync::RwLock;
|
||||
use chrono::{Datelike, SecondsFormat, Utc};
|
||||
|
||||
pub struct Config {
|
||||
pub skynet_server: GuildId,
|
||||
|
@ -260,7 +260,6 @@ pub async fn get_server_config_bulk(db: &Pool<Sqlite>) -> Vec<Servers> {
|
|||
.unwrap_or_default()
|
||||
}
|
||||
|
||||
|
||||
pub fn get_now_iso(short: bool) -> String {
|
||||
let now = Utc::now();
|
||||
if short {
|
||||
|
@ -268,4 +267,4 @@ pub fn get_now_iso(short: bool) -> String {
|
|||
} else {
|
||||
now.to_rfc3339_opts(SecondsFormat::Millis, true)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue