// Emotes need to be converted from format received by IM Store to format received by TMI.js
// [{id: 25, start: 0, end: 4}, ...] --> {25: [[0, 4]]}
export default function tmiEmotes(emotes) {
  let converted = {};

  emotes.forEach(emote => {
    let {id, start, end} = emote;
    converted[id] = converted[id] || [];
    converted[id].push([start, end]);
  });

  return converted;
}
