fix(auto-delete): guard nickname reset on role hierarchy + surface LLM parse errors
- resetOffensiveNickname: skip when target role sits above bot (member.manageable) instead of hammering a doomed setNickname PATCH that Discord rejects with 50013 'Missing Permissions'. Log the Discord error code on failure for clear diagnosis. - llmCaller: include contentPreview (first 200 chars) in the parse- failure warning so non-JSON LLM responses are debuggable.
This commit is contained in:
@@ -119,6 +119,7 @@ export async function callModerationLLM(
|
||||
{
|
||||
error: state.lastParseError,
|
||||
contentLength: rawContent.length,
|
||||
contentPreview: rawContent.slice(0, 200),
|
||||
targetIds,
|
||||
model: config.AI_LLM_MODEL,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user