mirror of
https://github.com/Rudi9719/kbtui.git
synced 2026-03-22 13:17:23 +00:00
Update helptext + download?
This commit is contained in:
@ -10,7 +10,7 @@ import (
|
||||
func init() {
|
||||
command := Command{
|
||||
Cmd: []string{"download", "d"},
|
||||
Description: "Download a file",
|
||||
Description: "/d $messageId $fileName - Download a file to user's downloadpath",
|
||||
Help: "",
|
||||
Exec: cmdDownloadFile,
|
||||
}
|
||||
@ -20,7 +20,12 @@ func init() {
|
||||
|
||||
func cmdDownloadFile(cmd []string) {
|
||||
messageID, _ := strconv.Atoi(cmd[1])
|
||||
fileName := cmd[2]
|
||||
var fileName string
|
||||
if len(cmd) == 3 {
|
||||
fileName = cmd[2]
|
||||
} else {
|
||||
fileName = ""
|
||||
}
|
||||
|
||||
chat := k.NewChat(channel)
|
||||
_, err := chat.Download(messageID, fmt.Sprintf("%s/%s", downloadPath, fileName))
|
||||
|
||||
@ -10,7 +10,7 @@ import (
|
||||
func init() {
|
||||
command := Command{
|
||||
Cmd: []string{"help", "h"},
|
||||
Description: "Show information about avaailable commands",
|
||||
Description: "/h Show information about available commands",
|
||||
Help: "",
|
||||
Exec: cmdHelp,
|
||||
}
|
||||
|
||||
@ -11,7 +11,7 @@ import (
|
||||
func init() {
|
||||
command := Command{
|
||||
Cmd: []string{"join", "j"},
|
||||
Description: "Join a channel",
|
||||
Description: "/j $team/user $channel - Join a chat, $user or $team $channel",
|
||||
Help: "",
|
||||
Exec: cmdJoin,
|
||||
}
|
||||
|
||||
@ -7,7 +7,7 @@ import "strconv"
|
||||
func init() {
|
||||
command := Command{
|
||||
Cmd: []string{"react", "r", "+"},
|
||||
Description: "React to a message",
|
||||
Description: "/r $messageId $reaction - React to a message (messageID is optional)",
|
||||
Help: "",
|
||||
Exec: cmdReact,
|
||||
}
|
||||
|
||||
@ -2,11 +2,10 @@
|
||||
|
||||
package main
|
||||
|
||||
|
||||
func init() {
|
||||
command := Command{
|
||||
Cmd: []string{"stream", "s" },
|
||||
Description: "Stream all incoming messages",
|
||||
Cmd: []string{"stream", "s"},
|
||||
Description: "/s - Stream all incoming messages",
|
||||
Help: "",
|
||||
Exec: cmdStream,
|
||||
}
|
||||
|
||||
@ -9,7 +9,7 @@ import (
|
||||
func init() {
|
||||
command := Command{
|
||||
Cmd: []string{"upload", "u"},
|
||||
Description: "Upload a file",
|
||||
Description: "/u $filePath $fileName - Upload file with optional name",
|
||||
Help: "",
|
||||
Exec: cmdUploadFile,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user