Skip to content

Commit

Permalink
asdf
Browse files Browse the repository at this point in the history
  • Loading branch information
cycle-five committed Jun 30, 2024
1 parent a866381 commit 17b6648
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
1 change: 0 additions & 1 deletion crack-core/src/commands/register.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ pub fn create_application_commands_cracked<U, E>(

let mut commands_builder = Vec::with_capacity(commands.len());
for command in commands {
tracing::warn!("Creating command: {:?}", command.name);
if let Some(slash_command) = command.create_as_slash_command() {
commands_builder.push(slash_command);

Check warning on line 43 in crack-core/src/commands/register.rs

View check run for this annotation

Codecov / codecov/patch

crack-core/src/commands/register.rs#L40-L43

Added lines #L40 - L43 were not covered by tests
}
Expand Down
4 changes: 4 additions & 0 deletions crack-core/src/guild/settings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ use typemap_rev::TypeMapKey;
pub(crate) const DEFAULT_LOG_PREFIX: &str = "data/logs";
pub(crate) const DEFAULT_ALLOW_ALL_DOMAINS: bool = true;
pub(crate) const DEFAULT_SETTINGS_PATH: &str = "data/settings";
#[allow(dead_code)]
pub(crate) const PIPED_WATCH_URL: &str = "https://piped.video/watch?v=";
pub(crate) const YOUTUBE_WATCH_URL: &str = "https://www.youtube.com/watch?v=";
pub(crate) const VIDEO_WATCH_URL: &str = YOUTUBE_WATCH_URL;
pub(crate) const DEFAULT_ALLOWED_DOMAINS: [&str; 1] = ["youtube.com"];
pub(crate) const DEFAULT_VOLUME_LEVEL: f32 = 1.0;
pub(crate) const DEFAULT_VIDEO_STATUS_POLL_INTERVAL: u64 = 120;
Expand Down
3 changes: 2 additions & 1 deletion crack-core/src/sources/ytdl.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
use crate::errors::CrackedError;
use crate::guild::settings::VIDEO_WATCH_URL;
use std::fmt::Display;
use tokio::process::Command;
use tokio::runtime::Handle;
Expand Down Expand Up @@ -82,7 +83,7 @@ impl MyYoutubeDl {
None
} else {
let id_string = String::from_utf8_lossy(x);
let url = format!("{}{}", "https://www.youtube.com/watch?v=", &id_string);
let url = format!("{}{}", VIDEO_WATCH_URL, &id_string);
drop(id_string);
Some(url)
}
Expand Down

0 comments on commit 17b6648

Please sign in to comment.