fmt: clippy and nightly fmt

This commit is contained in:
silver 2025-07-21 00:38:59 +01:00
parent 57d4947edf
commit 9d409e3692
Signed by: silver
GPG key ID: 36F93D61BAD3FD7D
20 changed files with 194 additions and 143 deletions

View file

@ -1,39 +1,33 @@
pub mod commands;
use crate::commands::role_adder::tools::on_role_change;
use crate::commands::server_icon::user::current::icon::get_current_icon;
use chrono::{Days, SecondsFormat, TimeDelta, Utc};
use serenity::all::{
ActivityData, Command, CommandDataOptionValue, CreateAttachment, CreateMessage, EditInteractionResponse, GuildId, GuildMemberUpdateEvent,
GuildMembersChunkEvent, Interaction,
};
use serenity::{
all::{Command, CommandDataOptionValue, CreateMessage, EditInteractionResponse, Interaction},
async_trait,
client::{Context, EventHandler},
gateway::ChunkGuildFilter,
gateway::{ActivityData, ChunkGuildFilter},
model::{
event::GuildMemberUpdateEvent,
gateway::{GatewayIntents, Ready},
guild::Member,
id::GuildId,
user::OnlineStatus,
},
Client,
};
use skynet_discord_bot::common::database::{db_init, get_server_config, get_server_config_bulk, get_server_member, DataBase};
use skynet_discord_bot::common::server_icon::{get_config_icons, update_icon};
use skynet_discord_bot::common::set_roles::committee::update_committees;
use skynet_discord_bot::common::set_roles::{committee, normal};
use skynet_discord_bot::common::wolves::cns::get_wolves;
use skynet_discord_bot::common::wolves::committees::{get_cns, Committees};
use skynet_discord_bot::{get_config, Config};
use skynet_discord_bot::{
common::{
database::{db_init, get_server_config, get_server_member, DataBase},
set_roles::committee::update_committees,
wolves::committees::Committees,
},
get_config, Config,
};
use sqlx::{Pool, Sqlite};
use std::sync::atomic::{AtomicBool, Ordering};
use std::sync::Arc;
use std::time::Duration;
use tokio::sync::RwLock;
struct Handler {
is_loop_running: AtomicBool,
}
struct Handler;
#[async_trait]
impl EventHandler for Handler {
@ -301,9 +295,7 @@ async fn main() {
let intents = GatewayIntents::GUILDS | GatewayIntents::GUILD_MESSAGES | GatewayIntents::MESSAGE_CONTENT | GatewayIntents::GUILD_MEMBERS;
// Build our client.
let mut client = Client::builder(&config.discord_token, intents)
.event_handler(Handler {
is_loop_running: AtomicBool::new(false),
})
.event_handler(Handler)
.cache_settings(serenity::cache::Settings::default())
.await
.expect("Error creating client");