Something went wrong. Try again.
Something went wrong. Try again.
12345678910111213141516171819202122232425262728export const meta = { id: 'stdout', name: 'stdout (debug)', description: 'Logs each item as a JSON line to the bot\'s stdout. Useful for testing rules without writing anywhere real.', modes: ['urls', 'content'], configSchema: null,};
export async function send(rule, items, ctx) { for (const item of items) { console.log(JSON.stringify({ kind: 'stdout', rule_id: rule.rule_id, mode: rule.mode, owner_discord_id: rule.owner_discord_id, owner_did: rule.owner_did, [item.kind]: item.value, guild_id: ctx.guildId, channel_id: ctx.channelId, message_id: ctx.messageId, author_id: ctx.authorId, })); } // stdout doesn't write to a real backing store, but report items "written" // so the backfill UI still moves. return { written: items.length, errors: [] };}