mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-23 17:45:03 +00:00
remove non-functional hack
This commit is contained in:
parent
e12d544e2c
commit
0f39650d06
1 changed files with 0 additions and 14 deletions
|
@ -1,6 +1,5 @@
|
|||
import { typedGuildEventListener } from "knub";
|
||||
import { RecentActionType } from "../constants";
|
||||
import { GuildSavedMessages } from "../../../data/GuildSavedMessages";
|
||||
import { runAutomod } from "../functions/runAutomod";
|
||||
import { AutomodContext, AutomodPluginType } from "../types";
|
||||
|
||||
|
@ -21,19 +20,6 @@ export const RunAutomodOnThreadCreate = typedGuildEventListener<AutomodPluginTyp
|
|||
channel: thread,
|
||||
};
|
||||
|
||||
// This is a hack to make this trigger compatible with the reply action
|
||||
const sourceChannel = thread.parent ?? pluginData.client.channels.cache.find(c => c.id === thread.parentId);
|
||||
if (sourceChannel?.isText()) {
|
||||
const sourceMessage = sourceChannel.messages.cache.find(
|
||||
m => m.thread?.id === thread.id || m.reference?.channelId === thread.id,
|
||||
);
|
||||
if (sourceMessage) {
|
||||
const savedMessage = pluginData.state.savedMessages.msgToSavedMessage(sourceMessage);
|
||||
savedMessage.channel_id = thread.id;
|
||||
context.message = savedMessage;
|
||||
}
|
||||
}
|
||||
|
||||
pluginData.state.queue.add(() => {
|
||||
pluginData.state.recentActions.push({
|
||||
type: RecentActionType.ThreadCreate,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue