Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: requests that the KoishiSession class be exported in order to extend the custom method #1487

Open
dragon-fish opened this issue Feb 15, 2025 · 0 comments
Labels

Comments

@dragon-fish
Copy link
Member

class KoishiSession<U, G, C> {

RT, so that we can do something like this:

declare module 'koishi' {
  interface Session {
    someAction: () => void
  }
}
KoishiSession.prototype.someAction = function() {/* ... */}

P.S. This can be done in older versions (like < 4.12) by extending the Session class, but it is now exported only as an interface.

@dragon-fish dragon-fish changed the title [FEAT] requests that the KoishiSession class be exported in order to extend the custom method Feature: requests that the KoishiSession class be exported in order to extend the custom method Feb 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant