Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions site/docs/guide/filter-queries.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ Sub-filters that go one level deeper:

```ts
bot.on("message:entities:url"); // messages containing a URL
bot.on("message:caption_entities:url"); // captions containing a URL
bot.on("message:entities:code"); // messages containing a code snippet
Comment on lines +54 to 55
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about this instead?

Suggested change
bot.on("message:caption_entities:url"); // captions containing a URL
bot.on("message:entities:code"); // messages containing a code snippet
bot.on("message:caption_entities:code"); // captions containing a code snippet

bot.on("edited_message:entities"); // edited messages with any kind of entities
```
Expand Down Expand Up @@ -331,6 +332,7 @@ Example:
| `"message"` | `"message"` | `undefined` | `undefined` |
| `"message:entities"` | `"message"` | `"entities"` | `undefined` |
| `"message:entities:mention"` | `"message"` | `"entities"` | `"mention"` |
| `"message:caption_entities:url"` | `"message"` | `"caption_entities"` | `"url"` |
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is inconsistent with the other rows. The point here is to show how a single query is built up in three parts. Adding a second random query is confusing.

Let's revert.

Suggested change
| `"message:caption_entities:url"` | `"message"` | `"caption_entities"` | `"url"` |


### Query Validation

Expand Down