diff --git a/commands.go b/commands.go index 7f53ce3..63bff75 100644 --- a/commands.go +++ b/commands.go @@ -134,13 +134,18 @@ func (handler *CommandHandler) CommandHelp(ce *CommandEvent) { }, "\n")) } -const cmdImportHelp = `import JID|contacts - Open up a room for JID or for each WhatsApp contact` +const cmdImportHelp = `import |contacts - Open up a room for JID or for each WhatsApp contact` // CommandImport handles import command func (handler *CommandHandler) CommandImport(ce *CommandEvent) { // ensure all messages go to the management room ce.RoomID = ce.User.ManagementRoom + if len(ce.Args) == 0 { + ce.Reply("Usage: import |contacts") + return + } + user := ce.User if ce.Args[0] == "contacts" {