AI Slop Code Risk Monitor

discordjs/discord.js

SlopCodeMonitor badge for discordjs/discord.js Adjusted legacy signal; badge bands: 25 / 50 / 75 (different from dashboard bands).

A powerful JavaScript library for interacting with the Discord API

1.8 Low pattern signal View on GitHub

Open-Source Code Quality, Security and Technical Debt Review

This report summarizes scanner evidence for discordjs/discord.js, a TypeScript project with 26,825 GitHub stars. SynthScan examined 199,635 lines of code across 1541 source files, recording 119 pattern matches distributed across 6 syntactic categories. The legacy adjusted pattern signal is 1.8 (Low pattern signal); it is not an authorship estimate.

Use the findings to ask whether maintainers can explain intent, verify dependencies, simplify unnecessary scaffolding, and focus review effort. Risk Payload v1 adds ownership, supply-chain, over-engineering, and review-effort vectors when available. These are prompts for human verification, not probabilities, security findings, or measured maintenance costs.

1.8
Adjusted Signal
1.8
Raw Pattern Score
100%
Time Factor
2026-10-30
Last Push
26.8K
Stars
TypeScript
Language
199.6K
Lines of Code
1.5K
Files
119
Pattern Hits
2026-10-31
Scan Date
0.03
HC Hit Rate

Risk Review · Payload v1

Use each vector to guide manual verification of the underlying findings.

Payload schema: 1.0.0 · Engine: 2.0.0 · Scoring: heuristic-density-v1 · Scan date: 2026-10-31.

Cognitive Ownership Risk 1.7/100 · LOW

Can maintainers explain intent, assumptions, and trade-offs? 64 finding(s).

Hallucinated Dependency & Supply Chain Risk 3.0/100 · LOW

Are imports declared and package/API names verified? 22 finding(s).

Agent Over-Engineering Ratio 5.0/100 · LOW

Are wrappers, guards, and repeated structures necessary? 72 finding(s).

PR Review Velocity Impact 9.2/100 · LOW

Which changes need focused human review? 119 finding(s).

What These Metrics Mean

Adjusted Signal
Legacy pattern score normalized per 1,000 scanned lines and multiplied by the repository-level time factor. It is not an estimate of AI authorship.
Raw Pattern Score
Sum of severity- and context-weighted pattern findings before applying the time factor.
Time Factor
A coarse multiplier based on repository last-push metadata. It does not identify when individual code was written.
Pattern Hits
Count of configured pattern findings. Review each location and surrounding code before acting.
HC Hit Rate
High- and critical-severity findings per scanned file. Severity is a configured detector weight, not proof of a vulnerability or authorship.
Lines / Files
Scan coverage denominators used by the legacy normalized score.

Pattern-Signal History

This chart tracks the legacy adjusted pattern score across scan runs. Changes can reflect source changes, scan coverage, or detector/scoring versions; they do not measure AI adoption or prove that a team refactored code. Compare runs only when their scoring versions are compatible. The dashed line tracks the raw pattern-hit count.

Severity Breakdown

Groups findings by configured severity weight. Severity is not a confidence estimate, security rating, or proof that a package is missing. Verify imports against the project's manifests and inspect each finding in its local design context.

CRITICAL 11HIGH 33MEDIUM 2LOW 73

Directory Score Breakdown

This horizontal bar chart shows where configured pattern scores accumulate across directories. Treat the bars as locations to inspect, not as evidence of authorship or code quality. Use the file-level findings to decide whether a directory needs a focused ownership, dependency, complexity, or review check.

Pattern Findings

The scanner identified 119 distinct pattern matches across 6 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a detector match to inspect in context. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.

Reading the findings table: The Severity column indicates the configured finding weight (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — legacy comment-context matches receive a ×1.5 score weight. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier under the legacy scoring model.

Cross-File Repetition33 hits · 165 pts
SeverityFileLineSnippetContext
HIGHpackages/discord.js/cliff.toml0# changelog all notable changes to this project will be documented in this file.\nSTRING
HIGHpackages/ui/cliff.toml0# changelog all notable changes to this project will be documented in this file.\nSTRING
HIGHpackages/brokers/cliff.toml0# changelog all notable changes to this project will be documented in this file.\nSTRING
HIGHpackages/next/cliff.toml0# changelog all notable changes to this project will be documented in this file.\nSTRING
HIGHpackages/collection/cliff.toml0# changelog all notable changes to this project will be documented in this file.\nSTRING
HIGHpackages/core/cliff.toml0# changelog all notable changes to this project will be documented in this file.\nSTRING
HIGHpackages/proxy/cliff.toml0# changelog all notable changes to this project will be documented in this file.\nSTRING
HIGHpackages/structures/cliff.toml0# changelog all notable changes to this project will be documented in this file.\nSTRING
HIGHpackages/create-discord-bot/cliff.toml0# changelog all notable changes to this project will be documented in this file.\nSTRING
HIGHpackages/util/cliff.toml0# changelog all notable changes to this project will be documented in this file.\nSTRING
HIGHpackages/builders/cliff.toml0# changelog all notable changes to this project will be documented in this file.\nSTRING
HIGHpackages/formatters/cliff.toml0# changelog all notable changes to this project will be documented in this file.\nSTRING
HIGHpackages/voice/cliff.toml0# changelog all notable changes to this project will be documented in this file.\nSTRING
HIGH…/scripts/turbo/generators/templates/default/cliff.toml0# changelog all notable changes to this project will be documented in this file.\nSTRING
HIGHpackages/rpc/cliff.toml0# changelog all notable changes to this project will be documented in this file.\nSTRING
HIGHpackages/rest/cliff.toml0# changelog all notable changes to this project will be documented in this file.\nSTRING
HIGHpackages/ws/cliff.toml0# changelog all notable changes to this project will be documented in this file.\nSTRING
HIGHpackages/discord.js/cliff.toml0{%- macro remote_url() -%} https://github.com/{{ remote.github.owner }}/{{ remote.github.repo }} {%- endmacro -%} {% if STRING
HIGHpackages/brokers/cliff.toml0{%- macro remote_url() -%} https://github.com/{{ remote.github.owner }}/{{ remote.github.repo }} {%- endmacro -%} {% if STRING
HIGHpackages/next/cliff.toml0{%- macro remote_url() -%} https://github.com/{{ remote.github.owner }}/{{ remote.github.repo }} {%- endmacro -%} {% if STRING
HIGHpackages/collection/cliff.toml0{%- macro remote_url() -%} https://github.com/{{ remote.github.owner }}/{{ remote.github.repo }} {%- endmacro -%} {% if STRING
HIGHpackages/core/cliff.toml0{%- macro remote_url() -%} https://github.com/{{ remote.github.owner }}/{{ remote.github.repo }} {%- endmacro -%} {% if STRING
HIGHpackages/proxy/cliff.toml0{%- macro remote_url() -%} https://github.com/{{ remote.github.owner }}/{{ remote.github.repo }} {%- endmacro -%} {% if STRING
HIGHpackages/structures/cliff.toml0{%- macro remote_url() -%} https://github.com/{{ remote.github.owner }}/{{ remote.github.repo }} {%- endmacro -%} {% if STRING
HIGHpackages/create-discord-bot/cliff.toml0{%- macro remote_url() -%} https://github.com/{{ remote.github.owner }}/{{ remote.github.repo }} {%- endmacro -%} {% if STRING
HIGHpackages/util/cliff.toml0{%- macro remote_url() -%} https://github.com/{{ remote.github.owner }}/{{ remote.github.repo }} {%- endmacro -%} {% if STRING
HIGHpackages/builders/cliff.toml0{%- macro remote_url() -%} https://github.com/{{ remote.github.owner }}/{{ remote.github.repo }} {%- endmacro -%} {% if STRING
HIGHpackages/formatters/cliff.toml0{%- macro remote_url() -%} https://github.com/{{ remote.github.owner }}/{{ remote.github.repo }} {%- endmacro -%} {% if STRING
HIGHpackages/voice/cliff.toml0{%- macro remote_url() -%} https://github.com/{{ remote.github.owner }}/{{ remote.github.repo }} {%- endmacro -%} {% if STRING
HIGH…/scripts/turbo/generators/templates/default/cliff.toml0{%- macro remote_url() -%} https://github.com/{{ remote.github.owner }}/{{ remote.github.repo }} {%- endmacro -%} {% if STRING
HIGHpackages/rpc/cliff.toml0{%- macro remote_url() -%} https://github.com/{{ remote.github.owner }}/{{ remote.github.repo }} {%- endmacro -%} {% if STRING
HIGHpackages/rest/cliff.toml0{%- macro remote_url() -%} https://github.com/{{ remote.github.owner }}/{{ remote.github.repo }} {%- endmacro -%} {% if STRING
HIGHpackages/ws/cliff.toml0{%- macro remote_url() -%} https://github.com/{{ remote.github.owner }}/{{ remote.github.repo }} {%- endmacro -%} {% if STRING
Hallucination Indicators11 hits · 110 pts
SeverityFileLineSnippetContext
CRITICALpackages/discord.js/src/structures/Presence.js396 return this.activity.presence.client.rest.cdn.appAsset(this.activity.applicationId, this.smallImage, options);CODE
CRITICALpackages/discord.js/src/structures/Presence.js423 return this.activity.presence.client.rest.cdn.appAsset(this.activity.applicationId, this.largeImage, options);CODE
CRITICALpackages/discord.js/src/structures/ThreadMember.js80 return this.member ?? this.thread.guild.members.cache.get(this.id) ?? null;CODE
CRITICAL…s/discord.js/src/structures/AutocompleteInteraction.js74 return this.guild?.commands.cache.get(id) ?? this.client.application.commands.cache.get(id) ?? null;CODE
CRITICAL…ckages/discord.js/src/structures/CommandInteraction.js90 return this.guild?.commands.cache.get(id) ?? this.client.application.commands.cache.get(id) ?? null;CODE
CRITICALpackages/discord.js/src/structures/GuildMember.js376 return this.guild.members.me.roles.highest.comparePositionTo(this.roles.highest) > 0;CODE
CRITICALpackages/discord.js/src/structures/GuildMember.js387 return this.manageable && this.guild.members.me.permissions.has(PermissionFlagsBits.KickMembers);CODE
CRITICALpackages/discord.js/src/structures/GuildMember.js398 return this.manageable && this.guild.members.me.permissions.has(PermissionFlagsBits.BanMembers);CODE
CRITICAL…ord.js/src/structures/AutoModerationActionExecution.js117 return this.guild.client.users.cache.get(this.userId) ?? null;CODE
CRITICALpackages/discord.js/src/util/Sweepers.js130 const entitlements = this.client.application.entitlements.cache.sweep(filter);CODE
CRITICALpackages/voice/src/VoiceConnection.ts768 return this.state.networking.state.dave.getVerificationCode(userId);CODE
Hyper-Verbose Identifiers39 hits · 39 pts
SeverityFileLineSnippetContext
LOWpackages/discord.js/typings/index.d.ts3830export function fetchRecommendedShardCount(token: string, options?: FetchRecommendedShardCountOptions): Promise<number>;CODE
LOWpackages/discord.js/typings/index.d.ts4228export abstract class DataManager<Key, Holds, Resolvable> extends BaseManager {CODE
LOWpackages/discord.js/src/util/Util.js81async function fetchRecommendedShardCount(CODE
LOWpackages/discord.js/src/util/Components.js301function extractInteractiveComponents(component) {CODE
LOWpackages/discord.js/src/util/Channels.js107function transformAPIGuildForumTag(tag) {CODE
LOWpackages/discord.js/src/util/Channels.js147function transformAPIGuildDefaultReaction(defaultReaction) {CODE
LOWpackages/discord.js/src/util/Channels.js162function transformGuildDefaultReaction(defaultReaction) {CODE
LOWpackages/discord.js/src/util/DataResolver.js22async function resolveInviteTargetUsersFile(client, targetUsersFile) {CODE
LOWpackages/discord.js/src/managers/DataManager.js12class DataManager extends BaseManager {CODE
LOW…s/ui/src/lib/components/discord/MessageEmbedAuthor.tsx7export function DiscordMessageEmbedAuthor({ avatar, url, username }: IDiscordMessageEmbedAuthor) {CODE
LOW…s/ui/src/lib/components/discord/MessageInteraction.tsx11export function DiscordMessageInteraction({ author, authorNode, command }: IDiscordMessageInteraction) {CODE
LOW…s/ui/src/lib/components/discord/MessageAuthorReply.tsx11export function DiscordMessageAuthorReply({ avatar, bot, verified, color, username }: IDiscordMessageAuthorReply) {CODE
LOW…s/ui/src/lib/components/discord/MessageEmbedFooter.tsx7export function DiscordMessageEmbedFooter({ content, icon, timestamp }: IDiscordMessageEmbedFooter) {CODE
LOW…i/src/lib/components/discord/MessageEmbedThumbnail.tsx6export function DiscordMessageEmbedThumbnail({ alt, image }: IDiscordMessageEmbedThumbnail) {CODE
LOW…s/ui/src/lib/components/discord/MessageEmbedFields.tsx7export function DiscordMessageEmbedFields({ fields }: IDiscordMessageEmbedFields) {CODE
LOWpackages/collection/__tests__/collection.test.ts20function expectInvalidFunctionError(cb: () => unknown, val?: unknown): void {CODE
LOWpackages/proxy/src/util/responseHelpers.ts12export async function populateSuccessfulResponse(res: ServerResponse, data: ResponseLike): Promise<void> {CODE
LOWpackages/proxy/src/util/responseHelpers.ts35export function populateGeneralErrorResponse(res: ServerResponse, error: DiscordAPIError | HTTPError): void {CODE
LOWpackages/proxy/src/util/responseHelpers.ts50export function populateRatelimitErrorResponse(res: ServerResponse, error: RateLimitError): void {CODE
LOWpackages/proxy/src/util/responseHelpers.ts66export function populateAbortErrorResponse(res: ServerResponse): void {CODE
LOWpackages/structures/src/utils/optimization.ts20export function dateToDiscordISOTimestamp(date: Date) {CODE
LOWpackages/util/src/functions/runtime.ts3export function shouldUseGlobalFetchAndWebSocket() {CODE
LOW…kages/builders/__tests__/components/selectMenu.test.ts37function makeStringSelectMenuWithOptions() {CODE
LOW…kages/builders/__tests__/components/selectMenu.test.ts47function mapStringSelectMenuOptionBuildersToJson(selectMenu: StringSelectMenuBuilder) {CODE
LOWpackages/builders/src/components/Components.ts266export function resolveAccessoryComponent(component: APISectionAccessoryComponent) {CODE
LOWpackages/voice/__tests__/VoiceConnection.test.ts74function createFakeVoiceConnection() {CODE
LOWpackages/voice/__tests__/AudioPlayer.test.ts45function createVoiceConnectionMock() {CODE
LOWpackages/voice/__tests__/entersState.test.ts7function createFakeVoiceConnection(status = VoiceConnectionStatus.Signalling) {CODE
LOWpackages/voice/src/DataStore.ts19export function createJoinVoiceChannelPayload(config: JoinConfig) {CODE
LOWpackages/voice/src/DataStore.ts36function getOrCreateGroup(group: string) {CODE
LOWpackages/voice/src/receive/AudioReceiveStream.ts81export function createDefaultAudioReceiveStreamOptions(): AudioReceiveStreamOptions {CODE
LOWpackages/voice/src/audio/TransformerGraph.ts118function canEnableFFmpegOptimizations(): boolean {CODE
LOWpackages/scripts/src/generateSplitDocumentation.ts130function resolveCanonicalReference(CODE
LOWpackages/scripts/src/generateSplitDocumentation.ts993async function writeSplitDocsToFileSystem({CODE
LOWpackages/scripts/src/generateSplitDocumentation.ts1026export async function generateSplitDocumentation({CODE
LOWpackages/rest/src/lib/utils/utils.ts170export function calculateUserDefaultAvatarIndex(userId: Snowflake) {CODE
LOW…/ws/src/strategies/context/IContextFetchingStrategy.ts40export async function managerToFetchingStrategyOptions(manager: WebSocketManager): Promise<FetchingStrategyOptions> {CODE
LOWpackages/ws/src/utils/constants.ts80export function getInitialSendRateLimitState(): SendRateLimitState {CODE
LOWapps/website/src/hooks/useUnregisterServiceWorker.ts5export function useUnregisterServiceWorker() {CODE
Over-Commented Block23 hits · 23 pts
SeverityFileLineSnippetContext
LOWpackages/next/api-extractor.json1{COMMENT
LOWpackages/next/api-extractor.json21 // "@discordjs/core",COMMENT
LOWpackages/scripts/src/generateSplitDocumentation.ts321 if (codeDestination) {COMMENT
LOWpackages/scripts/src/generateSplitDocumentation.ts801 }COMMENT
LOW…ages/api-extractor/src/enhancers/ValidationEnhancer.ts81 if (symbolMetadata.maxEffectiveReleaseTag === ReleaseTag.Internal) {COMMENT
LOWpackages/api-extractor/src/collector/Collector.ts581 //COMMENT
LOWpackages/api-extractor/src/collector/Collector.ts941 const declaration: ts.Declaration = astDeclaration.declaration;COMMENT
LOWpackages/api-extractor/src/collector/Collector.ts981 this.messageRouter.addTsdocMessages(parserContext, declaration.getSourceFile(), astDeclaration);COMMENT
LOW…/api-extractor/src/schemas/api-extractor-template.json441 // "addToApiReportFile": falseCOMMENT
LOWpackages/api-extractor/src/api/CompilerState.ts161 // Used by compilerHost.fileExists()COMMENT
LOW…ges/api-extractor/src/generators/ApiReportGenerator.ts541 // FirstPunctuation: pre=[{] sep=[\n\n ]COMMENT
LOW…ages/api-extractor/src/generators/ApiModelGenerator.ts341 // // ...so here we end up with example1.thing() and example2.thing()COMMENT
LOWpackages/api-extractor/src/analyzer/ExportAnalyzer.ts521 if (declaration.kind === ts.SyntaxKind.ExportSpecifier) {COMMENT
LOWpackages/api-extractor/src/analyzer/ExportAnalyzer.ts541 // EXAMPLE:COMMENT
LOWpackages/api-extractor/src/analyzer/ExportAnalyzer.ts581 // declaration,COMMENT
LOWpackages/api-extractor/src/analyzer/ExportAnalyzer.ts641 // EXAMPLE:COMMENT
LOWpackages/api-extractor/src/analyzer/ExportAnalyzer.ts661 // a package or source file.COMMENT
LOWpackages/api-extractor/src/analyzer/ExportAnalyzer.ts701 }COMMENT
LOWpackages/api-extractor/src/analyzer/ExportAnalyzer.ts741 SourceFileLocationFormatter.formatDeclaration(declaration),COMMENT
LOWpackages/api-extractor/src/analyzer/AstSymbolTable.ts241 // namespace X {COMMENT
LOWpackages/api-extractor/src/analyzer/AstSymbolTable.ts261 }COMMENT
LOW…pi-extractor-model/src/mixins/ApiItemContainerMixin.ts481 // We want to find the reference token associated with the actual inherited declaration.COMMENT
LOW…pi-extractor-model/src/mixins/ApiItemContainerMixin.ts561 // For example, in the code block below, `Bar.x` is reported as the inherited item, not `Foo.x`.COMMENT
Fake / Example Data11 hits · 13 pts
SeverityFileLineSnippetContext
LOW⚡packages/util/__tests__/lazy.test.ts14 const callback = vi.fn(() => 'Lorem Ipsum');CODE
LOW⚡packages/util/__tests__/lazy.test.ts18 expect(lazyStoredValue()).toEqual('Lorem Ipsum');CODE
LOW⚡packages/util/__tests__/lazy.test.ts22 const callback = vi.fn(() => 'Lorem Ipsum');CODE
LOW⚡packages/util/__tests__/lazy.test.ts30 expect(cachedValue).toEqual('Lorem Ipsum');CODE
LOW…ckages/builders/__tests__/components/textInput.test.ts51 placeholder: 'placeholder',CODE
LOWpackages/builders/__tests__/components/label.test.ts71 placeholder: 'placeholder',CODE
LOWpackages/builders/__tests__/components/label.test.ts84 placeholder: 'placeholder',CODE
LOWpackages/builders/__tests__/components/label.test.ts115 textInput.setCustomId('custom_id').setPlaceholder('placeholder').setStyle(TextInputStyle.Paragraph),CODE
LOWpackages/builders/__tests__/components/label.test.ts128 .setPlaceholder('placeholder')CODE
LOW…s/builders/src/components/selectMenu/BaseSelectMenu.ts18 Pick<Data, 'custom_id' | 'disabled' | 'id' | 'max_values' | 'min_values' | 'placeholder' | 'required'>CODE
LOWapps/guide/CONTRIBUTING.md73- Avoid talking about "dummy" values, call them "placeholder" or "sample value" instead.CODE
AI Slop Vocabulary2 hits · 6 pts
SeverityFileLineSnippetContext
MEDIUMpackages/structures/__tests__/types/Mixin.test-d.ts24// Since MixinProperty2 doesn't utilize the type of property1 in kData, this works and is okCOMMENT
MEDIUMpackages/structures/__tests__/types/Mixin.test-d.ts29// Since MixinProperty2 doesn't utilize the type of property1 in kData, this works and is okCOMMENT