diff options
Diffstat (limited to 'src/commands')
| -rw-r--r-- | src/commands/utilities.rs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/commands/utilities.rs b/src/commands/utilities.rs index 88829b2..f43b30e 100644 --- a/src/commands/utilities.rs +++ b/src/commands/utilities.rs | |||
| @@ -100,7 +100,7 @@ async fn temp_op( | |||
| 100 | .unwrap_or_default(); | 100 | .unwrap_or_default(); |
| 101 | let dir = format!( | 101 | let dir = format!( |
| 102 | "{}/op_{}", | 102 | "{}/op_{}", |
| 103 | crate::config::TEMP_PATH, | 103 | crate::config::temp_path(), |
| 104 | uuid::Uuid::new_v4() | 104 | uuid::Uuid::new_v4() |
| 105 | ); | 105 | ); |
| 106 | tokio::fs::create_dir_all(&dir).await?; | 106 | tokio::fs::create_dir_all(&dir).await?; |
| @@ -506,7 +506,7 @@ async fn run_download( | |||
| 506 | } | 506 | } |
| 507 | let fmt = fformat.unwrap_or("mp4"); | 507 | let fmt = fformat.unwrap_or("mp4"); |
| 508 | let is_audio = matches!(fmt, "mp3" | "wav" | "m4a"); | 508 | let is_audio = matches!(fmt, "mp3" | "wav" | "m4a"); |
| 509 | let dl_dir = format!("{}/dl_{}", crate::config::TEMP_PATH, uuid::Uuid::new_v4()); | 509 | let dl_dir = format!("{}/dl_{}", crate::config::temp_path(), uuid::Uuid::new_v4()); |
| 510 | tokio::fs::create_dir_all(&dl_dir).await.ok(); | 510 | tokio::fs::create_dir_all(&dl_dir).await.ok(); |
| 511 | 511 | ||
| 512 | let out_template = match filename_user { | 512 | let out_template = match filename_user { |
| @@ -651,7 +651,7 @@ pub async fn compress( | |||
| 651 | #[description = "Force upload to Copyparty"] serwer: Option<bool>, | 651 | #[description = "Force upload to Copyparty"] serwer: Option<bool>, |
| 652 | ) -> Result<()> { | 652 | ) -> Result<()> { |
| 653 | ctx.defer().await?; | 653 | ctx.defer().await?; |
| 654 | tokio::fs::create_dir_all(crate::config::TEMP_PATH) | 654 | tokio::fs::create_dir_all(crate::config::temp_path()) |
| 655 | .await | 655 | .await |
| 656 | .ok(); | 656 | .ok(); |
| 657 | 657 | ||
| @@ -727,7 +727,7 @@ pub async fn convert( | |||
| 727 | #[description = "Force upload to Copyparty"] serwer: Option<bool>, | 727 | #[description = "Force upload to Copyparty"] serwer: Option<bool>, |
| 728 | ) -> Result<()> { | 728 | ) -> Result<()> { |
| 729 | ctx.defer().await?; | 729 | ctx.defer().await?; |
| 730 | tokio::fs::create_dir_all(crate::config::TEMP_PATH) | 730 | tokio::fs::create_dir_all(crate::config::temp_path()) |
| 731 | .await | 731 | .await |
| 732 | .ok(); | 732 | .ok(); |
| 733 | 733 | ||
| @@ -899,7 +899,7 @@ pub async fn download( | |||
| 899 | #[description = "Custom output filename"] filename_user: Option<String>, | 899 | #[description = "Custom output filename"] filename_user: Option<String>, |
| 900 | ) -> Result<()> { | 900 | ) -> Result<()> { |
| 901 | ctx.defer().await?; | 901 | ctx.defer().await?; |
| 902 | tokio::fs::create_dir_all(crate::config::TEMP_PATH) | 902 | tokio::fs::create_dir_all(crate::config::temp_path()) |
| 903 | .await | 903 | .await |
| 904 | .ok(); | 904 | .ok(); |
| 905 | run_download( | 905 | run_download( |
| @@ -974,7 +974,7 @@ pub async fn message_compression(ctx: Context<'_>, message: serenity::Message) - | |||
| 974 | return Ok(()); | 974 | return Ok(()); |
| 975 | } | 975 | } |
| 976 | ctx.defer().await?; | 976 | ctx.defer().await?; |
| 977 | tokio::fs::create_dir_all(crate::config::TEMP_PATH) | 977 | tokio::fs::create_dir_all(crate::config::temp_path()) |
| 978 | .await | 978 | .await |
| 979 | .ok(); | 979 | .ok(); |
| 980 | 980 | ||
| @@ -1030,7 +1030,7 @@ pub async fn message_download(ctx: Context<'_>, message: serenity::Message) -> R | |||
| 1030 | return Ok(()); | 1030 | return Ok(()); |
| 1031 | } | 1031 | } |
| 1032 | ctx.defer().await?; | 1032 | ctx.defer().await?; |
| 1033 | tokio::fs::create_dir_all(crate::config::TEMP_PATH) | 1033 | tokio::fs::create_dir_all(crate::config::temp_path()) |
| 1034 | .await | 1034 | .await |
| 1035 | .ok(); | 1035 | .ok(); |
| 1036 | 1036 | ||
