added func to search based on best criteria
This commit is contained in:
14
bunnybot.go
14
bunnybot.go
@@ -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")
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user