gambling-bot-shared 0.1.11 → 0.1.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -43,7 +43,11 @@ exports.GuildConfigurationSchema = new mongoose_1.Schema({
|
|
|
43
43
|
default: constants_1.defaultCasinoSettings,
|
|
44
44
|
},
|
|
45
45
|
vipSettings: {
|
|
46
|
-
|
|
46
|
+
roleOwnerId: {
|
|
47
|
+
type: String,
|
|
48
|
+
default: '',
|
|
49
|
+
},
|
|
50
|
+
roleMemberId: {
|
|
47
51
|
type: String,
|
|
48
52
|
default: '',
|
|
49
53
|
},
|
|
@@ -59,6 +63,10 @@ exports.GuildConfigurationSchema = new mongoose_1.Schema({
|
|
|
59
63
|
type: Number,
|
|
60
64
|
default: 0,
|
|
61
65
|
},
|
|
66
|
+
pricePerAdditionalMember: {
|
|
67
|
+
type: Number,
|
|
68
|
+
default: 0,
|
|
69
|
+
},
|
|
62
70
|
},
|
|
63
71
|
bonusSettings: {
|
|
64
72
|
rewardMode: {
|
|
@@ -3,12 +3,19 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.VipRoomSchema = void 0;
|
|
4
4
|
const mongoose_1 = require("mongoose");
|
|
5
5
|
exports.VipRoomSchema = new mongoose_1.Schema({
|
|
6
|
-
|
|
6
|
+
ownerId: { type: String, required: true },
|
|
7
7
|
guildId: { type: String, required: true },
|
|
8
8
|
channelId: { type: String, required: true },
|
|
9
|
+
memberIds: {
|
|
10
|
+
type: [String],
|
|
11
|
+
default: [],
|
|
12
|
+
},
|
|
13
|
+
maxMembers: {
|
|
14
|
+
type: Number,
|
|
15
|
+
default: 10,
|
|
16
|
+
},
|
|
9
17
|
expiresAt: { type: Date, required: true },
|
|
10
|
-
}, {
|
|
11
|
-
timestamps: true,
|
|
12
|
-
});
|
|
18
|
+
}, { timestamps: true });
|
|
13
19
|
exports.VipRoomSchema.index({ expiresAt: 1 });
|
|
14
|
-
exports.VipRoomSchema.index({
|
|
20
|
+
exports.VipRoomSchema.index({ ownerId: 1, guildId: 1 }, { unique: true });
|
|
21
|
+
exports.VipRoomSchema.index({ memberIds: 1 });
|
|
@@ -14,10 +14,12 @@ export type TGuildConfiguration = {
|
|
|
14
14
|
managerRoleId: string;
|
|
15
15
|
casinoSettings: typeof defaultCasinoSettings;
|
|
16
16
|
vipSettings: {
|
|
17
|
-
|
|
17
|
+
roleOwnerId: string;
|
|
18
|
+
roleMemberId: string;
|
|
18
19
|
categoryId: string;
|
|
19
20
|
pricePerDay: number;
|
|
20
21
|
pricePerCreate: number;
|
|
22
|
+
pricePerAdditionalMember: number;
|
|
21
23
|
};
|
|
22
24
|
bonusSettings: {
|
|
23
25
|
rewardMode: RewardMode;
|
package/dist/types/vipRoom.d.ts
CHANGED
|
@@ -36,7 +36,7 @@ const calculateRTP = (game, settings) => {
|
|
|
36
36
|
for (const [symbol, weight] of Object.entries(symbolWeights)) {
|
|
37
37
|
const probability = Math.pow(toNumber(weight) / totalWeight, 3);
|
|
38
38
|
const combo = symbol + symbol + symbol;
|
|
39
|
-
const multiplier = toNumber(multipliers[combo] ?? 0);
|
|
39
|
+
const multiplier = toNumber(multipliers[combo] ?? 0);
|
|
40
40
|
rtp += probability * multiplier;
|
|
41
41
|
}
|
|
42
42
|
return rtp * 100;
|