API-XX commited on
Commit
2bcdd83
Β·
verified Β·
1 Parent(s): e0c1d4f

Upload case.js

Browse files
Files changed (1) hide show
  1. case.js +29 -1
case.js CHANGED
@@ -960,6 +960,8 @@ module.exports = async (conn, dev, chatUpdate, store) => {
960
  > ${sign} setpp
961
  > ${sign} setbio
962
  > ${sign} restart
 
 
963
  > ─────────────❐
964
 
965
  > β”€γ€Ž \`π†π‘πŽπ”π πŒπ„ππ”\` 』
@@ -1378,8 +1380,34 @@ case 'setbio':
1378
  await sleep(3000)
1379
  process.exit()
1380
  break;
 
 
 
 
1381
 
1382
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1383
 
1384
 
1385
 
 
960
  > ${sign} setpp
961
  > ${sign} setbio
962
  > ${sign} restart
963
+ > ${sign} owner
964
+ > ${sign} setname
965
  > ─────────────❐
966
 
967
  > β”€γ€Ž \`π†π‘πŽπ”π πŒπ„ππ”\` 』
 
1380
  await sleep(3000)
1381
  process.exit()
1382
  break;
1383
+ case 'setname':
1384
+ case 'setbotname': {
1385
+ if (!isOwner) return reply(mess.only.owner);
1386
+ if (!text) return reply(`*Example: ${prefix + command} blue demon*`);
1387
 
1388
+ try {
1389
+ await conn.updateProfileName(text);
1390
+ reply(`*successfully changed name to \`${text}\`*`);
1391
+ } catch (error) {
1392
+ console.error(error);
1393
+ reply("An error occurred while updating the name. Please try again.");
1394
+ }
1395
+ break;
1396
+ }
1397
+ case 'owner':
1398
+ case 'creator':
1399
+ case 'dev': {
1400
+ let who = m.mentionedJid && m.mentionedJid[0] ? m.mentionedJid[0] : m.fromMe ? conn.user.jid : m.sender;
1401
+ let pp = await conn.profilePictureUrl(who).catch(_ => 'https://cdn.pixabay.com/photo/2015/10/05/22/37/blank-profile-picture-973460_960_720.png?q=60');
1402
+ let name = await conn.getName(who);
1403
+
1404
+ await conn.sendContactArray(m.chat, [
1405
+ [`[email protected]`, `BLUE DEMON`, `Bot Developer`, `Feel free to contact me for assistance or inquiries.`]
1406
+ ], m);
1407
+
1408
+ await reply(`Hello πŸ‘‹, if you wish to contact the owner, please use the provided contact details.`);
1409
+ }
1410
+ break;
1411
 
1412
 
1413