diff --git a/src/commands/fun/xkcd.rs b/src/commands/fun/xkcd.rs index 52b63d5..949a931 100644 --- a/src/commands/fun/xkcd.rs +++ b/src/commands/fun/xkcd.rs @@ -10,7 +10,7 @@ struct XkcdComic { num: u16, // the numeric ID of the xkcd comic. alt: String, // the caption of the xkcd comic. img: String, // the image URL of the xkcd comic. - title: String, // the title of the xkcd comic. + title: String // the title of the xkcd comic. } /// Retrieves the latest or a specific comic from xkcd. @@ -18,7 +18,7 @@ struct XkcdComic { pub async fn xkcd(ctx: Context<'_>, #[description = "The specific comic no. to retrieve."] number: Option) -> Result<(), Error> { let comic = match number { None => "https://xkcd.com/info.0.json".to_string(), - Some(number) => format!("https://xkcd.com/{number}/info.0.json").to_string(), + Some(number) => format!("https://xkcd.com/{number}/info.0.json").to_string() }; let client = ctx.serenity_context().data.read().await.get::().cloned().unwrap(); diff --git a/src/config.rs b/src/config.rs index 658c434..5dc5bfb 100644 --- a/src/config.rs +++ b/src/config.rs @@ -3,7 +3,7 @@ use serde::{Deserialize, Serialize}; #[derive(Debug, Clone, Deserialize, Serialize)] pub struct ConfigurationData { pub bot: BotConfig, - pub api: ApiConfig, + pub api: ApiConfig } #[derive(Debug, Clone, Deserialize, Serialize)] @@ -12,40 +12,40 @@ pub struct BotConfig { pub database: DatabaseConfig, pub discord: DiscordConfig, pub denylist: DenylistConfig, - pub logging: LoggingConfig, + pub logging: LoggingConfig } #[derive(Debug, Clone, Deserialize, Serialize)] pub struct GeneralConfig { pub codename: String, - pub prefix: String, + pub prefix: String } #[derive(Debug, Clone, Deserialize, Serialize)] pub struct LoggingConfig { pub enabled: bool, - pub level: String, + pub level: String } #[derive(Debug, Clone, Deserialize, Serialize)] pub struct DatabaseConfig { - pub url: String, + pub url: String } #[derive(Debug, Clone, Deserialize, Serialize)] pub struct DiscordConfig { pub appid: u64, - pub token: String, + pub token: String } #[derive(Debug, Clone, Deserialize, Serialize)] pub struct DenylistConfig { - pub spotify: DenylistSpotifyConfig, + pub spotify: DenylistSpotifyConfig } #[derive(Debug, Clone, Deserialize, Serialize)] pub struct DenylistSpotifyConfig { - pub ids: Vec, + pub ids: Vec } #[derive(Debug, Clone, Deserialize, Serialize)] @@ -53,46 +53,46 @@ pub struct ApiConfig { pub entertainment: EntertainmentConfig, pub minecraft: MinecraftConfig, pub music: MusicConfig, - pub services: ServicesConfig, + pub services: ServicesConfig } #[derive(Debug, Clone, Deserialize, Serialize)] pub struct EntertainmentConfig { - pub tmdb: String, + pub tmdb: String } #[derive(Debug, Clone, Deserialize, Serialize)] pub struct MinecraftConfig { - pub hypixel: String, + pub hypixel: String } #[derive(Debug, Clone, Deserialize, Serialize)] pub struct MusicConfig { pub spotify: SpotifyConfig, pub lastfm: LastFmConfig, - pub lavalink: LavalinkConfig, + pub lavalink: LavalinkConfig } #[derive(Debug, Clone, Deserialize, Serialize)] pub struct ServicesConfig { pub github: String, - pub google: String, + pub google: String } #[derive(Debug, Clone, Deserialize, Serialize)] pub struct SpotifyConfig { pub client_id: String, - pub client_secret: String, + pub client_secret: String } #[derive(Debug, Clone, Deserialize, Serialize)] pub struct LastFmConfig { - pub api_key: String, + pub api_key: String } #[derive(Debug, Clone, Deserialize, Serialize)] pub struct LavalinkConfig { pub host: String, pub port: u16, - pub password: String, + pub password: String } diff --git a/src/listeners/handler.rs b/src/listeners/handler.rs index 44d75c2..2190599 100644 --- a/src/listeners/handler.rs +++ b/src/listeners/handler.rs @@ -1,6 +1,6 @@ use serenity::{ all::{ActivityData, Context, EventHandler, OnlineStatus, Ready}, - async_trait, + async_trait }; use tracing::info; diff --git a/src/main.rs b/src/main.rs index 800ebe6..f51d48a 100644 --- a/src/main.rs +++ b/src/main.rs @@ -34,7 +34,7 @@ async fn main() -> Result<(), Error> { "warn" => Level::WARN, "info" => Level::INFO, "debug" => Level::DEBUG, - _ => Level::TRACE, + _ => Level::TRACE }; let subscriber = FmtSubscriber::builder() @@ -55,7 +55,7 @@ async fn main() -> Result<(), Error> { commands::fun::xkcd::xkcd(), commands::utilities::hello(), commands::utilities::help(), - commands::utilities::source() + commands::utilities::source(), ], ..Default::default() })