
## [1.3.3](https://github.com/ZynerOrg/xyter/compare/v1.3.2...v1.3.3) (2022-12-13) ### Bug Fixes * add custom semrel git ([c07befe
](c07befe678
))
16 lines
573 B
JavaScript
16 lines
573 B
JavaScript
"use strict";
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
exports.default = (guild, user, amount) => {
|
|
// 1. Verify that the amount is not above 100.000.000 credits.
|
|
if (amount > 100000000) {
|
|
throw new Error("You can't give more than 1.000.000 credits.");
|
|
}
|
|
// 2. Verify that the amount is not below 1 credits.
|
|
if (amount <= 0) {
|
|
throw new Error("You can't give below one credit.");
|
|
}
|
|
// 3. Verify that the user is not an bot.
|
|
if (user.bot) {
|
|
throw new Error("You can't give to an bot.");
|
|
}
|
|
};
|