diff --git a/Commands/Modules/VideoUtils.cs b/Commands/Modules/VideoUtils.cs index b7f8dde..482f2b2 100644 --- a/Commands/Modules/VideoUtils.cs +++ b/Commands/Modules/VideoUtils.cs @@ -27,17 +27,17 @@ public async Task TrimVideoAsync( // Achknowledge the command await DeferAsync(ephemeral); - // There is a similar check for the TimeSpan library below, but this it to avoid - if (trimStartString == "" && trimEndString == "") + // Reject incorrect video formats + if (video.ContentType != "video/mp4") { - await FollowupAsync("You must provide a start or end time to trim the video.", ephemeral: true); + await FollowupAsync("Invalid video format. Please provide an MP4 file.", ephemeral: true); return; } - // Reject incorrect video formats - if (video.ContentType != "video/mp4") + // There is a similar check for the TimeSpan library below, but this it to avoid + if (string.IsNullOrEmpty(trimStartString) && string.IsNullOrEmpty(trimEndString)) { - await FollowupAsync("Invalid video format. Please provide an MP4 file.", ephemeral: true); + await FollowupAsync("You must provide a start or end time to trim the video.", ephemeral: true); return; } @@ -171,4 +171,4 @@ public static TimeSpan TimeSpanFromHMS(string input) // Create and return the TimeSpan object return new TimeSpan(days: 0, hours, minutes, seconds, milliseconds); } -} \ No newline at end of file +}