tags: expose renderTagBody() as a public function

This commit is contained in:
Dragory 2020-09-15 01:39:03 +03:00
parent fc8b78fb55
commit f82cbb43e9
No known key found for this signature in database
GPG key ID: 5F387BA66DF8AAC1

View file

@ -16,6 +16,8 @@ import moment from "moment-timezone";
import humanizeDuration from "humanize-duration";
import { convertDelayStringToMS } from "../../utils";
import { TimeAndDatePlugin } from "../TimeAndDate/TimeAndDatePlugin";
import { mapToPublicFn } from "../../pluginUtils";
import { renderTagBody } from "./util/renderTagBody";
const defaultOptions: PluginOptions<TagsPluginType> = {
config: {
@ -63,6 +65,10 @@ export const TagsPlugin = zeppelinPlugin<TagsPluginType>()("tags", {
TagCreateCmd,
],
public: {
renderTagBody: mapToPublicFn(renderTagBody),
},
onLoad(pluginData) {
const { state, guild } = pluginData;