3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-05-24 10:05:03 +00:00

tslint doesnt like labels

This commit is contained in:
almeidx 2021-09-01 17:07:11 +01:00
parent b147246811
commit 7e6dce23d5
No known key found for this signature in database
GPG key ID: F403F80B79353CB4

View file

@ -21,15 +21,15 @@ 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(() => {