TheDiscordian / onebot

One bot to rule them all...
BSD 3-Clause "New" or "Revised" License
14 stars 1 forks source link

Upgrade Sender Interface to include "Self() bool" #32

Closed TheDiscordian closed 1 year ago

TheDiscordian commented 1 year ago

Upgrade Sender interface to include Self() bool to identify messages from the bot. This will help with Monitor plugins such as qa from replying to itself.

Currently, this is all done a bit inconsistently. Some protocols will send us back what we sent them, and those are processed as new messages. This helps with bridging (so we can bridge everything). The ones that do this (such as Discord) result in monitors being hit multiple times. However ones such as bnet_irc don't do this. After this change, to move forward with bridges, we should have our own messages hit the message processor.

With the Self() bool method on the interface, we can ensure that regular trigger plugins don't fire on our own messages too.