From 90e940d5f6d1b9b2cf65194aa84b2d6253096ad7 Mon Sep 17 00:00:00 2001 From: Sean Hinchee Date: Fri, 9 Feb 2018 02:01:56 +0000 Subject: [PATCH] beer update --- TODO | 2 +- mux.go | 2 ++ x/mux/misc.go | 8 ++++++++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/TODO b/TODO index 51d9aa645385758843dba26f5d4745479964933c..52a9d3346d0f4756a9994eb1dbcedf3186e1d63c 100644 --- a/TODO +++ b/TODO @@ -1,5 +1,5 @@ Features -** Rework feed handling (don't cache feed in cfg? might be static not able to expand) +* Automated g!dump'ing of config file (backups?) * g!sum acid(1) * Support for acid(1) in g!man * Search man blocks other than 9front's diff --git a/mux.go b/mux.go index 31e2d8641982c28642a3139e6bef178c8afef803..8ae5959992c9e3b26d71deae998cc460b9240dc4 100644 --- a/mux.go +++ b/mux.go @@ -34,5 +34,7 @@ func init() { Router.Route("about", "General information about the bot.", Router.About) + Router.Route("beer", ":beer:", Router.Beer) + } diff --git a/x/mux/misc.go b/x/mux/misc.go index 73a85711a68e1817620aec83733907cf70a39a10..8926cb7e1b6d3a4d28fb180151398d650ef572f9 100644 --- a/x/mux/misc.go +++ b/x/mux/misc.go @@ -49,5 +49,13 @@ func (m *Mux) Dump(ds *discordgo.Session, dm *discordgo.Message, ctx *Context) { return } +// Beer, dude. +func (m *Mux) Beer(ds *discordgo.Session, dm *discordgo.Message, ctx *Context) { + resp := "" + resp += ":beer:" + resp += "\n" + ds.ChannelMessageSend(dm.ChannelID, resp) + return +}