From 15e872a80781f84185ffb3c75f774915c7267d3d Mon Sep 17 00:00:00 2001 From: MrRGnome <5963774+MrRGnome@users.noreply.github.com> Date: Wed, 11 Mar 2026 17:26:45 -0600 Subject: [PATCH] Add article help response and fix promoted URL typo --- commands/article.js | 7 +++++++ index.js | 3 ++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/commands/article.js b/commands/article.js index 07ec4d7..5f86b53 100644 --- a/commands/article.js +++ b/commands/article.js @@ -3,6 +3,7 @@ const { createDraftArticle, setArticleForumPostUrl } = require('../services/arti const { canEditData } = require('../utils/discordutils'); const DISCORD_MESSAGE_LINK_REGEX = /?/gi; +const ARTICLE_HELP_RESPONSE = "The calling structure for making an article is ```!article \n<content>``` where every message link will be exactly that message content, including images and most markdown formatting. All the messages, including the parent one, and their white space are respected. You're stitching them together as they literally are.\n\nOnce an article has been made it will show up in the articles forum. Reply '!delete' in the forum to remove the article from the forum and the website. To promote the article to the BTCMaxis articles list, react in the forum with a :btc: emoji"; function canUserCreateArticle(member) { return canEditData(member); @@ -206,6 +207,11 @@ async function articleCommand(message, args) { } const { title, bodyTemplate } = parseArticleCommandInput(message); + if (!title && !bodyTemplate) { + await message.reply(ARTICLE_HELP_RESPONSE); + return; + } + if (!title || !bodyTemplate) { await message.reply(`Usage: \`${message.client.prefix}article <title>\` then body text with Discord message links.`); return; @@ -339,3 +345,4 @@ module.exports = { + diff --git a/index.js b/index.js index c7820fa..f95e493 100644 --- a/index.js +++ b/index.js @@ -516,7 +516,7 @@ client.on('messageReactionAdd', async (reaction, user) => { if (alreadyPublished) return; - await message.reply("Article published and available at https://btcmaxies.com/articles.html"); + await message.reply("Article published and available at https://btcmaxis.com/articles.html"); } catch (error) { console.error('Error processing article reactions:', error); } @@ -540,3 +540,4 @@ client.login(TOKEN); +