API-XX commited on
Commit
b4f66cb
ยท
verified ยท
1 Parent(s): 3def26b

Upload case.js

Browse files
Files changed (1) hide show
  1. case.js +21 -3
case.js CHANGED
@@ -127,7 +127,8 @@ module.exports = async (conn, dev, chatUpdate, store) => {
127
  content,
128
  body
129
  } = dev
130
-
 
131
  const isGroup = m.key.remoteJid.endsWith('@g.us');
132
  const prefixFile = './database/prefix.json';
133
  let prefix = '.';
@@ -3149,7 +3150,7 @@ case 'alive': {
3149
 
3150
  await conn.sendMessage(m.chat, {
3151
  image: { url: imageUrl },
3152
- caption: fontx(quotex)
3153
  }, { quoted: m });
3154
 
3155
  break;
@@ -3229,12 +3230,29 @@ case 'scan': {
3229
  case 'pay':
3230
  case 'acc': {
3231
  reply(
3232
- `๐Ÿ’ณ *Banking Details* ๐Ÿ’ณ\n\n๐Ÿฆ *Bank Name:* *${bank}*\n๐Ÿ”ข *Acc Number:* *${accnumber}*\n๐Ÿ‘ค *Acc Name:* *${bankname}*\n> ${caption}`
3233
  );
3234
  break;
3235
  }
 
 
 
 
 
 
3236
 
 
 
 
 
 
 
3237
 
 
 
 
 
 
3238
 
3239
 
3240
 
 
127
  content,
128
  body
129
  } = dev
130
+ let gameFile = './database/game.json';
131
+
132
  const isGroup = m.key.remoteJid.endsWith('@g.us');
133
  const prefixFile = './database/prefix.json';
134
  let prefix = '.';
 
3150
 
3151
  await conn.sendMessage(m.chat, {
3152
  image: { url: imageUrl },
3153
+ caption: fontx(`${quotex}\n> ${caption}`)
3154
  }, { quoted: m });
3155
 
3156
  break;
 
3230
  case 'pay':
3231
  case 'acc': {
3232
  reply(
3233
+ `๐Ÿ’ณ *Banking Details* ๐Ÿ’ณ\n\n๐Ÿฆ *Bank Name:* *${bank}*\n๐Ÿ”ข *Acc Number:* *${accnumber}*\n๐Ÿ‘ค *Acc Name:* *${bankname}*`
3234
  );
3235
  break;
3236
  }
3237
+ case 'startgame': {
3238
+ let user = m.sender;
3239
+
3240
+ let gameData = fs.existsSync(gameFile) ? JSON.parse(fs.readFileSync(gameFile, 'utf8')) : {};
3241
+
3242
+ if (gameData[user]) return reply("โœ… *You have already started your journey!*");
3243
 
3244
+ gameData[user] = {
3245
+ money: 1000,
3246
+ level: 1,
3247
+ xp: 0,
3248
+ inventory: []
3249
+ };
3250
 
3251
+ fs.writeFileSync(gameFile, JSON.stringify(gameData, null, 2));
3252
+
3253
+ reply("๐ŸŽฎ *Your adventure begins!* You have been successfully added to the game.");
3254
+ break;
3255
+ }
3256
 
3257
 
3258