function calcDelay(client, message, args) {
  let delay = 0;
  let [time, ...question] = args;

  if (!time || !question) {
    message.channel.send(`\`Please put valid arguments. ex. ${process.env.PREFIX || '!'}poll 1 Should I buy milk?\``);
  } else { // find delay
    if (typeof parseInt(time) === 'number' && time % 1 === 0) {
      if (time < 1) {
        message.channel.send('`Please put a valid time delay.`');
      } else if (time > 5) {
        message.channel.send('`The maximum delay is 5 minutes.`');
      } else {
        delay = 1000 * 60 * time;
      }
    } else {
      message.channel.send('`Please put a valid time delay.`');
    }
  }

  return delay;
}
// calculate how much delay the user wants
calculate how much delay the user wants
calculate how much delay the user wants
function calcDelay(client, message, args) {
  let delay = 0;
  let [time, ...question] = args;
  if (!time || !question) {
    message.channel.send(`\`Please put valid arguments. ex. ${process.env.PREFIX || '!'}poll 1 Should I buy milk?\``);
  } else { 
    if (typeof parseInt(time) === 'number' && time % 1 === 0) {
      if (time < 1) {
        message.channel.send('`Please put a valid time delay.`');
      } else if (time > 5) {
        message.channel.send('`The maximum delay is 5 minutes.`');
      } else {
        delay = 1000 * 60 * time;
      }
    } else {
      message.channel.send('`Please put a valid time delay.`');
    }
  }
  return delay;
}
function calcDelay ( client , message , args ) { let delay = 0 ; let [ time , ... question ] = args ; if ( ! time || ! question ) { message . channel . send ( ` \` ${ process . env . PREFIX || '!' } \` ` ) ; } else { if ( typeof parseInt ( time ) === 'number' && time % 1 === 0 ) { if ( time < 1 ) { message . channel . send ( '`Please put a valid time delay.`' ) ; } else if ( time > 5 ) { message . channel . send ( '`The maximum delay is 5 minutes.`' ) ; } else { delay = 1000 * 60 * time ; } } else { message . channel . send ( '`Please put a valid time delay.`' ) ; } } return delay ; }
calculate how much delay the user wants
calculate how much delay the user wants
// find delay