Advertisement
samiroexpikachu

Style

Apr 16th, 2024
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const axios = require('axios');
  2.  
  3. const styleMap = {
  4.   "Circled": "Circled",
  5.   "Circled (neg)": "Circled (neg)",
  6.   "Fullwidth": "Fullwidth",
  7.   "Math bold": "Math bold",
  8.   "Math bold Fraktur": "Math bold Fraktur",
  9.   "Math bold italic": "Math bold italic",
  10.   "Math bold script": "Math bold script",
  11.   "Math double-struck": "Math double-struck",
  12.   "Math monospace": "Math monospace",
  13.   "Math sans": "Math sans",
  14.   "Math sans bold": "Math sans bold",
  15.   "Math sans bold italic": "Math sans bold italic",
  16.   "Math sans italic": "Math sans italic",
  17.   "Parenthesized": "Parenthesized",
  18.   "Regional Indicator": "Regional Indicator",
  19.   "Squared": "Squared",
  20.   "Squared (neg)": "Squared (neg)",
  21.   "Tag": "Tag",
  22.   "A-cute": "A-cute",
  23.   "CJK+Thai": "CJK+Thai",
  24.   "Curvy 1": "Curvy 1",
  25.   "Curvy 2": "Curvy 2",
  26.   "Curvy 3": "Curvy 3",
  27.   "Faux Cyrillic": "Faux Cyrillic",
  28.   "Faux Ethiopic": "Faux Ethiopic",
  29.   "Math Fraktur": "Math Fraktur",
  30.   "Rock Dots": "Rock Dots",
  31.   "Small Caps": "Small Caps",
  32.   "Stroked": "Stroked",
  33.   "Subscript": "Subscript",
  34.   "Superscript": "Superscript",
  35.   "Inverted": "Inverted",
  36.   "Inverted Reversed": "Inverted Reversed",
  37.   "Reversed": "Reversed",
  38.   "Reversed Reversed": "Reversed Reversed"
  39. };
  40.  
  41. module.exports = {
  42.   config: {
  43.     name: "style",
  44.     version: "1.0",
  45.     author: "Samir ล’",
  46.     shortDescription: "Style text",
  47.     longDescription: "Style text with various fonts and characters.",
  48.     category: "Utility",
  49.     guide: {
  50.       en: `{pn} [text | style number
  51. {
  52.   "1": "โ’ฝโ“˜",
  53.   "2": "๐Ÿ…—๐Ÿ…˜",
  54.   "3": "๏ผจ๏ฝ‰",
  55.   "4": "๐‡๐ข",
  56.   "5": "๐•ณ๐–Ž",
  57.   "6": "๐‘ฏ๐’Š",
  58.   "7": "๐“—๐“ฒ",
  59.   "8": "โ„๐•š",
  60.   "9": "๐™ท๐š’",
  61.   "10": "๐–ง๐—‚",
  62.   "11": "๐—›๐—ถ",
  63.   "12": "๐™ƒ๐™ž",
  64.   "13": "๐˜๐˜ช",
  65.   "14": "โ’ฃโ’ค",
  66.   "15": "๐Ÿ‡ญ๐Ÿ‡ฎ",
  67.   "16": "๐Ÿ„ท๐Ÿ„ธ",
  68.   "17": "๐Ÿ…ท๐Ÿ…ธ",
  69.   "18": "",
  70.   "19": "Hรญ",
  71.   "20": "ใ‚“๏พ‰",
  72.   "21": "ษฆูฑ",
  73.   "22": "ะฝฮน",
  74.   "23": "ั’เน€",
  75.   "24": "ะั–",
  76.   "25": "แ‹˜แŒŽ",
  77.   "26": "โ„Œ๐”ฆ",
  78.   "27": "แธฆรฏ",
  79.   "28": "สœษช",
  80.   "29": "ฤฆษจ",
  81.   "30": "โ‚•แตข",
  82.   "31": "แดดโฑ",
  83.   "32": "ษฅฤฑ",
  84.   "34": "ฤฑษฅ",
  85.   "35": "Hi",
  86.   "36": "iH"
  87. }`
  88.     }
  89.   },
  90.  
  91.   onStart: async function ({ message, args }) {
  92.     try {
  93.       const [text, styleIndex] = args.join(" ").split("|").map(item => item.trim());
  94.       const styleName = Object.values(styleMap)[parseInt(styleIndex) - 1];
  95.  
  96.       if (!styleName || !text) {
  97.         message.reply("Please provide valid text and style number.");
  98.         return;
  99.       }
  100.  
  101.       const response = await axios.get(`https://apis-samir.onrender.com/api/stylize?text=${encodeURIComponent(text)}`);
  102.      
  103.       if (!response.data[styleName]) {
  104.         message.reply("Style not found.");
  105.         return;
  106.       }
  107.  
  108.       message.reply(response.data[styleName]);
  109.     } catch (error) {
  110.       console.error("Error styling text:", error.message);
  111.       message.reply("Failed to style text.");
  112.     }
  113.   }
  114. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement