Add search filter.

This commit is contained in:
FireMasterK 2021-06-22 15:37:29 +05:30
parent 536ec3b1cc
commit 10e1dc8c88
No known key found for this signature in database
GPG key ID: 49451E4482CC5BCD

4
bot.go
View file

@ -87,7 +87,7 @@ func handleEvent(evt *event.Event) {
q := content[index:]
request, err := http.NewRequest("GET", "https://pipedapi.kavin.rocks/search?q="+url.QueryEscape(q), nil)
request, err := http.NewRequest("GET", "https://pipedapi.kavin.rocks/search?filter=all&q="+url.QueryEscape(q), nil)
request.Header.Set("User-Agent", ua)
@ -101,7 +101,7 @@ func handleEvent(evt *event.Event) {
log.Panic(err)
}
bArray, err := io.ReadAll(resp.Body)
bArray, _ := io.ReadAll(resp.Body)
var result SearchResult