3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-03-15 05:41:51 +00:00

Add "use maincontent instead of -content" to post_embed

This commit is contained in:
Dark 2020-07-29 01:28:00 +02:00
parent 59ef2e6fec
commit bac18a91cc

View file

@ -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);
},
});