text: // Copyright (©) 2020-2021 Shin#0484. All rights reserved. MIT License.
  
  const yes = ['yes', 'y', 'ye', 'yeah', 'yup', 'yea', 'ya'];
  const no = ['no', 'n', 'nah', 'nope', 'nop'];
  
  module.exports = class Util {
  
  	static shuffle(array) {
  		const arr = array.slice(0);
  		for (let i = arr.length - 1; i >= 0; i--) {
  			const j = Math.floor(Math.random() * (i + 1));
  			const temp = arr[i];
  			arr[i] = arr[j];
  			arr[j] = temp;
  		}
  		return arr;
  	}
    
  
  	static async verify(channel, user, time = 30000) {
  		const filter = res => {
  			const value = res.content.toLowerCase();
  			return res.author.id === user.id && (yes.includes(value) || no.includes(value));
  		};
  		const verify = await channel.awaitMessages(filter, {
  			max: 1,
  			time
  		});
  		if (!verify.size) return 0;
  		const choice = verify.first().content.toLowerCase();
  		if (yes.includes(choice)) return true;
  		if (no.includes(choice)) return false;
  		return false;
  	}
  }
  