chore: clean up some rust code

This commit is contained in:
alyssa 2025-12-20 22:55:25 -05:00
parent b19c900cc3
commit 578c09c216
15 changed files with 63 additions and 207 deletions

View file

@ -41,13 +41,7 @@ async fn main() -> anyhow::Result<()> {
);
// hacky, but needed for selfhost for now
if let Some(target) = libpk::config
.discord
.as_ref()
.unwrap()
.gateway_target
.clone()
{
if let Some(target) = libpk::config.discord().gateway_target.clone() {
runtime_config
.set(RUNTIME_CONFIG_KEY_EVENT_TARGET.to_string(), target)
.await?;
@ -237,12 +231,7 @@ async fn main() -> anyhow::Result<()> {
}
async fn scheduled_task(redis: RedisPool, senders: Vec<(ShardId, MessageSender)>) {
let prefix = libpk::config
.discord
.as_ref()
.expect("missing discord config")
.bot_prefix_for_gateway
.clone();
let prefix = libpk::config.discord().bot_prefix_for_gateway.clone();
println!("{prefix}");