The only way I found so far is to listen to pubsub, storing the incoming allowed_twitchbot_message IDs and checking those when a new message comes in via IRC.
Vice versa, I also have to store the recent messages from IRC in case the pubsub message comes in after the IRC message… (in practice, I just delay the IRC messages by 10ms, but thats an awful solution)
I fullheartedly support the suggestion of adding approved=1, it would at least reduce the number of messages to save.