Add github webhook and mapping

This commit is contained in:
Tarrgon
2025-06-22 08:15:03 -04:00
parent 5dc38227a1
commit 8ddfbed396
12 changed files with 212 additions and 7 deletions
+14
View File
@@ -93,6 +93,12 @@ export default {
.setName('remove-link-skip-channel')
.setDescription('Remove a link skip channel.')
.setRequired(false)
)
.addChannelOption(option =>
option
.setName('github-release-channel')
.setDescription('Set the github release channel.')
.setRequired(false)
),
handler: async function (client: Client, interaction: ChatInputCommandInteraction) {
await interaction.deferReply({ flags: [MessageFlags.Ephemeral] });
@@ -241,6 +247,14 @@ export default {
}
}
const githubReleaseChannel = interaction.options.getChannel('github-release-channel');
if (githubReleaseChannel) {
await Database.setGuildGithubReleaseChannel(interaction.guildId!, githubReleaseChannel.id);
response += `Github releases channel set to ${githubReleaseChannel}.\n`;
}
if (response.length == 0) return interaction.editReply({ content: 'No settings provided.' });
interaction.editReply({ content: response });