i18n.messages -> getIntlMessage

This commit is contained in:
thororen1234 2024-11-03 14:54:36 -05:00
commit 66d921620b
51 changed files with 230 additions and 225 deletions

View file

@ -8,8 +8,9 @@ import "./style.css";
import { definePluginSettings } from "@api/Settings";
import { Devs } from "@utils/constants";
import { getIntlMessage } from "@utils/discord";
import definePlugin, { OptionType } from "@utils/types";
import { Button, Forms, i18n, TextInput } from "@webpack/common";
import { Button, Forms, TextInput } from "@webpack/common";
function ReasonsComponent() {
const { reasons } = settings.use(["reasons"]);
@ -87,9 +88,9 @@ export default definePlugin({
const reasons = settings.store.reasons.length
? settings.store.reasons
: [
i18n.Messages.BAN_REASON_OPTION_SPAM_ACCOUNT,
i18n.Messages.BAN_REASON_OPTION_HACKED_ACCOUNT,
i18n.Messages.BAN_REASON_OPTION_BREAKING_RULES
getIntlMessage("BAN_REASON_OPTION_SPAM_ACCOUNT"),
getIntlMessage("BAN_REASON_OPTION_HACKED_ACCOUNT"),
getIntlMessage("BAN_REASON_OPTION_BREAKING_RULES")
];
return reasons.map(s => ({ name: s, value: s }));
},