Added sleep command
							parent
							
								
									be4b4e06de
								
							
						
					
					
						commit
						995039d565
					
				
							
								
								
									
										12
									
								
								commands.go
								
								
								
								
							
							
						
						
									
										12
									
								
								commands.go
								
								
								
								
							|  | @ -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()) | 	log.Println("brb dying at the request of ", m.Author.String()) | ||||||
| 	os.Exit(0) | 	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) | ||||||
|  | } | ||||||
|  |  | ||||||
|  | @ -67,6 +67,7 @@ func main() { | ||||||
| 	Router.Route("xkcd", "Post a specific, random, or the latest XKCD comic", getXKCD) | 	Router.Route("xkcd", "Post a specific, random, or the latest XKCD comic", getXKCD) | ||||||
| 	Router.Route("restart", "Restart the bot.", restartBot) | 	Router.Route("restart", "Restart the bot.", restartBot) | ||||||
| 	Router.Route("kill", "Restart the bot.", restartBot) | 	Router.Route("kill", "Restart the bot.", restartBot) | ||||||
|  | 	Router.Route("sleep", "Something about sleeping...", goToSleep) | ||||||
| 
 | 
 | ||||||
| 	//Open a connection to Discord
 | 	//Open a connection to Discord
 | ||||||
| 	err = Session.Open() | 	err = Session.Open() | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue