mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-11-25 19:48:43 +00:00
renames
This commit is contained in:
parent
34eb6eb4bf
commit
21e3e10222
@ -61,9 +61,9 @@
|
|||||||
* `MediaGroupMemberInputMedia` children now can be deserialized (but only those ones who are declared inside library)
|
* `MediaGroupMemberInputMedia` children now can be deserialized (but only those ones who are declared inside library)
|
||||||
* `TelegramBotAPI-extensions-utils`:
|
* `TelegramBotAPI-extensions-utils`:
|
||||||
* Chat events splitters added:
|
* Chat events splitters added:
|
||||||
* Extension `Flow<ChatEventMessage>#channelEvents` was added
|
* Extension `Flow<ChatEventMessage>#onlyChannelEvents` was added
|
||||||
* Extension `Flow<ChatEventMessage>#groupEvents` was added
|
* Extension `Flow<ChatEventMessage>#onlyGroupEvents` was added
|
||||||
* Extension `Flow<ChatEventMessage>#supergroupEvents` was added
|
* Extension `Flow<ChatEventMessage>#onlySupergroupEvents` was added
|
||||||
|
|
||||||
### 0.27.1
|
### 0.27.1
|
||||||
|
|
||||||
|
@ -116,15 +116,15 @@ filter.messageFlow.asContentMessagesFlow().onlyPhotoContentMessages().onEach {
|
|||||||
)
|
)
|
||||||
```
|
```
|
||||||
|
|
||||||
##### Chat actions
|
#### Chat actions
|
||||||
|
|
||||||
Chat actions can be divided for three types of events source:
|
Chat actions can be divided for three types of events source:
|
||||||
|
|
||||||
| Type | Flow extension |
|
| Type | Flow extension |
|
||||||
|:---- |:-------------- |
|
|:---- |:-------------- |
|
||||||
| Channel events | `channelEvents` |
|
| Channel events | `onlyChannelEvents` |
|
||||||
| Group events | `groupEvents` |
|
| Group events | `onlyGroupEvents` |
|
||||||
| Supergroup events | `supergroupEvents` |
|
| Supergroup events | `onlySupergroupEvents` |
|
||||||
|
|
||||||
## Shortcuts
|
## Shortcuts
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
package com.github.insanusmokrassar.TelegramBotAPI.extensions.utils
|
package com.github.insanusmokrassar.TelegramBotAPI.extensions.utils.chat_events
|
||||||
|
|
||||||
import com.github.insanusmokrassar.TelegramBotAPI.types.message.*
|
import com.github.insanusmokrassar.TelegramBotAPI.types.message.*
|
||||||
import com.github.insanusmokrassar.TelegramBotAPI.types.message.abstracts.ChatEventMessage
|
import com.github.insanusmokrassar.TelegramBotAPI.types.message.abstracts.ChatEventMessage
|
||||||
@ -16,6 +16,6 @@ fun <T : ChatEventMessage> Flow<ChatEventMessage>.divideBySource(contentType: KC
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fun Flow<ChatEventMessage>.channelEvents() = divideBySource(ChannelEventMessage::class)
|
fun Flow<ChatEventMessage>.onlyChannelEvents() = divideBySource(ChannelEventMessage::class)
|
||||||
fun Flow<ChatEventMessage>.groupEvents() = divideBySource(GroupEventMessage::class)
|
fun Flow<ChatEventMessage>.onlyGroupEvents() = divideBySource(GroupEventMessage::class)
|
||||||
fun Flow<ChatEventMessage>.supergroupEvents() = divideBySource(SupergroupEventMessage::class)
|
fun Flow<ChatEventMessage>.onlySupergroupEvents() = divideBySource(SupergroupEventMessage::class)
|
Loading…
Reference in New Issue
Block a user