We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 537c005 commit fde05ddCopy full SHA for fde05dd
types.go
@@ -754,6 +754,12 @@ func (e MessageEntity) IsMention() bool {
754
return e.Type == "mention"
755
}
756
757
+// IsTextMention returns true if the type of the message entity is "text_mention"
758
+// (At this time, the user field exists, and occurs when tagging a member without a username)
759
+func (e MessageEntity) IsTextMention() bool {
760
+ return e.Type == "text_mention"
761
+}
762
+
763
// IsHashtag returns true if the type of the message entity is "hashtag".
764
func (e MessageEntity) IsHashtag() bool {
765
return e.Type == "hashtag"
0 commit comments