Skip to content

Commit 662ddab

Browse files
authored
#635: add option to customize bounty board forum name (#662)
1 parent d25e0aa commit 662ddab

2 files changed

Lines changed: 12 additions & 1 deletion

File tree

ChangeLog.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
# BountyBot Change Log
2+
## BountyBot Version 2.12.0fi:
3+
- `/create-default bounty-board-forum` now has an option for customizing the new channel's name
24
## BountyBot Version 2.11.1ib:
35
- Completing or taking down bounties now cancel the bounty's event if it hasn't been closed already
46
- Fixed a crash when attempting to make an event for a bounty while missing permission

source/frontend/commands/create-default/bounty-board-forum.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,13 @@ const { Company } = require("../../../database/models");
55

66
module.exports = new SubcommandWrapper("bounty-board-forum", "Create a new bounty board forum channel sibling to this channel",
77
async function executeSubcommand(interaction, origin, runMode, logicLayer) {
8+
const customChannelName = interaction.options.getString("channel-name");
9+
810
let bountyBoard;
911
try {
1012
bountyBoard = await interaction.guild.channels.create({
1113
parent: interaction.channel.parentId,
12-
name: "the-bounty-board",
14+
name: customChannelName ?? "the-bounty-board",
1315
type: ChannelType.GuildForum,
1416
permissionOverwrites: [
1517
{
@@ -76,4 +78,11 @@ module.exports = new SubcommandWrapper("bounty-board-forum", "Create a new bount
7678
origin.company.save();
7779
interaction.reply({ content: `A new bounty board has been created: ${bountyBoard}`, flags: MessageFlags.Ephemeral });
7880
}
81+
).setOptions(
82+
{
83+
type: "String",
84+
name: "channel-name",
85+
description: "The name for the bounty board forum",
86+
required: false
87+
}
7988
);

0 commit comments

Comments
 (0)