const fs = require('fs'); const file = 'public/css/bot.css'; let content = fs.readFileSync(file, 'utf8'); const oldStr = `.sidebar-middle { flex: 1; display: flex; flex-direction: column; gap: 8px; justify-content: center; position: relative; } .sidebar-bottom { padding-top: 6px; border-top: 1px solid rgba(255, 255, 255, 0.05); position: relative; margin: 0 9px; } .sidebar-item { width: 100%; display: flex; align-items: center; gap: 12px; padding: 9px 19px; border-radius: 12px; background: transparent; border: none; color: #e3e9f3; cursor: pointer; justify-content: flex-start; transition: background .15s ease, transform .15s ease, color .15s ease, padding .15s ease; } .sidebar-shell.open:not(:hover) .sidebar-item { justify-content: center !important; padding-left: 0 !important; padding-right: 0 !important; gap: 0 !important; } .sidebar-item .icon { width: 28px; height: 28px; border-radius: 10px; display: grid; place-items: center; background: transparent; box-shadow: none; font-size: 16px; flex-shrink: 0; } .sidebar-item .label { opacity: 0; transform: translateX(-6px); white-space: nowrap; transition: opacity .12s ease, transform .12s ease; } .sidebar-shell.open .sidebar-item .label { display: inline-block; max-width: 0; opacity: 0; overflow: hidden; transition: max-width .25s ease, opacity .25s ease, transform .25s ease; } .sidebar-shell.open:hover .sidebar-item { padding: 9px 20px; } .sidebar-shell.open:hover .sidebar-item .label { max-width: 150px; opacity: 1; transform: translateX(0); }`; const newStr = `.sidebar-middle { flex: 1; display: flex; flex-direction: column; gap: 8px; justify-content: center; position: relative; margin: 0 9px; } .sidebar-bottom { padding-top: 6px; border-top: 1px solid rgba(255, 255, 255, 0.05); position: relative; margin: 0 9px; } .sidebar-item { width: 100%; display: flex; align-items: center; gap: 12px; padding: 9px 11px; border-radius: 12px; background: transparent; border: none; color: #e3e9f3; cursor: pointer; justify-content: flex-start; transition: background .15s ease, transform .15s ease, color .15s ease; } .sidebar-item .icon { width: 28px; height: 28px; border-radius: 10px; display: grid; place-items: center; background: transparent; box-shadow: none; font-size: 16px; flex-shrink: 0; } .sidebar-item .label { opacity: 0; transform: translateX(-6px); white-space: nowrap; transition: opacity .12s ease, transform .12s ease; } .sidebar-shell.open .sidebar-item .label { display: inline-block; max-width: 0; opacity: 0; overflow: hidden; transition: max-width .25s ease, opacity .25s ease, transform .25s ease; } .sidebar-shell.open:hover .sidebar-item .label { max-width: 150px; opacity: 1; transform: translateX(0); }`; if (content.includes(oldStr)) { fs.writeFileSync(file, content.replace(oldStr, newStr)); console.log('Successfully patched bot.css sidebar item'); } else { console.log('Old string not found in bot.css!'); }