1
0
mirror of https://github.com/Rudi9719/kbtui.git synced 2026-03-22 11:07:22 +00:00

Bugfix: another command crashes kbtui #19

This commit is contained in:
2019-10-18 07:33:29 -04:00
parent 09c207d4be
commit dd634fd06b

View File

@ -19,6 +19,11 @@ func init() {
} }
func cmdDownloadFile(cmd []string) { func cmdDownloadFile(cmd []string) {
if len(cmd) < 2 {
printToView("Feed", fmt.Sprintf("/%s $messageId $fileName - Download a file to user's downloadpath", cmd[0]))
return
}
messageID, _ := strconv.Atoi(cmd[1]) messageID, _ := strconv.Atoi(cmd[1])
var fileName string var fileName string
if len(cmd) == 3 { if len(cmd) == 3 {