Leask / halbot

Just another `ChatGPT` / `Gemini` / `Mistral (by ollama)` Telegram bob, which is simple design, easy to use, extendable and fun.
https://leaskh.com/post/711636926789271552/halbot
MIT License
101 stars 16 forks source link

Run halbot in background #15

Closed Am1nCmd closed 1 year ago

Am1nCmd commented 1 year ago

Hi there, I'm using this in my Linux VPS, it is running smoothly, and thank you for that. but it always close when I close the connection via SSH

does it have any way to run this in the background? so I can always be running this bot even after the SSH connection is closed?

Am1nCmd commented 1 year ago

Oh I also facing this error

`/root/.npm/_npx/c35c4739108a4593/node_modules/telegraf/lib/core/network/client.js:293 throw new error_1.default(data, { method, payload }); ^

TelegramError: 400: Bad Request: can't parse entities: Can't find end of the entity starting at byte offset 57 at Telegram.callApi (/root/.npm/_npx/c35c4739108a4593/node_modules/telegraf/lib/core/network/client.js:293:19) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async ctx.ok (file:///root/.npm/_npx/c35c4739108a4593/node_modules/utilitas/lib/bot.mjs:105:31) at async ok (file:///root/.npm/_npx/c35c4739108a4593/node_modules/halbot/skills/ai.mjs:34:16) at async action (file:///root/.npm/_npx/c35c4739108a4593/node_modules/halbot/skills/ai.mjs:63:5) at async execute (/root/.npm/_npx/c35c4739108a4593/node_modules/telegraf/lib/composer.js:485:17) at async /root/.npm/_npx/c35c4739108a4593/node_modules/telegraf/lib/composer.js:486:21 at async execute (/root/.npm/_npx/c35c4739108a4593/node_modules/telegraf/lib/composer.js:485:17) at async /root/.npm/_npx/c35c4739108a4593/node_modules/telegraf/lib/composer.js:486:21 at async action (file:///root/.npm/_npx/c35c4739108a4593/node_modules/halbot/skills/translate.mjs:30:5) { response: { ok: false, error_code: 400, description: "Bad Request: can't parse entities: Can't find end of the entity starting at byte offset 57" },`

Leask commented 1 year ago

1st, You can learn to use tmux to run any CLI program in the background. 2nd, Can you give me more information to help me reproduce this issue? What version are you using and which message triggers this issue? Thanks!

Am1nCmd commented 1 year ago

sorry for my bad explanation, I already using nohup & ps2 to make this run in the background. But i'm not sure how to reproduce the issue.

On 2 Apr 2023, at 23.43, Leask @.**@.>> wrote:

1st, You can learn to use tmux to run any CLI program in the background. 2nd, Can you give me more information to help me reproduce this issue? What version are you using and which message triggers this issue? Thanks!

— Reply to this email directly, view it on GitHubhttps://github.com/Leask/halbot/issues/15#issuecomment-1493387779, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ADVBANOUW5VMBQMCAW3MUBDW7GUCXANCNFSM6AAAAAAWQMFDVQ. You are receiving this because you authored the thread.Message ID: @.***>

Am1nCmd commented 1 year ago

an example command that I use

nohup npx halbot > /dev/null nohup: ignoring input and redirecting stderr to stdout

it should be on jobs if I want to see the running process, but actually is not there

image
Am1nCmd commented 1 year ago

Currently solved using tmux