Links

Filtered Message Formats

This documentation site is deprecated. Please visit the control panel at https://monitorss.xyz for all up-to-date functionality
With filtered formats, you're able to set specific message/embed formats to specially specified filters. They must be added via manual editing. For example, if you have a feed that tracks all the replies in a forum thread, you're able to set filters that can select certain replies and set a separate message format for them.
To show an example, we'll use an example Feed with a particular ID:
Feed
{
_id: ObjectId("abc123"),
text: "A casual person has replied on this thread"
// ...other properties
}
The format to specify filtered formats for the above feed is as follows:
FilteredFormat
{
"feed": ObjectId("abc123"),
"filters" : {
"author" : [
"SomeImportantPersonsName"
]
},
"text" : "Begone casuals! A very important person has replied!",
"embeds": [{
"title": "Alert!"
}]
}
In the above example, a forum post will normally use the text set for that feed ("A casual person has replied on this thread"). But if SomeImportantPersonsName suddenly replies, the text and embeds for the FilteredFormat will replace the feed's text and/or embeds.
  • If embeds is undefined in a filtered format, it will use the feed's embeds. If the feed's embeds is undefined, then no embed will be shown.
  • If text is undefined in a filtered format, it will use the feed's text. If the feed's text is undefined,config.feeds.defaultText will be used.

Resolving Multiple Filter Matches with Priorities

Filtered Format (Priority 2)
Filtered Format (Priority 3)
FilteredFormat
{
"feed": ObjectId("abc123"),
"priority": 2,
"filters" : {
"author" : [
"~ImportantPersonsName"
]
},
"text" : "Another important person has replied!"
}
FilteredFormat
{
"feed": ObjectId("abc123"),
"priority": 3,
"filters" : {
"author" : [
"SomeImportantPersonsName"
]
},
"text" : "Begone casuals! A very important person has replied!",
"embeds": [{
"title": "Alert!"
}]
}
Note that the second filtered format may conflict with the first one, resulting in the filters for both filtered formats passing. To resolve this, you should set a priority number greater than or equal to 0. In this case, since the first format has a higher priority, the first format will be selected.
If no priorities are set and more than one filtered format is matched, it will use none of the filtered formats and instead fall back to either feed's message if it exists or config.feeds.defaultText.
A FilteredFormat with no priority has a default priority of 0