Skip to content

Commit e4f8001

Browse files
committed
Merge branch 'fix/announcementThreads' into coolify
2 parents ba05d18 + ec8309f commit e4f8001

File tree

4 files changed

+436
-408
lines changed

4 files changed

+436
-408
lines changed

backend/src/plugins/Automod/actions/startThread.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ export const StartThreadAction = automodAction({
2727
const threads = contexts.filter((c) => {
2828
if (!c.message || !c.user) return false;
2929
const channel = pluginData.guild.channels.cache.get(c.message.channel_id);
30+
console.log(JSON.stringify(channel))
3031
if (channel?.type !== ChannelType.GuildText || !channel.isTextBased()) return false; // for some reason the typing here for channel.type defaults to ThreadChannelTypes (?)
3132
// check against max threads per channel
3233
if (actionConfig.limit_per_channel && actionConfig.limit_per_channel > 0) {

backend/src/plugins/ModActions/commands/addcase/AddCaseSlashCmd.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@ export const AddCaseSlashCmd = modActionsSlashCmd({
2828
name: "type",
2929
description: "The type of case to add",
3030
required: true,
31-
choices: Object.keys(CaseTypes).map((type) => ({ name: type, value: type })),
31+
choices: Object.keys(CaseTypes)
32+
.filter((key) => isNaN(Number(key)))
33+
.map((key) => ({ name: key, value: key })),
3234
}),
3335
slashOptions.user({ name: "user", description: "The user to add a case to", required: true }),
3436

backend/src/plugins/ModActions/commands/unhidecase/UnhideCaseMsgCmd.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { commandTypeHelpers as ct } from "../../../../commandTypes.js";
22
import { modActionsMsgCmd } from "../../types.js";
3-
import { actualHideCaseCmd } from "../hidecase/actualHideCaseCmd.js";
3+
import { actualUnhideCaseCmd } from "./actualUnhideCaseCmd.js";
44

55
export const UnhideCaseMsgCmd = modActionsMsgCmd({
66
trigger: ["unhide", "unhidecase", "unhide_case"],
@@ -14,6 +14,6 @@ export const UnhideCaseMsgCmd = modActionsMsgCmd({
1414
],
1515

1616
async run({ pluginData, message: msg, args }) {
17-
actualHideCaseCmd(pluginData, msg, args.caseNum);
17+
actualUnhideCaseCmd(pluginData, msg, args.caseNum);
1818
},
1919
});

0 commit comments

Comments
 (0)