-
Notifications
You must be signed in to change notification settings - Fork 1
Typescript API #29
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
base: main
Are you sure you want to change the base?
Typescript API #29
Conversation
|
Looks good to me! |
| await this.plugin.send({ | ||
| pluginId: this.plugin.pluginId, | ||
| actions: { | ||
| actions: [{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
change all of these usages to use a sendActions which takes []Action
|
|
||
| if (actions.length > 0) { | ||
| await this.plugin.send({ | ||
| pluginId: this.plugin.pluginId, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use a sendActions method
| timeValue = value; | ||
| } | ||
|
|
||
| await this.plugin.sendAction('worldSetTime', { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use a sendActions method
| await context.ack(); | ||
| } | ||
|
|
||
| // --- Commands --- |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
move everything below this into commands.ts
|
|
||
| await playerData.save(); | ||
|
|
||
| await context.ack(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should avoid acks at the end with an internal ackIfUnhandled
| players/ | ||
| resources/ | ||
|
|
||
| cmd/plugins/plugins.yaml |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should keep some example plugins.yaml if this is going to be ignored. I think its better to revert this and handle it outside of the PR
This PR introduces a Typescript API that is easier to use