mirror of
https://github.com/danog/id3bot.git
synced 2024-11-30 04:19:02 +01:00
Update
This commit is contained in:
parent
834966a52b
commit
0dec976985
@ -241,6 +241,7 @@ send_file() {
|
||||
esac
|
||||
send_action $chat_id $STATUS
|
||||
res=$(curl "$URL"/sendfile -F "chat_id=$chat_id" -F "file=@$file")
|
||||
rm "$file"
|
||||
}
|
||||
|
||||
# typing for text messages, upload_photo for photos, record_video or upload_video for videos, record_audio or upload_audio for audio files, upload_document for general files, find_location for location
|
||||
|
@ -15,9 +15,6 @@ if [ "$1" = "source" ];then
|
||||
else
|
||||
if ! tmux ls | grep -v send | grep -q $copname; then
|
||||
[ ! -z ${URLS[*]} ] && {
|
||||
curl -s ${URLS[*]} -o $NAME
|
||||
send_file "${USER[ID]}" "$NAME" "$CAPTION"
|
||||
rm "$NAME"
|
||||
}
|
||||
[ ! -z ${LOCATION[*]} ] && send_location "${USER[ID]}" "${LOCATION[LATITUDE]}" "${LOCATION[LONGITUDE]}"
|
||||
|
||||
|
4
question
4
question
@ -6,7 +6,7 @@ echo "Send me the audio files that you whish to modify (up to 1.5 gigabytes than
|
||||
read url
|
||||
url=$(echo "$url" | sed 's/^\s*//g;s/\s*$//g')
|
||||
name="$RANDOM"$(basename "$url")
|
||||
wget "$url" -qO "$name" || { echo "Couldn't download file. Please try again in a few minutes."; rm "$NAME" &>/dev/null; exit 1; }
|
||||
wget "$url" -qO /tmp/"$name" || { echo "Couldn't download file. Please try again in a few minutes."; rm "$NAME" &>/dev/null; exit 1; }
|
||||
mimetype "$name" | sed 's/.*\s//' | grep -qE '^audio/' || { echo "You didn't send me an audio file."; rm "$NAME" &>/dev/null; exit 1; }
|
||||
|
||||
help=$(id3v2 --help 2>&1)
|
||||
@ -21,5 +21,5 @@ for f in artist album song comment genre year track;do
|
||||
[ "$read" != "null" ] && id3v2 --$f "$read" "$name"
|
||||
done
|
||||
echo "Send /start to restart the process and check out my other bots: @video_dl_bot, @mklwp_bot, @caption_ai_bot, @cowsaysbot, @cowthinksbot, @figletsbot, @lolcatzbot, @filtersbot, @id3bot, @pwrtelegrambot"
|
||||
echo "myfilelocationstartshere $name"
|
||||
echo "myfilelocationstartshere /tmp/$name"
|
||||
exit
|
||||
|
Loading…
Reference in New Issue
Block a user