2019-08-06 00:49:23 +00:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/bwmarrin/discordgo"
|
|
|
|
"github.com/bwmarrin/disgord/x/mux"
|
|
|
|
"io/ioutil"
|
|
|
|
"net/http"
|
|
|
|
)
|
|
|
|
|
|
|
|
//Generate a heckin swear word
|
|
|
|
func getSwear(s *discordgo.Session, m *discordgo.Message, ctx *mux.Context) {
|
|
|
|
resp := ""
|
|
|
|
swear, err := http.Get("https://swear.jawa.moe/")
|
|
|
|
if err != nil {
|
|
|
|
resp = "Error fetching swear: " + err.Error()
|
|
|
|
}
|
|
|
|
defer swear.Body.Close()
|
|
|
|
|
|
|
|
if swear.StatusCode == http.StatusOK {
|
|
|
|
body, err := ioutil.ReadAll(swear.Body)
|
|
|
|
if err != nil {
|
|
|
|
resp = "Error fetching swear: " + err.Error()
|
|
|
|
}
|
|
|
|
resp = string(body)
|
|
|
|
}
|
|
|
|
s.ChannelMessageSend(m.ChannelID, resp)
|
|
|
|
}
|
2019-08-06 01:05:30 +00:00
|
|
|
|
|
|
|
//Post the Maki Monday pic!
|
|
|
|
func makiMonday(s *discordgo.Session, m *discordgo.Message, ctx *mux.Context) {
|
|
|
|
resp := "https://maki.jawa.moe/monday.png"
|
|
|
|
s.ChannelMessageSend(m.ChannelID, resp)
|
|
|
|
}
|
2019-08-06 01:10:18 +00:00
|
|
|
|
|
|
|
//Post link to mixes B)
|
|
|
|
func postMixes(s *discordgo.Session, m *discordgo.Message, ctx *mux.Context) {
|
|
|
|
resp := "https://maki.jawa.moe/mixes/"
|
|
|
|
s.ChannelMessageSend(m.ChannelID, resp)
|
|
|
|
}
|