mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-12 16:50:10 +00:00
chore: clean up some rust code
This commit is contained in:
parent
b19c900cc3
commit
578c09c216
15 changed files with 63 additions and 207 deletions
|
|
@ -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}");
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue