src/helper/Messenger.js
// this supports fields or normal descriptions
this supports fields or normal descriptions
this supports fields or normal descriptions
static async sendMessages(message, info, remove, removeDelay) {
    for (let i = 0; i < info.description.length; i += 1) {
      const embedInfo = {
        title: i === 0 ? info.title : null,
        avatar: i === 0 ? info.avatar : null,
        color: info.color,
        footer: i === info.description.length - 1 ? info.footer : null,
        request: i === info.description.length - 1 ? info.request : null,
        requestTime: info.requestTime,
      };
      if (Array.isArray(info.description[i])) {
        embedInfo.fields = info.description[i];
      } else {
        embedInfo.description = info.description[i];
      }
      await Messenger.sendMessage(message, embedInfo, remove, removeDelay); 
    }
  }
static async sendMessages ( message , info , remove , removeDelay ) { for ( let i = 0 ; i < info . description . length ; i += 1 ) { const embedInfo = { title : i === 0 ? info . title : null , avatar : i === 0 ? info . avatar : null , color : info . color , footer : i === info . description . length - 1 ? info . footer : null , request : i === info . description . length - 1 ? info . request : null , requestTime : info . requestTime , } ; if ( Array . isArray ( info . description [ i ] ) ) { embedInfo . fields = info . description [ i ] ; } else { embedInfo . description = info . description [ i ] ; } await Messenger . sendMessage ( message , embedInfo , remove , removeDelay ) ; } }
this supports fields or normal descriptions
this supports fields or normal descriptions
// this means that the description is an array of fields, so // we will convert it from description to fields // eslint-disable-line