From bb8cf305eb2b22d76ad142cbdbac07fef81569f4 Mon Sep 17 00:00:00 2001 From: Sean Hinchee Date: Mon, 24 Jul 2017 21:23:42 -0500 Subject: [PATCH] fixed formatting --- README.md | 6 ++++++ helper.go | 2 +- main.go | 11 ++--------- 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index a239ebdd6d8c23965b32146699ffdcdf7bda8c54..0304be80cb144450e569c7e120df8fea9f500343 100644 --- a/README.md +++ b/README.md @@ -5,3 +5,9 @@ Hacked up version of theboxmage's DiscordCli (see LICENSE.theboxmage README.theb JSON config is in `$home/lib/disco-cfg.json` for setting password. +## Install + +`mk crypto` if you don't have the `golang.org/x/crypto` package already +`mk deps` +`mk` + diff --git a/helper.go b/helper.go index 99b59110a1f5cdd1f3a3e9b27bdeb97549bb99be..7458276c2dd3b3d377d5cd5cb6b2c0ac46c87192 100644 --- a/helper.go +++ b/helper.go @@ -45,7 +45,7 @@ func Msg(MsgType, format string, a ...interface{}) { default: Text.Printf(format, a...) }*/ - fmt.Print(a...) + fmt.Printf(format, a...) } //Clear clears the terminal => This barely works, please fix diff --git a/main.go b/main.go index 8f0e0acc7c250abe13b11e4d19e1789281515418..d4817f080fea2686699e082bc3b290453ed0f850 100644 --- a/main.go +++ b/main.go @@ -53,16 +53,9 @@ func main() { //Attach Even Handlers State.Session.DiscordGo.AddHandler(newMessage) //State.Session.DiscordGo.AddHandler(newReaction) - //Setup Readline - /* - rl, err := readline.NewEx(&readline.Config{ - Prompt: "> ", - UniqueEditLine: true, - }) - */ //defer rl.Close() - //log.SetOutput(rl.Stderr()) // let "log" write to l.Stderr instead of os.Stderr + log.SetOutput(os.Stderr) // let "log" write to l.Stderr instead of os.Stderr State.Session.DiscordGo.UpdateStatus(0, "discord-cli") //Start Listening @@ -71,7 +64,7 @@ func main() { fmt.Print("> ") //line, _ := rl.Readline() line, _ := reader.ReadString('\n') - + line = line[:len(line)-1] //QUIT if line == ":q" {