Skip to content

Upgrade deps and fix compiler error#241

Merged
jejebecarte merged 6 commits into
MiscGuild:masterfrom
xMdb:upgrade-deps
Jun 22, 2026
Merged

Upgrade deps and fix compiler error#241
jejebecarte merged 6 commits into
MiscGuild:masterfrom
xMdb:upgrade-deps

Conversation

@xMdb

@xMdb xMdb commented Apr 25, 2026

Copy link
Copy Markdown
Contributor

@jejebecarte pls test and review
i was running into this compiler error complaining about Bot type even on the latest branch. not sure why, my current build was working successfully (built sept last year)

src/mineflayer/mineflayer.ts:98:63 - error TS2345: Argument of type 'Bot' is not assignable to parameter of type 'EventEmitter<any>'.
  The types returned by 'listeners(...)' are incompatible between these types.
    Type 'Function[]' is not assignable to type '((...args: any[]) => void)[]'.
      Type 'Function' is not assignable to type '(...args: any[]) => void'.
        Type 'Function' provides no match for the signature '(...args: any[]): void'.

98         await loadEvents(path.join(__dirname, 'events/chat'), this.bot, bridge);
                                                                 ~~~~~~~~

src/mineflayer/mineflayer.ts:99:66 - error TS2345: Argument of type 'Bot' is not assignable to parameter of type 'EventEmitter<any>'.
  The types returned by 'listeners(...)' are incompatible between these types.
    Type 'Function[]' is not assignable to type '((...args: any[]) => void)[]'.
      Type 'Function' is not assignable to type '(...args: any[]) => void'.
        Type 'Function' provides no match for the signature '(...args: any[]): void'.

99         await loadEvents(path.join(__dirname, 'events/handler'), this.bot, bridge);
                                                                    ~~~~~~~~

src/util/load-events.ts:29:14 - error TS2352: Conversion of type 'EventEmitter<any>' to type 'Bot' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.
  Type 'EventEmitter<any>' is missing the following properties from type 'Bot': username, protocolVersion, majorVersion, version, and 125 more.

29             (emitter as Bot).addChatPattern(name.replace('chat:', ''), regex[name], {
                ~~~~~~~~~~~~~~


Found 3 errors in 2 files.

Errors  Files
     2  src/mineflayer/mineflayer.ts:98
     1  src/util/load-events.ts:29
 ELIFECYCLE  Command failed with exit code 2.

so i fixed it

@jejebecarte

Copy link
Copy Markdown
Member

👍 I'll take a look soon™

@xMdb

xMdb commented May 10, 2026

Copy link
Copy Markdown
Contributor Author

👍 I'll take a look soon™

each PR we care less and less xD

@jejebecarte jejebecarte merged commit 705ae99 into MiscGuild:master Jun 22, 2026
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