Added sleep command

pull/20/head
pocketjawa 2020-04-26 03:19:29 -04:00
parent be4b4e06de
commit 995039d565
2 changed files with 13 additions and 0 deletions

View File

@ -133,3 +133,15 @@ func restartBot(s *discordgo.Session, m *discordgo.Message, ctx *mux.Context) {
log.Println("brb dying at the request of ", m.Author.String())
os.Exit(0)
}
//Morgana yells at you to sleep...
func goToSleep(s *discordgo.Session, m *discordgo.Message, ctx *mux.Context) {
embed := &discordgo.MessageEmbed{
Description: "Aren't you tired?\nLet's call it a day\nand get some sleep.",
Thumbnail: &discordgo.MessageEmbedThumbnail{
URL: "https://cdn.discordapp.com/emojis/396429379686629378.png",
},
Title: "Morgana",
}
s.ChannelMessageSendEmbed(m.ChannelID, embed)
}

View File

@ -67,6 +67,7 @@ func main() {
Router.Route("xkcd", "Post a specific, random, or the latest XKCD comic", getXKCD)
Router.Route("restart", "Restart the bot.", restartBot)
Router.Route("kill", "Restart the bot.", restartBot)
Router.Route("sleep", "Something about sleeping...", goToSleep)
//Open a connection to Discord
err = Session.Open()