More fixes, change rest of stripObjectToScalars to configAccessibleObj
This commit is contained in:
parent
4ad99975de
commit
acb4913495
66 changed files with 623 additions and 192 deletions
|
@ -1,12 +1,12 @@
|
|||
import { MessageOptions, Permissions, Snowflake, TextChannel, User } from "discord.js";
|
||||
import * as t from "io-ts";
|
||||
import { userToConfigAccessibleUser } from "src/utils/configAccessibleObjects";
|
||||
import { LogType } from "../../../data/LogType";
|
||||
import { renderTemplate } from "../../../templateFormatter";
|
||||
import {
|
||||
convertDelayStringToMS,
|
||||
noop,
|
||||
renderRecursively,
|
||||
stripObjectToScalars,
|
||||
tDelayString,
|
||||
tMessageContent,
|
||||
tNullable,
|
||||
|
@ -48,7 +48,7 @@ export const ReplyAction = automodAction({
|
|||
|
||||
const renderReplyText = async str =>
|
||||
renderTemplate(str, {
|
||||
user: stripObjectToScalars(user),
|
||||
user: userToConfigAccessibleUser(user),
|
||||
});
|
||||
const formatted =
|
||||
typeof actionConfig === "string"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { User } from "discord.js";
|
||||
import { GuildPluginData } from "knub";
|
||||
import { userToConfigAccessibleUser } from "src/utils/configAccessibleObjects";
|
||||
import { LogType } from "../../../data/LogType";
|
||||
import { stripObjectToScalars } from "../../../utils";
|
||||
import { LogsPlugin } from "../../Logs/LogsPlugin";
|
||||
import { runAutomodOnAntiraidLevel } from "../events/runAutomodOnAntiraidLevel";
|
||||
import { AutomodPluginType } from "../types";
|
||||
|
@ -21,7 +21,7 @@ export async function setAntiraidLevel(
|
|||
if (user) {
|
||||
logs.log(LogType.SET_ANTIRAID_USER, {
|
||||
level: newLevel ?? "off",
|
||||
user: stripObjectToScalars(user),
|
||||
user: userToConfigAccessibleUser(user),
|
||||
});
|
||||
} else {
|
||||
logs.log(LogType.SET_ANTIRAID_AUTO, {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue