Skip to content

Commit 3bb8fb6

Browse files
committed
Teco Tools Bot - also allow picking videos as audio
1 parent 1583756 commit 3bb8fb6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

teco_tools_bot/src/handlers/commands.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1088,8 +1088,8 @@ async fn pickaudio(tp: TaskParams<'_>) -> Ret {
10881088
let media = tp.message.get_media_info();
10891089
let file = match media {
10901090
Some(media) => {
1091-
if !media.is_sound {
1092-
goodbye_cancel!("only audio files can be tagged.");
1091+
if !media.is_sound && !media.is_video {
1092+
goodbye_cancel!("only audio or video files can be tagged.");
10931093
}
10941094
check_too_large!(media.file);
10951095
media.file
@@ -1100,7 +1100,7 @@ async fn pickaudio(tp: TaskParams<'_>) -> Ret {
11001100
.document()
11011101
.or_else(|| tp.message.reply_to_message().and_then(|x| x.document()))
11021102
else {
1103-
goodbye_cancel!("only audio files can be tagged.");
1103+
goodbye_cancel!("only audio or video files can be tagged.");
11041104
};
11051105
check_too_large!(document.file);
11061106
&document.file

0 commit comments

Comments
 (0)