import type { OhbugClient , OhbugEventWithMethods } from '@ohbug/types' ; import { isFunction } from '@ohbug/utils' ; param event param client export async function notify < D > ( event , client ) { try { let result = null ; if ( event ) { result = await client . _notifier ( event ) ; } if ( isFunction ( client . _hooks . notified ) ) { client . _hooks . notified ( event , client ) ; } return result ; } catch ( e ) { client . _logger . error ( e ) ; } }