Skip to content

Commit ef18162

Browse files
authored
Merge pull request #193 from tjjfvi/helper-comment
Allow helpers to give a comment when running !helper
2 parents afd0a54 + f318007 commit ef18162

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

src/modules/helpthread.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -237,8 +237,9 @@ export class HelpThreadModule extends Module {
237237
@command({
238238
description: 'Help System: Ping the @Helper role from a help thread',
239239
aliases: ['helpers'],
240+
single: true,
240241
})
241-
async helper(msg: Message) {
242+
async helper(msg: Message, comment: string) {
242243
if (!isHelpThread(msg.channel)) {
243244
return sendWithMessageOwnership(
244245
msg,
@@ -278,7 +279,11 @@ export class HelpThreadModule extends Module {
278279

279280
// The beacons are lit, Gondor calls for aid
280281
await Promise.all([
281-
thread.parent.send(`<@&${trustedRoleId}> ${msg.channel}`),
282+
thread.parent.send(
283+
`<@&${trustedRoleId}> ${msg.channel} ${
284+
isTrusted ? comment : ''
285+
}`,
286+
),
282287
this.updateHelpInfo(thread.parent),
283288
msg.react('✅'),
284289
HelpThread.update(thread.id, {

src/util/inhibitors.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { TextChannel } from 'discord.js';
33
import { trustedRoleId } from '../env';
44

55
export const isTrustedMember: Inhibitor = async (msg, client) => {
6-
if (!msg.guild || !msg.member || !(msg.channel instanceof TextChannel)) {
6+
if (!msg.guild || !msg.member || !msg.channel.isText()) {
77
return ":warning: you can't use that command here.";
88
}
99

0 commit comments

Comments
 (0)