Skip to content

Commit f824b7b

Browse files
authored
Merge pull request #96 from louistio/claim-command-return
Add confirmation message to claim command
2 parents bd22f6f + 7e50240 commit f824b7b

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
@@ -297,9 +297,10 @@ export class HelpChanModule extends Module {
297297
userId: member.id,
298298
});
299299
if (helpUser) {
300-
return msg.channel.send(
300+
await msg.channel.send(
301301
`${member.displayName} already has an open help channel: <#${helpUser.channelId}>`,
302302
);
303+
return;
303304
}
304305

305306
const channelMessages = await msg.channel.messages.fetch({ limit: 50 });
@@ -326,9 +327,10 @@ export class HelpChanModule extends Module {
326327
) as TextChannel | undefined;
327328

328329
if (!claimedChannel) {
329-
return msg.channel.send(
330+
await msg.channel.send(
330331
':warning: failed to claim a help channel, no available channel.',
331332
);
333+
return;
332334
}
333335

334336
this.busyChannels.add(claimedChannel.id);
@@ -346,6 +348,8 @@ export class HelpChanModule extends Module {
346348
await this.ensureAskChannels(msg.guild!);
347349

348350
this.busyChannels.delete(claimedChannel.id);
351+
352+
await msg.channel.send(`👌 successfully claimed ${claimedChannel}`);
349353
}
350354

351355
// Commands to fix race conditions

0 commit comments

Comments
 (0)