diff --git a/src/toOpenAIMessages.ts b/src/toOpenAIMessages.ts index 3ee9ee8..f93d235 100644 --- a/src/toOpenAIMessages.ts +++ b/src/toOpenAIMessages.ts @@ -88,7 +88,8 @@ function getAuthorUsername(message: DiscordMessage): string | undefined { if (name.length >= 3) return name; } const name = formatName(message.author.username); - return name; + if (name.length > 0) return name; + return message.author.id; } /**