mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-23 17:45:03 +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,15 +21,15 @@ export const RunAutomodOnThreadCreate = typedGuildEventListener<AutomodPluginTyp
|
|||
|
||||
// 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);
|
||||
messageBlock: if (sourceChannel?.isText()) {
|
||||
if (sourceChannel?.isText()) {
|
||||
const sourceMessage = sourceChannel.messages.cache.find(
|
||||
(m) => m.thread?.id === thread.id || m.reference?.channelId === thread.id,
|
||||
);
|
||||
if (!sourceMessage) break messageBlock;
|
||||
|
||||
const savedMessage = pluginData.state.savedMessages.msgToSavedMessage(sourceMessage);
|
||||
savedMessage.channel_id = thread.id;
|
||||
context.message = savedMessage;
|
||||
if (sourceMessage) {
|
||||
const savedMessage = pluginData.state.savedMessages.msgToSavedMessage(sourceMessage);
|
||||
savedMessage.channel_id = thread.id;
|
||||
context.message = savedMessage;
|
||||
}
|
||||
}
|
||||
|
||||
pluginData.state.queue.add(() => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue