@ -13,22 +13,10 @@ if(DiscordVideosWebhookURL = ""){
Msgbox, Unable to Grab DiscordVideosWebhookURL from %SettingsIniFilepath%.`nPlease input the URL and then try again.
Return
}
/*
; If description is longer than 2k chars, then API will error out. goto section that will allow user to edit video description to shorten it for posting
if(StrLen(SocialMediaDescription) > 2000 AND VideoDescriptionForVideosChannel = ""){
Goto, CreateDescriptionForVideosPosting
}
*/
if(SocialMediaDescription = ""){
CreateDescriptionForSocialMedia()
}
; https://stackoverflow.com/questions/63160401/how-to-create-hyperlink-in-discord-in-an-embed-in-general
SubmitDescriptionForDiscordVideosChannel:
Message := "**" . VideoTitle . "**" . "`n" . SocialMediaDescription . "`n"
; https://stackoverflow.com/questions/63160401/how-to-create-hyperlink-in-discord-in-an-embed-in-general
Message :=
if(BitChuteURL != "")
Message .= "[BitChute](<" . BitChuteURL . ">) \| "
@ -55,6 +43,20 @@ if(PodcastNumber != "")
Message .= "[FDRPodcasts](<" . "https://fdrpodcasts.com/" . PodcastNumber . ">) \| "
; StrLenOfDiscordMessage :=
; trim the video description if Title + Body + Links is longer than 2000 chars
if((StrLen(VideoTitle) + StrLen(VideoDescription) + StrLen(Message)) > 2000){
DiscordAPICharsLeft := 2000 - StrLen(VideoTitle) - StrLen(Message) - 15
DiscordVideoDescription := SubStr(VideoDescription, 1, DiscordAPICharsLeft) . "..."
}
else,
DiscordVideoDescription := VideoDescription
Message := "**" . VideoTitle . "**" . "`n" . DiscordVideoDescription . "`n" . Message
Status := UploadImageToDiscord(DiscordVideosWebhookURL, Message, VideoThumbFilepath)
Message = API Response:`n%Status%
SaveOrPostProgress(Message:=Message,PostType:="ErrorLoggingTextFile")