Add more type safety to renderTagBody()'s args parameter

This commit is contained in:
Dragory 2021-08-20 22:21:42 +03:00
parent dcdaaf9de8
commit 37705d24a4
No known key found for this signature in database
GPG key ID: 5F387BA66DF8AAC1

View file

@ -1,6 +1,6 @@
import { GuildPluginData } from "knub";
import { ExtendedMatchParams } from "knub/dist/config/PluginConfigManager";
import { renderTemplate, TemplateSafeValueContainer } from "../../../templateFormatter";
import { renderTemplate, TemplateSafeValue, TemplateSafeValueContainer } from "../../../templateFormatter";
import { renderRecursively, StrictMessageContent } from "../../../utils";
import { TagsPluginType, TTag } from "../types";
import { findTagByName } from "./findTagByName";
@ -8,7 +8,7 @@ import { findTagByName } from "./findTagByName";
export async function renderTagBody(
pluginData: GuildPluginData<TagsPluginType>,
body: TTag,
args: unknown[] = [],
args: TemplateSafeValue[] = [],
extraData = {},
subTagPermissionMatchParams?: ExtendedMatchParams,
): Promise<StrictMessageContent> {