Skip to content

Commit 8746c0b

Browse files
committed
Add confirmation message to claim command
1 parent deecd98 commit 8746c0b

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/modules/helpchan.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -291,9 +291,10 @@ export class HelpChanModule extends Module {
291291
userId: member.id,
292292
});
293293
if (helpUser) {
294-
return msg.channel.send(
294+
await msg.channel.send(
295295
`${member.displayName} already has an open help channel: <#${helpUser.channelId}>`,
296296
);
297+
return;
297298
}
298299

299300
const channelMessages = await msg.channel.messages.fetch({ limit: 50 });
@@ -320,9 +321,10 @@ export class HelpChanModule extends Module {
320321
) as TextChannel | undefined;
321322

322323
if (!claimedChannel) {
323-
return msg.channel.send(
324+
await msg.channel.send(
324325
':warning: failed to claim a help channel, no available channel.',
325326
);
327+
return;
326328
}
327329

328330
this.busyChannels.add(claimedChannel.id);
@@ -340,6 +342,8 @@ export class HelpChanModule extends Module {
340342
await this.ensureAskChannels(msg.guild!);
341343

342344
this.busyChannels.delete(claimedChannel.id);
345+
346+
await msg.channel.send(`👌 successfully claimed ${claimedChannel}`);
343347
}
344348

345349
// Commands to fix race conditions

0 commit comments

Comments
 (0)