chore: formatting
This commit is contained in:
parent
ba42e009f4
commit
1fd1bc893c
1 changed files with 13 additions and 15 deletions
28
src/main.rs
28
src/main.rs
|
@ -1,12 +1,14 @@
|
|||
mod commands;
|
||||
mod util;
|
||||
mod handler;
|
||||
mod util;
|
||||
|
||||
use std::thread::current;
|
||||
use chrono::Local;
|
||||
use serenity::all::{CommandInteraction, OnlineStatus};
|
||||
use serenity::async_trait;
|
||||
use serenity::builder::{CreateEmbed, CreateEmbedAuthor, CreateEmbedFooter, CreateInteractionResponse, CreateInteractionResponseMessage};
|
||||
use serenity::builder::{
|
||||
CreateEmbed, CreateEmbedAuthor, CreateEmbedFooter, CreateInteractionResponse,
|
||||
CreateInteractionResponseMessage,
|
||||
};
|
||||
use serenity::gateway::ActivityData;
|
||||
use serenity::model::application::{Command, Interaction};
|
||||
use serenity::model::gateway::Ready;
|
||||
|
@ -18,18 +20,9 @@ use util::config;
|
|||
// The voice client can be retrieved in any command using `songbird::get(ctx).await`.
|
||||
use songbird::SerenityInit;
|
||||
|
||||
// Event related imports to detect track creation failures.
|
||||
use songbird::events::{Event, EventContext, EventHandler as VoiceEventHandler, TrackEvent};
|
||||
|
||||
// To turn user URLs into playable audio, we'll use yt-dlp.
|
||||
use songbird::input::YoutubeDl;
|
||||
|
||||
// YtDl requests need an HTTP client to operate -- we'll create and store our own.
|
||||
use reqwest::Client as HttpClient;
|
||||
|
||||
// Import the `Context` to handle commands.
|
||||
use serenity::client::Context;
|
||||
|
||||
struct HttpKey;
|
||||
impl TypeMapKey for HttpKey {
|
||||
type Value = HttpClient;
|
||||
|
@ -80,15 +73,20 @@ pub async fn respond_with_error(_ctx: &Context, command: &CommandInteraction) ->
|
|||
.footer(CreateEmbedFooter::new(format!(
|
||||
"> {} | {}",
|
||||
current_time, username
|
||||
)))
|
||||
}
|
||||
|
||||
#[tokio::main]
|
||||
async fn main() {
|
||||
println!(
|
||||
r"__________ __ .___
|
||||
\______ \__ __ _______/ |_ ____ ____ __| _/____
|
||||
| _/ | | ___/\ __\_/ __ \ / \ / __ |/ _ \
|
||||
| | \ | |___ \ | | \ ___/ | | | /_/ ( <_> )
|
||||
|____|_ /____/____ > |__| \___ >|___| |____ |\____/
|
||||
\/ \/ \/ \/ \/
|
||||
");
|
||||
|____|_ /____/____ > |__| \___ >|___| |____ |\____/
|
||||
\/ \/ \/ \/ \/
|
||||
"
|
||||
);
|
||||
|
||||
// Load config
|
||||
let config = config::load().unwrap();
|
||||
|
|
Loading…
Reference in a new issue