Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
common/templates: add silent key to complexMessage (botlabs-gg#1456)
* lib/discordgo: add SUPPRESS_NOTIFICATIONS flag Add the recently introduced `SUPPRESS_NOTIFICATIONS` message flag to the set of `discordgo.MessageFlags`. Also add a `Flags` field to both `MessageEdit` and `MessageSend` struct, so that we can introduce a new key for `complexMessage` to suppress notifications. Signed-off-by: Luca Zeuch <l-zeuch@email.de> * common/templates: add silent key to complexMessage Follow-up to ea8711a ("lib/discordgo: add SUPPRESS_NOTIFICATIONS flag") Add a "silent" key to complexMessage to suppress notifications. Just recently a user on the support server asked whether it is possible (with yagpdb) to use the new `@silent` feature -- standing now, that is not the case. So, I've gone ahead and implemented exactly that sort of feature. I'm not expecting to have this released until the next scheduled release; we've went quite some time without it, chances are that users can still wait until the next release. A minimal working example, silently pinging the triggering user: ```go {{ sendMessage nil (complexMessage "content" .User.Mention "silent" true) }} ``` Signed-off-by: Luca Zeuch <l-zeuch@email.de> --------- Signed-off-by: Luca Zeuch <l-zeuch@email.de>
- Loading branch information