Cleanup
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
use std::sync::Arc;
|
||||
use axum::extract::{Path, State};
|
||||
use axum::extract::State;
|
||||
use axum::middleware::from_extractor;
|
||||
use axum::{Extension, Json, Router};
|
||||
use axum::routing::post;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
use std::sync::Arc;
|
||||
use axum::{middleware, Extension, Router};
|
||||
use axum::{Extension, Router};
|
||||
use axum::middleware::from_extractor;
|
||||
use axum::routing::post;
|
||||
use crate::api::auth::csprng;
|
||||
|
||||
@@ -2,7 +2,6 @@ use axum::async_trait;
|
||||
use axum::extract::FromRequestParts;
|
||||
use axum::http::request::Parts;
|
||||
use axum::http::{Method, StatusCode};
|
||||
use axum::middleware::{from_extractor, FromExtractorLayer};
|
||||
use axum_extra::{
|
||||
TypedHeader,
|
||||
headers::{Authorization, authorization::Bearer},
|
||||
|
||||
@@ -1,15 +1,13 @@
|
||||
use std::env;
|
||||
use std::sync::Arc;
|
||||
use axum::extract::{Query, State};
|
||||
use axum::http::{HeaderMap, HeaderValue, StatusCode};
|
||||
use axum::http::StatusCode;
|
||||
use axum::{Json, Router};
|
||||
use axum::http::header::SET_COOKIE;
|
||||
use axum::response::Redirect;
|
||||
use axum::routing::get;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use crate::api::auth::bearer_token::BearerTokenClaims;
|
||||
use crate::AppState;
|
||||
use crate::api::auth::csprng;
|
||||
use crate::api::auth::session::Session;
|
||||
use crate::error::SirenResult;
|
||||
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
use std::sync::{Arc, OnceLock};
|
||||
use std::sync::Arc;
|
||||
|
||||
use reqwest::Url;
|
||||
use serenity::all::UserId;
|
||||
use serenity::client::Cache;
|
||||
use serenity::model::prelude::{GuildId, ChannelId};
|
||||
use serenity::model::user::User;
|
||||
use serenity::prelude::*;
|
||||
use songbird::Songbird;
|
||||
|
||||
use crate::error::{SirenResult, Error as SirenError};
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
use std::sync::Arc;
|
||||
|
||||
use serenity::all::{
|
||||
Cache, CommandInteraction, CommandOptionType, CreateCommand, CreateCommandOption, Http,
|
||||
};
|
||||
use serenity::all::{CommandInteraction, CommandOptionType, CreateCommand, CreateCommandOption};
|
||||
use serenity::model::prelude::GuildId;
|
||||
use serenity::{prelude::*, async_trait};
|
||||
use songbird::input::{Input, YoutubeDl};
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
use std::env;
|
||||
use std::sync::Arc;
|
||||
use dotenv::{dotenv, from_filename};
|
||||
use serenity::http::Http;
|
||||
use serenity::prelude::*;
|
||||
use songbird::{SerenityInit, Songbird};
|
||||
@@ -7,7 +8,6 @@ use reqwest::Client as HttpClient;
|
||||
use serenity::all::{Cache, ShardManager, UserId};
|
||||
use crate::api::App;
|
||||
use crate::bot::handler::BotHandler;
|
||||
use crate::bot::oai::OAI;
|
||||
|
||||
mod api;
|
||||
mod bot;
|
||||
@@ -33,7 +33,11 @@ struct AppState {
|
||||
|
||||
#[tokio::main]
|
||||
async fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
dotenv::dotenv().ok();
|
||||
if let Err(err) = from_filename(".env.local") {
|
||||
eprintln!("Failed to load .env.local: {}", err);
|
||||
}
|
||||
dotenv().ok();
|
||||
|
||||
env_logger::init_from_env(env_logger::Env::default().filter_or("RUST_LOG", "warn,siren=info"));
|
||||
|
||||
data::initialize().await?;
|
||||
|
||||
Reference in New Issue
Block a user