diff --git a/services/kanao-cache/src/Listeners/Caches/DispatchListener.ts b/services/kanao-cache/src/Listeners/Caches/DispatchListener.ts index ae0291ac..892b9d9a 100644 --- a/services/kanao-cache/src/Listeners/Caches/DispatchListener.ts +++ b/services/kanao-cache/src/Listeners/Caches/DispatchListener.ts @@ -16,6 +16,8 @@ export class DispatchListener extends Listener { } public async run(payload: { shardId: number; data: { data: GatewayDispatchPayload; }; }): Promise { + this.logger.trace({ shardId: payload.shardId, data: payload.data }, "Dispatch event received"); + switch (payload.data.data.t) { case GatewayDispatchEvents.GuildCreate: case GatewayDispatchEvents.ChannelCreate: diff --git a/services/kanao-gateway/src/Listeners/DispatchListener.ts b/services/kanao-gateway/src/Listeners/DispatchListener.ts index 7bac9c34..38611311 100644 --- a/services/kanao-gateway/src/Listeners/DispatchListener.ts +++ b/services/kanao-gateway/src/Listeners/DispatchListener.ts @@ -17,6 +17,8 @@ export class DispatchListener extends Listener { public async run(payload: { shardId: number; data: { data: GatewayDispatchPayload; }; }): Promise { const routing = new RoutedQueue(GatewayExchangeRoutes.RECEIVE, clientId); + this.logger.trace({ shardId: payload.shardId, data: payload.data, routing }, "Dispatch event received"); + await this.store.amqp.publish(RabbitMQ.GATEWAY_EXCHANGE, routing.key, Buffer.from(JSON.stringify({ data: payload.data, shardId: payload.shardId })), { replyTo: clientId }); } }