Type fixes + use template safe values for renderTemplate() everywhere

This commit is contained in:
Dragory 2021-08-18 20:32:45 +03:00
parent e16eb8c8d1
commit d109a58cb7
No known key found for this signature in database
GPG key ID: 5F387BA66DF8AAC1
21 changed files with 190 additions and 98 deletions

View file

@ -1,7 +1,7 @@
import * as t from "io-ts";
import { GuildPluginData } from "knub";
import { CaseTypes } from "../../../data/CaseTypes";
import { renderTemplate } from "../../../templateFormatter";
import { renderTemplate, TemplateSafeValueContainer } from "../../../templateFormatter";
import { CasesPlugin } from "../../Cases/CasesPlugin";
import { ActionError } from "../ActionError";
import { CustomEventsPluginType, TCustomEvent } from "../types";
@ -18,7 +18,7 @@ export type TCreateCaseAction = t.TypeOf<typeof CreateCaseAction>;
export async function createCaseAction(
pluginData: GuildPluginData<CustomEventsPluginType>,
action: TCreateCaseAction,
values: any,
values: TemplateSafeValueContainer,
event: TCustomEvent,
eventData: any,
) {