update readme
This commit is contained in:
parent
2ba9b1405f
commit
f21c414f1b
3 changed files with 22 additions and 17 deletions
28
README.md
28
README.md
|
@ -12,9 +12,9 @@ TODO
|
|||
Go is more portable than Node.js
|
||||
|
||||
## TODO
|
||||
- [ ] Send mode
|
||||
- [x] Send mode
|
||||
- [ ] Commands
|
||||
- [ ] Quit (q)
|
||||
- [x] Quit (q)
|
||||
- [ ] Switch guilds (G)
|
||||
- [ ] Switch channels (g)
|
||||
- [ ] List online users in guild (w)
|
||||
|
@ -25,6 +25,8 @@ Go is more portable than Node.js
|
|||
- Creation date, join date, ID, etc
|
||||
- [ ] Room history (r)
|
||||
- [ ] Extended room history (R)
|
||||
- [ ] Peek (p)
|
||||
- [ ] Cross-guild peek (P)
|
||||
- [ ] List channels (l)
|
||||
- [ ] List guilds (L)
|
||||
- [ ] Clear (c)
|
||||
|
@ -33,20 +35,20 @@ Go is more portable than Node.js
|
|||
- [ ] AFK toggle (A)
|
||||
- [ ] Send DM (s)
|
||||
- [ ] Answer DM (a)
|
||||
- [ ] Message Receiving
|
||||
- [x] Message Receiving
|
||||
- Markdown styling
|
||||
- [ ] Emotes
|
||||
- [x] Emotes
|
||||
- [ ] Timestamp parsing
|
||||
- [ ] Mentions parsing
|
||||
- [x] Mentions parsing
|
||||
- [ ] Embeds in the style of commode's posted links
|
||||
- [ ] Messages wrapped in `*`'s or `_`'s parsed as emotes
|
||||
- [ ] Inline DMs to replicate commode's private messages
|
||||
- [ ] Replies
|
||||
- [x] Messages wrapped in `*`'s or `_`'s parsed as emotes
|
||||
- [x] Inline DMs to replicate commode's private messages
|
||||
- [x] Replies
|
||||
- [ ] Group DMs
|
||||
- [ ] Message sending
|
||||
- [ ] Puts incoming messages into queue whilst in send mode
|
||||
- [ ] Configuration
|
||||
- [ ] Write token from argv into rc file if rc file doesn't exist
|
||||
- [ ] Default guild/channel
|
||||
- [x] Message sending
|
||||
- [x] Puts incoming messages into queue whilst in send mode
|
||||
- [x] Configuration
|
||||
- [x] Write token from argv into rc file if rc file doesn't exist
|
||||
- [x] Default guild/channel
|
||||
- [ ] Threads
|
||||
- [ ] External rich presence when using bot accounts
|
||||
|
|
|
@ -1,12 +1,14 @@
|
|||
package commands
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/bwmarrin/discordgo"
|
||||
)
|
||||
|
||||
func QuitCommand(session *discordgo.Session) {
|
||||
fmt.Print("Unlinking TTY...\n\r")
|
||||
session.Close()
|
||||
os.Exit(0)
|
||||
}
|
||||
|
|
9
main.go
9
main.go
|
@ -66,7 +66,8 @@ func main() {
|
|||
// TODO: user account support
|
||||
client, err := discordgo.New("Bot " + token)
|
||||
if err != nil {
|
||||
fmt.Println("\r% Failed to create client:", err)
|
||||
fmt.Println("% Failed to create client:", err)
|
||||
fmt.Print("\r")
|
||||
os.Exit(1)
|
||||
return
|
||||
}
|
||||
|
@ -93,7 +94,8 @@ func main() {
|
|||
|
||||
err = client.Open()
|
||||
if err != nil {
|
||||
fmt.Println("\r% Failed to connect to Discord:", err)
|
||||
fmt.Println("% Failed to connect to Discord:", err)
|
||||
fmt.Print("\r")
|
||||
os.Exit(1)
|
||||
return
|
||||
}
|
||||
|
@ -101,8 +103,7 @@ func main() {
|
|||
keyboard.Listen(func(key keys.Key) (stop bool, err error) {
|
||||
if !state.IsInPrompt() {
|
||||
if key.Code == keys.CtrlC {
|
||||
client.Close()
|
||||
os.Exit(0)
|
||||
commands.QuitCommand(client)
|
||||
return true, nil
|
||||
} else {
|
||||
command, has := commands.GetCommand(key.String())
|
||||
|
|
Loading…
Reference in a new issue