Documentation ¶
Index ¶
- Variables
- type ChatId
- type MediaType
- type Message
- func (m Message) AsReaction() Reaction
- func (m Message) ChatId() ChatId
- func (m Message) From() UserRef
- func (m Message) GetEmbeddedUrl() (*url.URL, error)
- func (m Message) HasDownloadableUrl() bool
- func (m Message) HasMedia() bool
- func (m Message) IsBotPost() bool
- func (m Message) IsCommand(commandName string) bool
- func (m Message) IsSelfReply() bool
- func (m Message) MediaId() string
- func (m Message) MediaType() MediaType
- func (m Message) MessageId() MessageId
- type MessageId
- type Post
- type Reaction
- type ReplytoMessage
- type Source
- type UserRef
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Video = MediaType{"video"} Image = MediaType{"image"} )
View Source
var RedditVideo = Source{/* contains filtered or unexported fields */}
Functions ¶
This section is empty.
Types ¶
type MediaType ¶
type MediaType struct {
// contains filtered or unexported fields
}
func NewMediaTypeFromString ¶
type Message ¶
type Message struct { Id int ReplytoMessage ReplytoMessage // contains filtered or unexported fields }
func NewMessage ¶
func (Message) AsReaction ¶
func (Message) HasDownloadableUrl ¶
func (Message) IsSelfReply ¶
type Post ¶
type Post struct { Id string ExternalSourceUrl *url.URL OriginalMessageId MessageId Type MediaType Reactions []Reaction PostedOn time.Time ChatId ChatId Poster UserRef }
func (*Post) AddReaction ¶
type ReplytoMessage ¶
type ReplytoMessage struct {
// contains filtered or unexported fields
}
func (ReplytoMessage) GetUserRef ¶
func (m ReplytoMessage) GetUserRef() (UserRef, error)
Based on the fact that bot posts always contain exactly one mention
func (ReplytoMessage) HasMedia ¶
func (m ReplytoMessage) HasMedia() bool
func (ReplytoMessage) IsPostedByBot ¶
func (m ReplytoMessage) IsPostedByBot() bool
Source Files ¶
Click to show internal directories.
Click to hide internal directories.