Skip to content
This repository was archived by the owner on Jul 24, 2020. It is now read-only.

Commit 0dbf036

Browse files
author
Rivalo
committed
New readline option fixes the double message bug: Fixes #4
1 parent 539169a commit 0dbf036

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

main.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ import (
66
"fmt"
77
"log"
88

9+
"github.com/Rivalo/readline"
910
"github.com/bwmarrin/discordgo"
10-
"github.com/chzyer/readline"
1111
)
1212

1313
// Session contains the current settings of the client
@@ -48,7 +48,10 @@ func main() {
4848
SetChannelState(dg)
4949

5050
//Setup stdout logging
51-
rl, err := readline.New("> ")
51+
rl, err := readline.NewEx(&readline.Config{
52+
Prompt: "> ",
53+
UniqueEditLine: true,
54+
})
5255
if err != nil {
5356
panic(err)
5457
}

0 commit comments

Comments
 (0)