Skip to content

Commit

Permalink
Merge branch 'v2' into paul/inaccessible-message-helper
Browse files Browse the repository at this point in the history
  • Loading branch information
PaulSonOfLars authored Jan 19, 2024
2 parents e99a8f6 + fc1dae0 commit df9958e
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions ext/handlers/filters/message/message.go
Original file line number Diff line number Diff line change
Expand Up @@ -285,3 +285,24 @@ func ChatShared(msg *gotgbot.Message) bool {
func Story(msg *gotgbot.Message) bool {
return msg.Story != nil
}

func TopicEdited(msg *gotgbot.Message) bool {
return msg.ForumTopicEdited != nil
}

func TopicCreated(msg *gotgbot.Message) bool {
return msg.ForumTopicCreated != nil
}

func TopicClosed(msg *gotgbot.Message) bool {
return msg.ForumTopicClosed != nil
}

func TopicReopened(msg *gotgbot.Message) bool {
return msg.ForumTopicReopened != nil
}

func TopicAction(msg *gotgbot.Message) bool {
return TopicEdited(msg) || TopicCreated(msg) ||
TopicClosed(msg) || TopicReopened(msg)
}

0 comments on commit df9958e

Please sign in to comment.