import { inspect } from 'util' ; /** Custom error class to create human-readable errors */ export class DiscordooError extends Error { public name = 'DiscordooError' ; constructor ( source ? , ... args ) { if ( source ) args . unshift ( `[${ source }]` ) ; super ( args . map ( a => typeof a !== 'string' ? inspect ( a ) : a ) . join ( ' ' ) ) ; } }