Fixes to example\testBot.js
Correct method used for: acceptFriendRequest rejectFriendRequest acceptInventoryOffer rejectInventoryOffer
This commit is contained in:
@@ -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(() => {});
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user