feat: customizable message for required params #36

Merged
amovah merged 4 commits from master into master 2017-09-12 16:04:27 +00:00
amovah commented 2017-09-12 09:14:10 +00:00 (Migrated from github.com)

#17

#17
mdibaiee (Migrated from github.com) requested changes 2017-09-12 11:58:20 +00:00
mdibaiee (Migrated from github.com) left a comment

Thanks Ali

Thanks Ali
mdibaiee (Migrated from github.com) commented 2017-09-12 11:57:55 +00:00

I'm not in favor of optional arguments that come in the middle and not the end.
Let's move this to the last argument to avoid confusions.

I'm not in favor of optional arguments that come in the middle and not the end. Let's move this to the last argument to avoid confusions.
amovah commented 2017-09-12 14:10:41 +00:00 (Migrated from github.com)

I've changed the code, as you wish.

I've changed the code, as you wish.
mdibaiee (Migrated from github.com) requested changes 2017-09-12 14:16:25 +00:00
mdibaiee (Migrated from github.com) commented 2017-09-12 14:16:19 +00:00

I think you can instead do this:

const msg = new Message().to(msg.chat.id).text(customMessage[param] || `Enter value for ${param}`)
I think you can instead do this: ```javascript const msg = new Message().to(msg.chat.id).text(customMessage[param] || `Enter value for ${param}`) ```
amovah (Migrated from github.com) reviewed 2017-09-12 15:58:24 +00:00
amovah (Migrated from github.com) commented 2017-09-12 15:58:24 +00:00

yea, it's good idea. it's done.

yea, it's good idea. it's done.
mdibaiee (Migrated from github.com) approved these changes 2017-09-12 16:04:06 +00:00
mdibaiee (Migrated from github.com) left a comment

Thanks

Thanks
Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: thereadme/node-telegram-api#36
No description provided.