From bac18a91cc3633efcefa4ecb2d8ff96f51b88481 Mon Sep 17 00:00:00 2001 From: Dark <7890309+DarkView@users.noreply.github.com> Date: Wed, 29 Jul 2020 01:28:00 +0200 Subject: [PATCH] Add "use maincontent instead of -content" to post_embed --- backend/src/plugins/Post/commands/PostEmbedCmd.ts | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/backend/src/plugins/Post/commands/PostEmbedCmd.ts b/backend/src/plugins/Post/commands/PostEmbedCmd.ts index 299aef7c..707b97f5 100644 --- a/backend/src/plugins/Post/commands/PostEmbedCmd.ts +++ b/backend/src/plugins/Post/commands/PostEmbedCmd.ts @@ -3,7 +3,7 @@ import { commandTypeHelpers as ct } from "../../../commandTypes"; import { actualPostCmd } from "../util/actualPostCmd"; import { sendErrorMessage } from "src/pluginUtils"; import { Embed } from "eris"; -import { isValidEmbed } from "src/utils"; +import { isValidEmbed, trimLines } from "src/utils"; import { formatContent } from "../util/formatContent"; const COLOR_MATCH_REGEX = /^#?([0-9a-f]{6})$/; @@ -71,6 +71,17 @@ export const PostEmbedCmd = postCmd({ } } + if (args.content) { + const prefix = pluginData.guildConfig.prefix || "!"; + msg.channel.createMessage( + trimLines(` + <@!${msg.author.id}> You can now specify an embed's content directly at the end of the command: + \`${prefix}edit_embed -title "Some title" content goes here\` + The \`-content\` option will soon be removed in favor of this. + `), + ); + } + actualPostCmd(pluginData, msg, args.channel, { embed }, args); }, });