Skip to content

refactor: clean code#110

Merged
Tweentyy merged 4 commits into
developfrom
refactor/clean
May 10, 2026
Merged

refactor: clean code#110
Tweentyy merged 4 commits into
developfrom
refactor/clean

Conversation

@Tweentyy
Copy link
Copy Markdown
Contributor

@Tweentyy Tweentyy commented May 8, 2026

No description provided.

Copilot AI review requested due to automatic review settings May 8, 2026 10:36
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors several interaction managers to use more specific internal collection names (instead of the generic interactions) and adds startup logging after loading manager data. It also updates tooling/runtime requirements (pnpm/Node) and refreshes dependencies in the lockfile.

Changes:

  • Rename manager backing collections from interactions to domain-specific names (commands, buttons, modals, etc.) and add logger.info load summaries.
  • Update package/tooling requirements (Node engine, pnpm version) and bump package version.
  • Update dependency versions (e.g., i18next, tsdown, and related transitive deps) and adjust the publish workflow pnpm action version.

Reviewed changes

Copilot reviewed 10 out of 11 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/managers/SelectMenuManager.ts Rename internal collection to selectMenus and log loaded count.
src/managers/ModalManager.ts Rename internal collection to modals and log loaded count.
src/managers/EventManager.ts Rename internal collection to events and log loaded count.
src/managers/ContextMenuManager.ts Rename internal collection to contextMenus and log loaded count.
src/managers/CommandManager.ts Rename internal collection to commands and log loaded count.
src/managers/ButtonManager.ts Rename public collection field to buttons and log loaded count.
src/managers/AutoCompleteManager.ts Rename internal collection to autoCompletes and log loaded count (message wording needs adjustment).
pnpm-workspace.yaml Add pnpm workspace-level allowBuilds configuration (may require packages:).
pnpm-lock.yaml Refresh lockfile for updated dependencies/tooling.
package.json Bump version, raise Node engine requirement, update pnpm and dependency versions.
.github/workflows/publish-npm.yml Update pnpm action setup to v6.
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/managers/AutoCompleteManager.ts Outdated
this.autoCompletes = await requiredFiles<AutoCompleteStructure>(this.directoryPath);
this.setManagerLoaded();

logger.info(`Loaded ${this.autoCompletes.size} auto complete`);
export class ButtonManager extends BaseManager<ButtonStructure> {
public interactions: Collection<StructureCustomId, ButtonStructure> = new Collection();
public buttons: Collection<StructureCustomId, ButtonStructure> = new Collection();

Comment thread package.json
Comment on lines +3 to 11
"version": "1.7.3",
"type": "module",
"description": "A framework for simplifying the creation of discord bots",
"author": "Tweenty_",
"license": "ISC",
"packageManager": "pnpm@10.33.2",
"packageManager": "pnpm@11.0.8",
"engines": {
"node": ">=20.19.0"
"node": ">=24.0.0"
},
Comment thread pnpm-workspace.yaml
Comment on lines +1 to +2
allowBuilds:
unrs-resolver: true
@Tweentyy Tweentyy merged commit 74669c4 into develop May 10, 2026
@Tweentyy Tweentyy deleted the refactor/clean branch May 10, 2026 14:56
@sonarqubecloud
Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants