[termux] testing support for termux v18

This commit is contained in:
synt-xerror
2026-03-14 03:20:00 -03:00
parent 12d86da784
commit c2d8a916e5
2 changed files with 15 additions and 3 deletions

6
setup
View File

@@ -44,6 +44,12 @@ cat << "EOF"
| | | | .'| | | | __ -| . | _| | | | | .'| | | | __ -| . | _|
|_|_|_|__,|_|_|_ |_____|___|_| |_|_|_|__,|_|_|_ |_____|___|_|
|___| |___|
website: www.mlplovers.com.br/manybot
repo: github.com/synt-xerror/manybot
A Amizade é Mágica!
EOF EOF
echo -e "${RESET}" echo -e "${RESET}"
} }

View File

@@ -8,13 +8,19 @@ export const { Client, LocalAuth, MessageMedia } = pkg;
// detecta termux, e usa o executável do chromium do sistema em vez do puppeteer // detecta termux, e usa o executável do chromium do sistema em vez do puppeteer
const isTermux = const isTermux =
os.platform() === "linux" && (os.platform() === "linux" || os.platform() === "android") &&
process.env.PREFIX?.startsWith("/data/data/com.termux"); process.env.PREFIX?.startsWith("/data/data/com.termux");
const puppeteerConfig = isTermux const puppeteerConfig = isTermux
? { ? {
executablePath: "/data/data/com.termux/files/usr/bin/chromium", executablePath: "/data/data/com.termux/files/usr/bin/chromium",
args: ["--no-sandbox", "--disable-setuid-sandbox", "--disable-dev-shm-usage"] args: [
"--no-sandbox",
"--disable-setuid-sandbox",
"--disable-dev-shm-usage",
"--disable-gpu",
"--disable-software-rasterizer"
]
} }
: {}; : {};