discordjsUnhandledPromiseRejectionWarning: TypeError: Function.prototype.apply was called on undefined, which is a undefined and not a function at ReactionCollector.handleCollect code example

Example 1: apply() js

The apply() method accepts arguments in an array:

var arr = [6, 89, 3, 45];
var maximus = Math.max.apply(null, arr); // returns 89

Example 2: apply js

Function.prototype.construct = function(aArgs) {
  let oNew = Object.create(this.prototype);
  this.apply(oNew, aArgs);
  return oNew;
};