Fix linting, remove dead packages
This commit is contained in:
@@ -3,7 +3,7 @@ import { Vector3 } from '../../lib/classes/Vector3';
|
||||
|
||||
class Camera extends ExampleBot
|
||||
{
|
||||
async onConnected()
|
||||
async onConnected(): Promise<void>
|
||||
{
|
||||
const height = 64;
|
||||
this.bot.clientCommands.agent.setCamera(
|
||||
@@ -15,4 +15,10 @@ class Camera extends ExampleBot
|
||||
}
|
||||
}
|
||||
|
||||
new Camera().run().then(() => {}).catch((err) => { console.error(err) });
|
||||
new Camera().run().then(() =>
|
||||
{
|
||||
|
||||
}).catch((err) =>
|
||||
{
|
||||
console.error(err)
|
||||
});
|
||||
|
||||
@@ -4,12 +4,15 @@ import { FriendResponseEvent } from '../../lib/events/FriendResponseEvent';
|
||||
|
||||
class Friends extends ExampleBot
|
||||
{
|
||||
async onConnected()
|
||||
async onConnected(): Promise<void>
|
||||
{
|
||||
this.bot.clientEvents.onFriendRequest.subscribe(this.onFriendRequest.bind(this));
|
||||
this.bot.clientEvents.onFriendResponse.subscribe(this.onFriendResponse.bind(this));
|
||||
|
||||
this.bot.clientCommands.friends.sendFriendRequest(this.masterAvatar, 'Be friends with me?').then(() => {});
|
||||
this.bot.clientCommands.friends.sendFriendRequest(this.masterAvatar, 'Be friends with me?').then(() =>
|
||||
{
|
||||
|
||||
});
|
||||
|
||||
try
|
||||
{
|
||||
@@ -23,7 +26,7 @@ class Friends extends ExampleBot
|
||||
}
|
||||
}
|
||||
|
||||
async onFriendRequest(event: FriendRequestEvent)
|
||||
async onFriendRequest(event: FriendRequestEvent): Promise<void>
|
||||
{
|
||||
if (event.from.toString() === this.masterAvatar)
|
||||
{
|
||||
@@ -41,7 +44,7 @@ class Friends extends ExampleBot
|
||||
}
|
||||
}
|
||||
|
||||
async onFriendResponse(response: FriendResponseEvent)
|
||||
async onFriendResponse(response: FriendResponseEvent): Promise<void>
|
||||
{
|
||||
if (response.accepted)
|
||||
{
|
||||
@@ -55,4 +58,10 @@ class Friends extends ExampleBot
|
||||
|
||||
}
|
||||
|
||||
new Friends().run().then(() => {}).catch((err) => { console.error(err) });
|
||||
new Friends().run().then(() =>
|
||||
{
|
||||
|
||||
}).catch((err) =>
|
||||
{
|
||||
console.error(err);
|
||||
});
|
||||
|
||||
@@ -4,7 +4,7 @@ import { GroupNoticeEvent } from '../../lib/events/GroupNoticeEvent';
|
||||
|
||||
class Group extends ExampleBot
|
||||
{
|
||||
async onConnected()
|
||||
async onConnected(): Promise<void>
|
||||
{
|
||||
this.bot.clientEvents.onGroupNotice.subscribe(this.onGroupNotice.bind(this));
|
||||
|
||||
@@ -82,7 +82,7 @@ class Group extends ExampleBot
|
||||
}
|
||||
}
|
||||
|
||||
async onGroupNotice(event: GroupNoticeEvent)
|
||||
async onGroupNotice(event: GroupNoticeEvent): Promise<void>
|
||||
{
|
||||
// Get group name
|
||||
const groupProfile = await this.bot.clientCommands.group.getGroupProfile(event.groupID);
|
||||
@@ -93,4 +93,10 @@ class Group extends ExampleBot
|
||||
}
|
||||
}
|
||||
|
||||
new Group().run().then(() => {}).catch((err: Error) => { console.error(err) });
|
||||
new Group().run().then(() =>
|
||||
{
|
||||
|
||||
}).catch((err: Error) =>
|
||||
{
|
||||
console.error(err);
|
||||
});
|
||||
|
||||
@@ -11,12 +11,12 @@ class InstantMessages extends ExampleBot
|
||||
super();
|
||||
}
|
||||
|
||||
async onConnected()
|
||||
async onConnected(): Promise<void>
|
||||
{
|
||||
this.bot.clientEvents.onInstantMessage.subscribe(this.onInstantMessage.bind(this));
|
||||
}
|
||||
|
||||
async onInstantMessage(event: InstantMessageEvent)
|
||||
async onInstantMessage(event: InstantMessageEvent): Promise<void>
|
||||
{
|
||||
if (event.source === ChatSourceType.Agent)
|
||||
{
|
||||
@@ -32,4 +32,10 @@ class InstantMessages extends ExampleBot
|
||||
}
|
||||
}
|
||||
|
||||
new InstantMessages().run().then(() => {}).catch((err: Error) => { console.error(err) });
|
||||
new InstantMessages().run().then(() =>
|
||||
{
|
||||
|
||||
}).catch((err: Error) =>
|
||||
{
|
||||
console.error(err);
|
||||
});
|
||||
|
||||
@@ -147,4 +147,10 @@ class Inventory extends ExampleBot
|
||||
}
|
||||
}
|
||||
|
||||
new Inventory().run().then(() => {}).catch((err) => { console.error(err) });
|
||||
new Inventory().run().then(() =>
|
||||
{
|
||||
|
||||
}).catch((err) =>
|
||||
{
|
||||
console.error(err);
|
||||
});
|
||||
|
||||
@@ -7,7 +7,7 @@ class Money extends ExampleBot
|
||||
{
|
||||
private balance = 0;
|
||||
|
||||
async onConnected()
|
||||
async onConnected(): Promise<void>
|
||||
{
|
||||
this.bot.clientEvents.onBalanceUpdated.subscribe(this.onBalanceUpdated.bind(this));
|
||||
try
|
||||
@@ -23,7 +23,7 @@ class Money extends ExampleBot
|
||||
}
|
||||
}
|
||||
|
||||
async onBalanceUpdated(evt: BalanceUpdatedEvent)
|
||||
async onBalanceUpdated(evt: BalanceUpdatedEvent): Promise<void>
|
||||
{
|
||||
this.balance = evt.balance;
|
||||
if (evt.transaction.from.equals(this.bot.agentID()))
|
||||
@@ -35,7 +35,7 @@ class Money extends ExampleBot
|
||||
else
|
||||
{
|
||||
const result = await this.bot.clientCommands.grid.avatarKey2Name(evt.transaction.to) as AvatarQueryResult;
|
||||
console.log('You paid L$' + evt.transaction.amount + ' to ' + result.getName()+ ' "' + evt.transaction.description + '" (' + MoneyTransactionType[evt.transaction.type] + ')');
|
||||
console.log('You paid L$' + evt.transaction.amount + ' to ' + result.getName() + ' "' + evt.transaction.description + '" (' + MoneyTransactionType[evt.transaction.type] + ')');
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -54,4 +54,10 @@ class Money extends ExampleBot
|
||||
}
|
||||
}
|
||||
|
||||
new Money().run().then(() => {}).catch((err) => { console.error(err) });
|
||||
new Money().run().then(() =>
|
||||
{
|
||||
|
||||
}).catch((err) =>
|
||||
{
|
||||
console.error(err);
|
||||
});
|
||||
|
||||
@@ -25,4 +25,10 @@ class Estate extends ExampleBot
|
||||
}
|
||||
}
|
||||
|
||||
new Estate().run().then(() => {}).catch((err) => { console.error(err) });
|
||||
new Estate().run().then(() =>
|
||||
{
|
||||
|
||||
}).catch((err) =>
|
||||
{
|
||||
console.error(err);
|
||||
});
|
||||
|
||||
@@ -4,7 +4,7 @@ import { LandStatFlags } from '../../lib/enums/LandStatFlags';
|
||||
|
||||
class Parcels extends ExampleBot
|
||||
{
|
||||
async onConnected()
|
||||
async onConnected(): Promise<void>
|
||||
{
|
||||
const parcelInMiddle = await this.bot.clientCommands.region.getParcelAt(128, 128);
|
||||
console.log('Parcel at 128x128 is ' + parcelInMiddle.Name);
|
||||
@@ -22,4 +22,10 @@ class Parcels extends ExampleBot
|
||||
}
|
||||
}
|
||||
|
||||
new Parcels().run().then(() => {}).catch((err) => { console.error(err) });
|
||||
new Parcels().run().then(() =>
|
||||
{
|
||||
|
||||
}).catch((err) =>
|
||||
{
|
||||
console.error(err);
|
||||
});
|
||||
|
||||
@@ -3,15 +3,21 @@ import { SimStatsEvent } from '../../lib/events/SimStatsEvent';
|
||||
|
||||
class Region extends ExampleBot
|
||||
{
|
||||
async onConnected()
|
||||
async onConnected(): Promise<void>
|
||||
{
|
||||
this.bot.clientEvents.onSimStats.subscribe(this.onSimStats.bind(this));
|
||||
}
|
||||
|
||||
onSimStats(stats: SimStatsEvent)
|
||||
onSimStats(stats: SimStatsEvent): void
|
||||
{
|
||||
console.log(JSON.stringify(stats, null, 4));
|
||||
}
|
||||
}
|
||||
|
||||
new Region().run().then(() => {}).catch((err) => { console.error(err) });
|
||||
new Region().run().then(() =>
|
||||
{
|
||||
|
||||
}).catch((err) =>
|
||||
{
|
||||
console.error(err);
|
||||
});
|
||||
|
||||
@@ -316,9 +316,9 @@ export class GridCommands extends CommandsBase
|
||||
};
|
||||
|
||||
this.circuit.sendMessage(aprm, PacketFlags.Reliable);
|
||||
const apr: AvatarPickerReplyMessage = await this.circuit.waitForMessage<AvatarPickerReplyMessage>(Message.AvatarPickerReply, 10000, (apr: AvatarPickerReplyMessage): FilterResponse =>
|
||||
const apr: AvatarPickerReplyMessage = await this.circuit.waitForMessage<AvatarPickerReplyMessage>(Message.AvatarPickerReply, 10000, (filterMsg: AvatarPickerReplyMessage): FilterResponse =>
|
||||
{
|
||||
if (apr.AgentData.QueryID.toString() === queryID.toString())
|
||||
if (filterMsg.AgentData.QueryID.toString() === queryID.toString())
|
||||
{
|
||||
return FilterResponse.Finish;
|
||||
}
|
||||
|
||||
777
package-lock.json
generated
777
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -27,15 +27,13 @@
|
||||
"@types/micromatch": "^4.0.2",
|
||||
"@types/node": "^16.9.6",
|
||||
"@types/uuid": "^8.3.1",
|
||||
"@typescript-eslint/eslint-plugin": "^4.31.2",
|
||||
"@typescript-eslint/eslint-plugin": "^4.33.0",
|
||||
"@typescript-eslint/eslint-plugin-tslint": "^4.31.2",
|
||||
"@typescript-eslint/parser": "^4.31.2",
|
||||
"@typescript-eslint/parser": "^4.33.0",
|
||||
"eslint": "^7.32.0",
|
||||
"mocha": "^9.1.1",
|
||||
"source-map-support": "^0.5.20",
|
||||
"ts-node": "^10.2.1",
|
||||
"tslint": "^6.1.3",
|
||||
"tslint-eslint-rules": "^5.4.0",
|
||||
"typescript": "^4.4.3"
|
||||
},
|
||||
"dependencies": {
|
||||
|
||||
Reference in New Issue
Block a user