-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from kszinhu/feat/debug-level
feat: debug level
- Loading branch information
Showing
12 changed files
with
207 additions
and
125 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
DISCORD_TOKEN={DISCORD_TOKEN} | ||
# path to the database file (.yml) | ||
DATABASE_PATH={DATABASE_PATH} | ||
DEBUG= | ||
# debug levels are "minimal", "info", "success", "error", "verbose" | ||
DEBUG={DEBUG} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,13 @@ | ||
use crate::internal::debug::{log_message, STATUS_ERROR}; | ||
|
||
use super::Radio; | ||
|
||
use rust_i18n::t; | ||
use songbird::{input::Input, ytdl}; | ||
|
||
pub async fn consumer(radio: Radio) -> Result<Input, String> { | ||
let url = radio.get_url(); | ||
let url = radio.get_url().unwrap(); | ||
let input = ytdl(&url).await; | ||
|
||
match input { | ||
Ok(input) => Ok(input), | ||
Err(why) => { | ||
log_message(&format!("Error starting source: {}", why), &STATUS_ERROR); | ||
|
||
Err(t!("commands.radio.connection_error")) | ||
} | ||
Err(why) => Err(why.to_string()), | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.