feat: add caching to everything, should make all member interacts faster
All checks were successful
/ check_lfs (push) Successful in 13s
On_Push / lint_fmt (push) Successful in 24s
On_Push / lint_clippy (push) Successful in 25s
On_Push / build (push) Successful in 1m59s
On_Push / deploy (push) Successful in 17s

This commit is contained in:
silver 2025-07-07 22:22:25 +01:00
parent 3abbb8d485
commit e901f3ed74
Signed by: silver
GPG key ID: 36F93D61BAD3FD7D
6 changed files with 40 additions and 4 deletions

View file

@ -7,7 +7,7 @@ use serenity::{
};
use skynet_discord_bot::common::database::{db_init, DataBase};
use skynet_discord_bot::common::set_roles::committee::{db_roles_get};
use skynet_discord_bot::common::set_roles::committee::db_roles_get;
use skynet_discord_bot::{get_config, Config};
use sqlx::{Pool, Sqlite};
use std::{process, sync::Arc};
@ -51,7 +51,7 @@ struct Handler;
impl EventHandler for Handler {
async fn cache_ready(&self, ctx: Context, guilds: Vec<GuildId>) {
for guild in guilds {
ctx.shard.chunk_guild(guild, Some(500), false, ChunkGuildFilter::None, None);
ctx.shard.chunk_guild(guild, Some(2000), false, ChunkGuildFilter::None, None);
}
println!("Cache built successfully!");
}
@ -126,4 +126,4 @@ async fn cleanup(db: &Pool<Sqlite>, ctx: &Context, config: &Config) {
}
}
}
}
}