The method player.designer.add()
is used to grant designer permissions to a player in the current room. It requires one parameter: the user ID of the player to whom you want to grant designer permissions.
Note: The bot can only grant designer permissions if it is owned by the room owner. If the bot is owned by the room owner, it will be able to grant designer permissions regardless of its permissions in the room.
// Assuming you have defined the Highrise instance as "bot".
bot.on("chatCreate", async (user, message) => {
if (message === "add designer") {
bot.player.designer.add(user.id).catch(e => console.error(e));
}
});
Similarly, the method player.designer.remove()
is used to revoke designer permissions from a player in the current room.
// Assuming you have defined the Highrise instance as "bot".
bot.on("chatCreate", async (user, message) => {
if (message === "remove designer") {
bot.player.designer.remove(user.id).catch(e => console.error(e));
}
});
The method player.moderator.add()
is used to grant moderator permissions to a player in the current room.
// Assuming you have defined the Highrise instance as "bot".
bot.on("chatCreate", async (user, message) => {
if (message === "add moderator") {
bot.player.moderator.add(user.id).catch(e => console.error(e));
}
});
The method player.moderator.remove()
is used to revoke moderator permissions from a player in the current room.
// Assuming you have defined the Highrise instance as "bot".
bot.on("chatCreate", async (user, message) => {
if (message === "remove moderator") {
bot.player.moderator.remove(user.id).catch(e => console.error(e));
}
});
In these examples, if there is an error granting or revoking permissions, it should log the error and refrain from executing the method.