From 0dec97698531410d5a8d59e7efe89703576e200d Mon Sep 17 00:00:00 2001 From: Daniil Gentili Date: Sun, 3 Jul 2016 14:46:07 +0200 Subject: [PATCH] Update --- bashbot.sh | 1 + commands.sh | 3 --- question | 4 ++-- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/bashbot.sh b/bashbot.sh index 3ecb5c4..24d512b 100755 --- a/bashbot.sh +++ b/bashbot.sh @@ -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 diff --git a/commands.sh b/commands.sh index 9114345..cd6ea66 100755 --- a/commands.sh +++ b/commands.sh @@ -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]}" diff --git a/question b/question index d4bc92e..20de7de 100755 --- a/question +++ b/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