Fixed some items not being logged to errorlog.txt
This commit is contained in:
@@ -1,7 +1,15 @@
|
||||
PostToDiscord:
|
||||
;------------------------------------------------
|
||||
CurrentSite := "Discord"
|
||||
|
||||
if(!FileExist(VideoThumbFilepath)){
|
||||
Message = Post Aborted.`nVideo Thumbnail not found at:`n%VideoThumbFilepath%
|
||||
SaveOrPostProgress(Message,PostType:="ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
||||
MsgBox 0x10,, %Message%
|
||||
Return
|
||||
}
|
||||
|
||||
|
||||
CurrentSocialMediaPosting := "Discord"
|
||||
Message = Posting Video Links to Discord
|
||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
||||
|
||||
|
||||
@@ -1,6 +1,14 @@
|
||||
PostToTelegram:
|
||||
;------------------------------------------------
|
||||
CurrentSocialMediaPosting := "Telegram"
|
||||
CurrentSite := "Telegram"
|
||||
|
||||
if(!FileExist(VideoThumbFilepath)){
|
||||
Message = Post Aborted.`nVideo Thumbnail not found at:`n%VideoThumbFilepath%
|
||||
SaveOrPostProgress(Message,PostType:="ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
||||
MsgBox 0x10,, %Message%
|
||||
Return
|
||||
}
|
||||
|
||||
|
||||
Message = Posting Video Links to Telegram
|
||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
||||
@@ -90,11 +98,10 @@ if(StrLenOfMessageAndVideoLinks < 1024) {
|
||||
SaveOrPostProgress(Message:=Message,PostType:=",ErrorLoggingTextFile")
|
||||
|
||||
if(InStr(Status, "error_code")){
|
||||
Message = Telegram Post Failed due to an API Issue. Error was saved to ErrorLogging file. Please send it to Yuriy.
|
||||
Message = Telegram Post Failed Due To An Api Issue. Please See Errorlog For More Info.
|
||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
||||
|
||||
; SaveOrPostProgress(Message:=Status,PostType:=",ErrorLoggingTextFile")
|
||||
Message = Telegram Error: %Status%
|
||||
Message = Telegram API Error:`n %Status%
|
||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
||||
|
||||
ToolTip
|
||||
@@ -129,8 +136,9 @@ else, {
|
||||
; ------------------------------------------------
|
||||
TelegramVideoTitle := TelegramVideoTitle . "`n" . VideoLinks
|
||||
Status := SendTelegramPhoto(TelegramBotToken, TelegramBotChatID, VideoThumbFilepath, caption := TelegramVideoTitle ) ; you could add more options; compare the Telegram API docs
|
||||
|
||||
|
||||
Message = API Response:`n%Status% ; Output returned data to ErrorLog File
|
||||
SaveOrPostProgress(Message:=Message,PostType:=",ErrorLoggingTextFile")
|
||||
|
||||
; Split the Description into 4096 character chunks while preserving sentences
|
||||
; Used 4095 because a ". " has to be put in at the end of the chunk.
|
||||
VideoDescriptionChunks := SplitStringWithSentences(TelegramBodymessage, 4094)
|
||||
@@ -149,7 +157,6 @@ else, {
|
||||
}
|
||||
}
|
||||
|
||||
; SaveOrPostProgress(Message:="Video Links posted to #Videos Successfully.",PostType:="Tooltip,ErrorLoggingTextFile")
|
||||
Message = Video Links Posted to Telegram Successfully
|
||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile")
|
||||
GuiControl,, PostToTelegramButton, Telegram - Posted Successfully
|
||||
|
||||
Reference in New Issue
Block a user