@erlcjs/core 1.0.2 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/index.js +0 -3
- package/dist/index.mjs +0 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -102,7 +102,7 @@ console.log(`Vehicle model: ${vehicle.name}, Owner: ${vehicle.ownerUsername}`);
|
|
|
102
102
|
### Executing Commands
|
|
103
103
|
Issue custom commands directly:
|
|
104
104
|
```typescript
|
|
105
|
-
await client.commands.execute(':heal
|
|
105
|
+
await client.commands.execute(':heal user');
|
|
106
106
|
```
|
|
107
107
|
|
|
108
108
|
## Documentation
|
package/dist/index.js
CHANGED
|
@@ -83,7 +83,6 @@ var RestManager = class {
|
|
|
83
83
|
* @throws Error - for other HTTP error codes.
|
|
84
84
|
*/
|
|
85
85
|
async request(method, endpoint, body) {
|
|
86
|
-
console.log(method, endpoint, body);
|
|
87
86
|
return new Promise((resolve, reject) => {
|
|
88
87
|
this.queue.push(async () => {
|
|
89
88
|
try {
|
|
@@ -1280,12 +1279,10 @@ var Client18 = class extends import_node_events.EventEmitter {
|
|
|
1280
1279
|
* Starts the periodic api-polling loop if enabled.
|
|
1281
1280
|
*/
|
|
1282
1281
|
startPolling() {
|
|
1283
|
-
console.log("begin polling");
|
|
1284
1282
|
setInterval(async () => {
|
|
1285
1283
|
try {
|
|
1286
1284
|
const server = await this.server.fetch();
|
|
1287
1285
|
this.emit("POLL" /* poll */, server);
|
|
1288
|
-
console.log("fetch");
|
|
1289
1286
|
if (server.Players) this.players.updateCache(server.Players);
|
|
1290
1287
|
if (server.Vehicles) this.vehicles.updateCache(server.Vehicles);
|
|
1291
1288
|
if (server.CommandLogs) this.commandLogs.updateCache(server.CommandLogs);
|
package/dist/index.mjs
CHANGED
|
@@ -37,7 +37,6 @@ var RestManager = class {
|
|
|
37
37
|
* @throws Error - for other HTTP error codes.
|
|
38
38
|
*/
|
|
39
39
|
async request(method, endpoint, body) {
|
|
40
|
-
console.log(method, endpoint, body);
|
|
41
40
|
return new Promise((resolve, reject) => {
|
|
42
41
|
this.queue.push(async () => {
|
|
43
42
|
try {
|
|
@@ -1234,12 +1233,10 @@ var Client18 = class extends EventEmitter {
|
|
|
1234
1233
|
* Starts the periodic api-polling loop if enabled.
|
|
1235
1234
|
*/
|
|
1236
1235
|
startPolling() {
|
|
1237
|
-
console.log("begin polling");
|
|
1238
1236
|
setInterval(async () => {
|
|
1239
1237
|
try {
|
|
1240
1238
|
const server = await this.server.fetch();
|
|
1241
1239
|
this.emit("POLL" /* poll */, server);
|
|
1242
|
-
console.log("fetch");
|
|
1243
1240
|
if (server.Players) this.players.updateCache(server.Players);
|
|
1244
1241
|
if (server.Vehicles) this.vehicles.updateCache(server.Vehicles);
|
|
1245
1242
|
if (server.CommandLogs) this.commandLogs.updateCache(server.CommandLogs);
|