Do some regex and markdown parsing magic to get the patch notes out of that.
Keep track in the database of number of already sent out messages per forum post.
If amount of comments in the latest post exceeds the amount stored in the database, send out the new ones.
Worked in my test instance, but better test it by yourself first. The 4 latest patch notes might be pushed out on startup since the database is not populated.
Use for example the following mongosh line to test the behaviour. Alter the count value to emulate the behavior of new posts.
db.gw2.updates.updateOne({"title": 'Game Update Notes: July 18, 2023'}, { "$set": {"title": 'Game Update Notes: July 18, 2023', "count": 2}}) will send out the last 2 update notes.
The basic idea is as follows:
Worked in my test instance, but better test it by yourself first. The 4 latest patch notes might be pushed out on startup since the database is not populated.
Use for example the following mongosh line to test the behaviour. Alter the count value to emulate the behavior of new posts.
db.gw2.updates.updateOne({"title": 'Game Update Notes: July 18, 2023'}, { "$set": {"title": 'Game Update Notes: July 18, 2023', "count": 2}})
will send out the last 2 update notes.