API-XX commited on
Commit
24ef40e
Β·
verified Β·
1 Parent(s): f9a23aa

Upload case.js

Browse files
Files changed (1) hide show
  1. case.js +87 -2
case.js CHANGED
@@ -980,8 +980,9 @@ module.exports = async (conn, dev, chatUpdate, store) => {
980
  > ─────────────❐
981
 
982
  > β”€γ€Ž \`π“πŽπŽπ‹π’ πŒπ„ππ”\` 』
983
-
984
-
 
985
  > ─────────────❐
986
 
987
  > β”€γ€Ž \`𝐒𝐄𝐀𝐑𝐂𝐇 πŒπ„ππ”\` 』
@@ -990,6 +991,7 @@ module.exports = async (conn, dev, chatUpdate, store) => {
990
 
991
  > β”€γ€Ž \`π€πˆ πŒπ„ππ”\` 』
992
  > ${sign} tts
 
993
  > ─────────────❐
994
 
995
  > β”€γ€Ž \`π’π“π€π‹πŠπ„π‘ πŒπ„ππ”\` 』
@@ -1003,6 +1005,7 @@ module.exports = async (conn, dev, chatUpdate, store) => {
1003
  > ${sign} ssweb
1004
  > ${sign} getdevice
1005
  > ${sign} hard-encrypt
 
1006
  > ─────────────❐
1007
 
1008
  > β”€γ€Ž \`𝐅𝐔𝐍 πŒπ„ππ”\` 』
@@ -1577,8 +1580,44 @@ case 'kick': {
1577
  }
1578
  break;
1579
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
1580
 
 
 
 
1581
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1582
 
1583
 
1584
 
@@ -1855,6 +1894,52 @@ case "readviewonce": {
1855
  }
1856
  }
1857
  break;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1858
  case 'ssweb': {
1859
  if (!q) return reply("Please provide a valid URL.\nExample: *" + prefix + command + " https://example.com*");
1860
  await loading();
 
980
  > ─────────────❐
981
 
982
  > β”€γ€Ž \`π“πŽπŽπ‹π’ πŒπ„ππ”\` 』
983
+ > ${sign} areact
984
+ > ${sign} qr
985
+ > ${sign} script
986
  > ─────────────❐
987
 
988
  > β”€γ€Ž \`𝐒𝐄𝐀𝐑𝐂𝐇 πŒπ„ππ”\` 』
 
991
 
992
  > β”€γ€Ž \`π€πˆ πŒπ„ππ”\` 』
993
  > ${sign} tts
994
+ > ${sign} text2img
995
  > ─────────────❐
996
 
997
  > β”€γ€Ž \`π’π“π€π‹πŠπ„π‘ πŒπ„ππ”\` 』
 
1005
  > ${sign} ssweb
1006
  > ${sign} getdevice
1007
  > ${sign} hard-encrypt
1008
+ > ${sign} tinyurl
1009
  > ─────────────❐
1010
 
1011
  > β”€γ€Ž \`𝐅𝐔𝐍 πŒπ„ππ”\` 』
 
1580
  }
1581
  break;
1582
  }
1583
+ case 'tinyurl': {
1584
+ if (!q) return reply(`Please provide a valid URL.\n\nExample: *${prefix + command} https://example.com*`);
1585
+
1586
+ await loading();
1587
+
1588
+ try {
1589
+ let apiUrl = `https://api-xx-xi.hf.space/api/tinyurl?url=${encodeURIComponent(q)}`;
1590
+ let response = await fetch(apiUrl);
1591
+ let json = await response.json();
1592
+
1593
+ if (!json.success || !json.short_url) {
1594
+ return reply("❌ Failed to shorten the URL. Please try again.");
1595
+ }
1596
 
1597
+ conn.sendMessage(m.chat, {
1598
+ text: fontx(`πŸ”— *Shortened URL:*\n\nπŸ“ *Long:* ${q}\nβœ‚οΈ *Short:* ${json.short_url}`),
1599
+ }, { quoted: m });
1600
 
1601
+ } catch (error) {
1602
+ console.error("Error in tinyurl case:", error);
1603
+ reply("❌ An error occurred while shortening the URL. Please try again later.");
1604
+ }
1605
+ break;
1606
+ }
1607
+ case 'areact': {
1608
+ if (!isOwner) return reply(mess.only.owner);
1609
+ if (!args[0]) return reply(`Example: ${prefix + command} on/off`);
1610
+ if (args[0] === 'on') {
1611
+ global.autoreact = true;
1612
+ await reply('Successfully Activated AutoReact.');
1613
+ } else if (args[0] === 'off') {
1614
+ global.autoreact = false;
1615
+ await reply('Successfully Deactivated AutoReact.');
1616
+ } else {
1617
+ return reply(`Invalid option. Use "on" or "off" to toggle AutoReact.`);
1618
+ }
1619
+ break;
1620
+ }
1621
 
1622
 
1623
 
 
1894
  }
1895
  }
1896
  break;
1897
+ case 'qr': {
1898
+ if (!q) return reply("Please provide text or a link to generate a QR code.");
1899
+
1900
+ const apiUrl = `https://api.qrserver.com/v1/create-qr-code/?size=300x300&data=${encodeURIComponent(q)}`;
1901
+
1902
+ await conn.sendMessage(m.chat, {
1903
+ image: {
1904
+ url: apiUrl
1905
+ },
1906
+ caption: `βœ… *QR Code Generated*\nπŸ”— Data: ${q}`
1907
+ }, {
1908
+ quoted: m
1909
+ });
1910
+
1911
+ break;
1912
+ }
1913
+ case 'script':
1914
+ case 'repo':
1915
+ case 'sc': {
1916
+ try {
1917
+ await loading();
1918
+ await loading();
1919
+ const zipUrl = 'https://github.com/BLUEXDEMONl/BLUEXDEMON-V5/archive/refs/heads/master.zip';
1920
+
1921
+ const response = await fetch(zipUrl);
1922
+
1923
+ if (!response.ok) {
1924
+ return reply(`*Failed to download the repository.*\nReason: ${response.statusText}`);
1925
+ }
1926
+
1927
+ const zipBuffer = await response.buffer();
1928
+ await conn.sendMessage(m.chat, {
1929
+ document: zipBuffer,
1930
+ mimetype: 'application/zip',
1931
+ fileName: 'BLUE-DEMON-V5.zip',
1932
+ caption: `*REPO LINK*: https://github.com/BLUEXDEMONl/BLUEXDEMON-V5.git\n*CHANNEL*: https://whatsapp.com/channel/0029Vah3fKtCnA7oMPTPJm1h`,
1933
+ }, {
1934
+ quoted: m
1935
+ });
1936
+
1937
+ } catch (e) {
1938
+ console.error('Error in script case:', e);
1939
+ reply('An error occurred while fetching the script. Please try again later.');
1940
+ }
1941
+ break;
1942
+ }
1943
  case 'ssweb': {
1944
  if (!q) return reply("Please provide a valid URL.\nExample: *" + prefix + command + " https://example.com*");
1945
  await loading();