mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-24 18:15:02 +00:00
tslint doesnt like labels
This commit is contained in:
parent
b147246811
commit
7e6dce23d5
1 changed files with 6 additions and 6 deletions
|
@ -21,16 +21,16 @@ export const RunAutomodOnThreadCreate = typedGuildEventListener<AutomodPluginTyp
|
||||||
|
|
||||||
// This is a hack to make this trigger compatible with the reply action
|
// 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);
|
const sourceChannel = thread.parent ?? pluginData.client.channels.cache.find((c) => c.id === thread.parentId);
|
||||||
messageBlock: if (sourceChannel?.isText()) {
|
if (sourceChannel?.isText()) {
|
||||||
const sourceMessage = sourceChannel.messages.cache.find(
|
const sourceMessage = sourceChannel.messages.cache.find(
|
||||||
(m) => m.thread?.id === thread.id || m.reference?.channelId === thread.id,
|
(m) => m.thread?.id === thread.id || m.reference?.channelId === thread.id,
|
||||||
);
|
);
|
||||||
if (!sourceMessage) break messageBlock;
|
if (sourceMessage) {
|
||||||
|
|
||||||
const savedMessage = pluginData.state.savedMessages.msgToSavedMessage(sourceMessage);
|
const savedMessage = pluginData.state.savedMessages.msgToSavedMessage(sourceMessage);
|
||||||
savedMessage.channel_id = thread.id;
|
savedMessage.channel_id = thread.id;
|
||||||
context.message = savedMessage;
|
context.message = savedMessage;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
pluginData.state.queue.add(() => {
|
pluginData.state.queue.add(() => {
|
||||||
runAutomod(pluginData, context);
|
runAutomod(pluginData, context);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue