Skip to content

Commit

Permalink
fix: patreon moving
Browse files Browse the repository at this point in the history
  • Loading branch information
winbergoscar0 committed Jul 18, 2023
1 parent 9d2b732 commit 59b6804
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/utils/rabbitmq.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export class RabbitMq implements MoveerRabbitMq {
}

public async publishMoveMessage(params: PublishMessageParams): Promise<void> {
const { isPatreon, guildMember, guild, toVoiceChannel } = params;
const { guildMember, guild, toVoiceChannel } = params;

const rabbitMqMessage: RabbitMqMessage = {
guildId: guild.id,
Expand All @@ -42,7 +42,8 @@ export class RabbitMq implements MoveerRabbitMq {
// Fallback to 0 if unable to find shardId
const shardId = this.client.shard?.ids[0].toString() ?? '0';

const queue = isPatreon ? guild.id : shardId;
// TODO - Patreon
const queue = shardId;

this.rabbitMqChannel.assertQueue(queue, {
durable: true,
Expand All @@ -55,10 +56,11 @@ export class RabbitMq implements MoveerRabbitMq {
persistent: true,
},
);
logger.info(rabbitMqMessage, 'Published message');
logger.info(rabbitMqMessage, `Published message to queue: ${queue}`);
}

public createConsumer(queue: string): void {
logger.info(`Creating consumer on queue: ${queue}}`);
this.rabbitMqChannel.assertQueue(queue, {
durable: true,
});
Expand Down

0 comments on commit 59b6804

Please sign in to comment.