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
c32f199325
commit
05801f6ab9
15 changed files with 63 additions and 207 deletions
|
|
@ -22,22 +22,10 @@ pub struct AppCtx {
|
|||
|
||||
#[libpk::main]
|
||||
async fn main() -> anyhow::Result<()> {
|
||||
let mut client_builder = twilight_http::Client::builder().token(
|
||||
libpk::config
|
||||
.discord
|
||||
.as_ref()
|
||||
.expect("missing discord config")
|
||||
.bot_token
|
||||
.clone(),
|
||||
);
|
||||
let mut client_builder =
|
||||
twilight_http::Client::builder().token(libpk::config.discord().bot_token.clone());
|
||||
|
||||
if let Some(base_url) = libpk::config
|
||||
.discord
|
||||
.as_ref()
|
||||
.expect("missing discord config")
|
||||
.api_base_url
|
||||
.clone()
|
||||
{
|
||||
if let Some(base_url) = libpk::config.discord().api_base_url.clone() {
|
||||
client_builder = client_builder.proxy(base_url, true).ratelimiter(None);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue