M README.md => README.md +6 -0
@@ 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`
+
M helper.go => helper.go +1 -1
@@ 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
M main.go => main.go +2 -9
@@ 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" {