packageDocumentation import * as MessageType from "../types/message-type" ; param messageChain export function getPlain ( messageChain ) { let msg = "" ; messageChain . forEach ( ( chain ) => { if ( chain . type === "Plain" ) msg += chain . text ; } ) ; return msg ; } param text export function splitText ( text ) { const sections = [ ] ; if ( text . length < 900 ) { sections . push ( text ) ; } else { const number = Math . ceil ( text . length / 800 ) ; for ( let i = 0 ; i < number ; i ++ ) { const section = text . slice ( i * 800 , ( i + 1 ) * 800 ) ; sections . push ( section ) ; } } return sections ; }