bot.command('mcserver [ip]',function(message){if(message.args.ip!==undefined){/* Ignore this part, it works correctly */}else{constq=newQuestion().text('Type in the address, or click the Cancel button.').answers([['Cancel']]).to(message.chat.id);bot.send(q).then(message=>{console.log('Valid Answer:',message.text);},msg=>{console.log('Invalid:',msg.text);});}});
The output is:
{ message_id: 163,
from:
{ id: 265228448,
first_name: 'Austin',
last_name: 'Huang',
username: 'austinhuang' },
chat:
{ id: 265228448,
first_name: 'Austin',
last_name: 'Huang',
username: 'austinhuang',
type: 'private' },
date: 1477604906,
text: 'test' }
(node:27815) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): TypeError: Cannot read property 'text' of undefined
(node:27815) DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
The input is:
The output is:
#20
Oh it's the same question