added func to search based on best criteria

This commit is contained in:
2020-06-09 14:38:26 -05:00
parent 872cdf45f3
commit 968d670b29
2 changed files with 49 additions and 2 deletions

View File

@@ -68,12 +68,24 @@ func message_create (s *discordgo.Session, m *discordgo.MessageCreate) {
// awwnime (test)
if message == "awwnime" {
// get url
url := <-get_subreddit_image("awwnime")
url := <-get_image("awwnime")
// print message with url
s.ChannelMessageSend(m.ChannelID, url)
}
// other image test
if message == "self" {
// get url
url := <-get_image("self")
if(len(url) > 0) {
s.ChannelMessageSend(m.ChannelID, url)
} else {
s.ChannelMessageSend(m.ChannelID, "No images found, please try again")
}
}
//get_redditbooru("awwnime")
}