removed reddit download

This commit is contained in:
Watn3y 2023-08-01 03:15:45 +02:00
parent 591164c586
commit 467d12602e

View file

@ -39,7 +39,7 @@ func Download(update tgbotapi.Update, bot *tgbotapi.BotAPI) {
log.Println("[download] Failed to download URL " + update.Message.CommandArguments() + " NO URL")
message := tgbotapi.EditMessageTextConfig{
BaseEdit: tgbotapi.BaseEdit{ChatID: workingMessage.Chat.ID, MessageID: workingMessage.MessageID},
Text: "Please specify a valid YouTube or Reddit URL to download something\\nI can only download media that is hosted by YouTube or Reddit. Reddit posts that link to Imgur, for example, won't work\"",
Text: "Please specify a valid YouTube URL to download something.",
}
botIO.EditMessage(message, bot)
return
@ -88,6 +88,7 @@ func Download(update tgbotapi.Update, bot *tgbotapi.BotAPI) {
botIO.EditMessage(message, bot)
serveMedia(update, bot, downloadTarget, files[0].Name())
log.Println("[download] Served URL " + update.Message.CommandArguments() + " for " + strconv.FormatInt(update.Message.From.ID, 10) + " in chat " + strconv.FormatInt(update.Message.Chat.ID, 10))
time.Sleep(10 * time.Second)
@ -146,7 +147,7 @@ func matchURL(URL string) (matchedURL string) {
}
var domainRegex = regexp.MustCompile(`(youtube\.com$)|(youtu\.be$)|(reddit\.com$)`)
var domainRegex = regexp.MustCompile(`(youtube\.com$)|(youtu\.be$)`)
m := domainRegex.FindStringSubmatch(parsedURL.Hostname())