Fixes to example\testBot.js

Correct method used for:
acceptFriendRequest
rejectFriendRequest
acceptInventoryOffer
rejectInventoryOffer
This commit is contained in:
Tina King
2020-08-28 10:35:42 +01:00
committed by Casper Warden
parent 643820b5b3
commit 79088c7eba

View File

@@ -83,12 +83,12 @@ bot.clientEvents.onFriendRequest.subscribe((event) =>
if (event.from.toString() === master)
{
console.log("Accepting friend request from " + event.fromName);
bot.clientCommands.comms.acceptFriendRequest(event).then(() => {});
bot.clientCommands.friends.acceptFriendRequest(event).then(() => {});
}
else
{
console.log("Rejecting friend request from " + event.fromName);
bot.clientCommands.comms.rejectFriendRequest(event).then(() => {});
bot.clientCommands.friends.rejectFriendRequest(event).then(() => {});
}
});
@@ -97,12 +97,12 @@ bot.clientEvents.onInventoryOffered.subscribe((event) =>
if (event.from.toString() === master)
{
console.log("Accepting inventory offer from " + event.fromName);
bot.clientCommands.comms.acceptInventoryOffer(event).then(() => {});
bot.clientCommands.inventory.acceptInventoryOffer(event).then(() => {});
}
else
{
console.log("Rejecting inventory offer from " + event.fromName);
bot.clientCommands.comms.rejectInventoryOffer(event).then(() => {});
bot.clientCommands.inventory.rejectInventoryOffer(event).then(() => {});
}
});