Restriction
If you want to restrict your bot from being used by untrusted people, you must be interested in this option.
Adding a restricted ID
In order to restrict a specific guild or user, you must create a set and add the ID to it.
Example
new Erine({
restrictions: {
guildIDs: new Set()
.add("0987654321847208126"),
userIDs: new Set()
.add("1234567890172935189");
}
});
Handling restricted user/guild errors.
You must use the error
event along with the RestrictedGuild
/RestrictedUser
error classes.
if (error instanceof Errors.RestrictedGuild) {
// some logic here.
} else if (error instanceof Errors.RestrictedUser) {
// some logic here.
}