What I am trying to implement is that after some interval of time, it checks the MarketWatch site to see if there's a new link in the news finder section of the latest news page (using the scrapeArticle function) and if there is a new link (article) it will send it into the discord chat.
From lines 16-38 was my attempt at doing the above. Although a sloppy method, I could not think of any better way of implementing that, that isn't error prone. The current problem (logic error) is that it repeats the last article after posting in chat the new one. Here is what that error looks like: Error Image
Here's the entirety of my code:Part1 Part2 Part3
I am a beginner programmer and new to using Stack Overflow as well. I hope my comments and screenshots help. If you have any questions regarding the question, please ask. Any and all help would be appreciated.