You can most likely make this better by caching, but I think this solution would work for the time being. If the bot is ready to comment on a post, it first iterates through the post's comments (if any) and checks if a bot has already commented on it with the message. I decided that instead of checking by User ID (since there may be multiple people / accounts running this bot), I check if a portion of relevant text is in the comment. If it is, no need to re-comment. If not, the bot knows to go ahead and comment. Overall, this feature will prevent bots spamming a user's post telling them to repost with the new hashtag! One comment is enough :D
You can most likely make this better by caching, but I think this solution would work for the time being. If the bot is ready to comment on a post, it first iterates through the post's comments (if any) and checks if a bot has already commented on it with the message. I decided that instead of checking by User ID (since there may be multiple people / accounts running this bot), I check if a portion of relevant text is in the comment. If it is, no need to re-comment. If not, the bot knows to go ahead and comment. Overall, this feature will prevent bots spamming a user's post telling them to repost with the new hashtag! One comment is enough :D