Format
This commit is contained in:
10
bot.go
10
bot.go
@@ -20,8 +20,8 @@ const (
|
||||
|
||||
// Quote represent a quote of the flim
|
||||
type Quote struct {
|
||||
Quote string `json:"quote"`
|
||||
Page string `json:"page"`
|
||||
Quote string `json:"quote"`
|
||||
Page string `json:"page"`
|
||||
ThumbURL string `json:"thumb_url"`
|
||||
}
|
||||
|
||||
@@ -84,7 +84,7 @@ func main() {
|
||||
// Cite command
|
||||
b.Handle("/cite", func(m *tb.Message) {
|
||||
quotes, err := index.Search(m.Text)
|
||||
if err != nil || len(quotes) == 0{
|
||||
if err != nil || len(quotes) == 0 {
|
||||
b.Send(m.Chat, "Pas de citation trouvée")
|
||||
return
|
||||
}
|
||||
@@ -152,9 +152,9 @@ func Update() error {
|
||||
videos = append(
|
||||
videos,
|
||||
Quote{
|
||||
Quote: e.ChildAttr("img", "alt"),
|
||||
Quote: e.ChildAttr("img", "alt"),
|
||||
ThumbURL: e.ChildAttr("img", "data-original"),
|
||||
Page: e.ChildAttr("a", "href"),
|
||||
Page: e.ChildAttr("a", "href"),
|
||||
},
|
||||
)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user