import { EmbedFieldData , MessageEmbed , MessageEmbedOptions , Util as BaseUtil } from 'discord.js' ; interface EmbedSplitOptions { count ? : number ; } /**
 * Extend the base Util class of Discord.JS with useful utils.
 */ export class Util extends BaseUtil { param options param fields param splitOptions static createEmbeds ( options , fields , splitOptions = { } ) { const embeds = [ ] ; while ( fields . length !== 0 ) { const embed = new MessageEmbed ( options ) ; embed . setTitle ( '' ) ; embed . addFields ( fields . splice ( 0 , splitOptions . count || 25 ) ) ; embeds . push ( embed ) ; } if ( embeds . length !== 0 ) { embeds [ 0 ] . setTitle ( options . title ) ; } return embeds ; } }