MCPcopy Index your code
hub / github.com/codebymitch/TitanBot / isEventEnabled

Function isEventEnabled

src/services/loggingService.js:165–186  ·  view source on GitHub ↗
(config, eventType)

Source from the content-addressed store, hash-verified

163}
164
165export function isEventEnabled(config, eventType) {
166 if (!config?.logging?.enabled) {
167 return false;
168 }
169
170 if (!eventType || typeof eventType !== 'string') {
171 return false;
172 }
173
174 const category = eventType.split('.')[0];
175 const enabledEvents = config.logging.enabledEvents || {};
176
177 if (enabledEvents[eventType] === false) {
178 return false;
179 }
180
181 if (enabledEvents[`${category}.*`] === false) {
182 return false;
183 }
184
185 return true;
186}
187
188function getLogChannelForEvent(config, eventType, overrideChannelId = null) {
189 if (overrideChannelId) {

Callers 1

logEventFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected