Documentation ¶
Index ¶
- Variables
- func BroadcastNews(source *model.Source, subs []model.Subscribe, contents []model.Content)
- func BroadcastSourceError(source *model.Source)
- func CheckAdmin(upd *tb.Update) bool
- func CheckURL(s string) bool
- func FeedForChannelRegister(m *tb.Message, url string, channelMention string)
- func GetMentionFromMessage(m *tb.Message) (mention string)
- func GetURLAndMentionFromMessage(m *tb.Message) (url string, mention string)
- func HasAdminType(t tb.ChatType) bool
- func SendError(c *tb.Chat)
- func Start()
- func ToOPML(sources []model.Source) (string, error)
- func UserIsAdminChannel(userID int, channelChat *tb.Chat) (isAdmin bool)
- type Body
- type Head
- type OPML
- type Outline
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // UserState 用户状态,用于标示当前用户操作所在状态 UserState map[int64]fsm.UserStatus = make(map[int64]fsm.UserStatus) // B telebot B *tb.Bot )
Functions ¶
func BroadcastNews ¶
BroadcastNews send new contents message to subscriber
func BroadcastSourceError ¶
BroadcastSourceError send feed updata error message to subscribers
func CheckAdmin ¶
CheckAdmin check user is admin of group/channel
func FeedForChannelRegister ¶
FeedForChannelRegister register feed for channel
func GetMentionFromMessage ¶
GetMentionFromMessage get message mention
func GetURLAndMentionFromMessage ¶
GetURLAndMentionFromMessage get URL and mention from message
func HasAdminType ¶
HasAdminType check if the message is sent in the group/channel environment
Types ¶
type Head ¶
type Head struct { Title string `xml:"title"` DateCreated string `xml:"dateCreated,omitempty"` DateModified string `xml:"dateModified,omitempty"` OwnerName string `xml:"ownerName,omitempty"` OwnerEmail string `xml:"ownerEmail,omitempty"` OwnerID string `xml:"ownerId,omitempty"` Docs string `xml:"docs,omitempty"` ExpansionState string `xml:"expansionState,omitempty"` VertScrollState string `xml:"vertScrollState,omitempty"` WindowTop string `xml:"windowTop,omitempty"` WindowBottom string `xml:"windowBottom,omitempty"` WindowLeft string `xml:"windowLeft,omitempty"` WindowRight string `xml:"windowRight,omitempty"` }
Head opml head
type OPML ¶
type OPML struct { XMLName xml.Name `xml:"opml"` Version string `xml:"version,attr"` Head Head `xml:"head"` Body Body `xml:"body"` }
OPML opml struct
func (OPML) GetFlattenOutlines ¶
GetFlattenOutlines make all outline at the same xml level
type Outline ¶
type Outline struct { Outlines []Outline `xml:"outline"` Text string `xml:"text,attr"` Type string `xml:"type,attr,omitempty"` IsComment string `xml:"isComment,attr,omitempty"` IsBreakpoint string `xml:"isBreakpoint,attr,omitempty"` Created string `xml:"created,attr,omitempty"` Category string `xml:"category,attr,omitempty"` XMLURL string `xml:"xmlUrl,attr,omitempty"` HTMLURL string `xml:"htmlUrl,attr,omitempty"` URL string `xml:"url,attr,omitempty"` Language string `xml:"language,attr,omitempty"` Title string `xml:"title,attr,omitempty"` Version string `xml:"version,attr,omitempty"` Description string `xml:"description,attr,omitempty"` }
Outline opml outline
Source Files ¶
Click to show internal directories.
Click to hide internal directories.