✨ Added IsEvent message util
This commit is contained in:
parent
f9dc63aa28
commit
c841acc6eb
|
@ -280,3 +280,15 @@ func (msg *Message) HasCaption() bool {
|
|||
func (msg *Message) HasAuthorSignature() bool {
|
||||
return msg != nil && msg.AuthorSignature != ""
|
||||
}
|
||||
|
||||
// IsEvent checks what current message is a any chat event.
|
||||
func (m *Message) IsEvent() bool {
|
||||
return m.IsChannelChatCreatedEvent() ||
|
||||
m.IsDeleteChatPhotoEvent() ||
|
||||
m.IsGroupChatCreatedEvent() ||
|
||||
m.IsLeftChatMemberEvent() ||
|
||||
m.IsNewChatMembersEvent() ||
|
||||
m.IsNewChatTitleEvent() ||
|
||||
m.IsSupergroupChatCreatedEvent() ||
|
||||
m.IsNewChatPhotoEvent()
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user