gambling-bot-shared 0.1.10 → 0.1.12

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.
@@ -2,6 +2,10 @@ export declare const readableGameValueNames: {
2
2
  name: string;
3
3
  value: string;
4
4
  }[];
5
+ export declare const readableGameNames: {
6
+ name: string;
7
+ value: string;
8
+ }[];
5
9
  export declare const defaultCasinoSettings: {
6
10
  dice: {
7
11
  winMultiplier: number;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.defaultCasinoSettings = exports.readableGameValueNames = void 0;
3
+ exports.defaultCasinoSettings = exports.readableGameNames = exports.readableGameValueNames = void 0;
4
4
  exports.readableGameValueNames = [
5
5
  { name: 'Maximum Bet Amount', value: 'maxBet' },
6
6
  { name: 'Minimum Bet Amount', value: 'minBet' },
@@ -10,6 +10,17 @@ exports.readableGameValueNames = [
10
10
  { name: 'One-In Chance (e.g. 1 in 10,000)', value: 'oneInChance' },
11
11
  { name: 'Symbol Weights', value: 'symbolWeights' },
12
12
  ];
13
+ exports.readableGameNames = [
14
+ { name: 'Dice', value: 'dice' },
15
+ { name: 'Coin Flip', value: 'coinflip' },
16
+ { name: 'Slots', value: 'slots' },
17
+ { name: 'Lottery', value: 'lottery' },
18
+ { name: 'Roulette', value: 'roulette' },
19
+ { name: 'Rock Paper Scissors', value: 'rps' },
20
+ { name: 'Golden Jackpot', value: 'goldenJackpot' },
21
+ { name: 'Blackjack', value: 'blackjack' },
22
+ { name: 'Prediction', value: 'prediction' },
23
+ ];
13
24
  exports.defaultCasinoSettings = {
14
25
  dice: {
15
26
  winMultiplier: 5,
@@ -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
- userId: { type: String, required: true },
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({ userId: 1, guildId: 1 }, { unique: true });
20
+ exports.VipRoomSchema.index({ ownerId: 1, guildId: 1 }, { unique: true });
21
+ exports.VipRoomSchema.index({ memberIds: 1 });
@@ -1,8 +1,10 @@
1
1
  export type TVipRoom = {
2
- userId: string;
2
+ ownerId: string;
3
3
  guildId: string;
4
4
  channelId: string;
5
5
  expiresAt: Date;
6
+ memberIds: string[];
7
+ maxMembers: number;
6
8
  createdAt: Date;
7
9
  updatedAt: Date;
8
10
  };
@@ -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); // ← FIX
39
+ const multiplier = toNumber(multipliers[combo] ?? 0);
40
40
  rtp += probability * multiplier;
41
41
  }
42
42
  return rtp * 100;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gambling-bot-shared",
3
- "version": "0.1.10",
3
+ "version": "0.1.12",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "license": "MIT",