diff --git a/src/bot/api.ts b/src/bot/api.ts index d79a44564d5..0fe0ab44631 100644 --- a/src/bot/api.ts +++ b/src/bot/api.ts @@ -1009,7 +1009,11 @@ class API extends Core { justStarted = true; for (const event of getFunctionList('streamStart')) { - this[event.fName](); + if (typeof this[event.fName] === 'function') { + this[event.fName](); + } else { + throw new Error(`!!! Event ${event.path} don't have function ${event.fName} !!!`); + } } } }