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