update documentation and remove systemd support
This commit is contained in:
225
man/man5/manybot.conf.5
Normal file
225
man/man5/manybot.conf.5
Normal file
@@ -0,0 +1,225 @@
|
||||
.TH MANYBOT.CONF 5 "April 2026" "ManyBot 2.4.3" "File Formats"
|
||||
.SH NAME
|
||||
manybot.conf \- ManyBot configuration file
|
||||
.SH SYNOPSIS
|
||||
.I manybot.conf
|
||||
.SH DESCRIPTION
|
||||
The
|
||||
.I manybot.conf
|
||||
file configures the ManyBot WhatsApp bot. It uses a simple key-value format
|
||||
with support for multiline lists. Comments start with \fB#\fR.
|
||||
.PP
|
||||
The file must be located in the project root directory, alongside
|
||||
.IR package.json .
|
||||
.SH FORMAT
|
||||
.nf
|
||||
# Comments start with '#'
|
||||
|
||||
KEY=value
|
||||
KEY=[item1, item2, item3]
|
||||
.fi
|
||||
.SS Key-Value Pairs
|
||||
Simple configuration values:
|
||||
.PP
|
||||
.nf
|
||||
CLIENT_ID=my_bot
|
||||
CMD_PREFIX=!
|
||||
LANGUAGE=en
|
||||
.fi
|
||||
.SS Multiline Lists
|
||||
Arrays spanning multiple lines:
|
||||
.PP
|
||||
.nf
|
||||
CHATS=[
|
||||
123456789@c.us,
|
||||
123456789@g.us
|
||||
]
|
||||
|
||||
PLUGINS=[
|
||||
many,
|
||||
figurinha,
|
||||
audio,
|
||||
video
|
||||
]
|
||||
.fi
|
||||
.SH OPTIONS
|
||||
.SS Core Settings
|
||||
.TP
|
||||
.B CLIENT_ID=\fIstring\fR
|
||||
Unique identifier for the bot session.
|
||||
.RS
|
||||
.IP \(bu 2
|
||||
Default: \fBbot_permanente\fR
|
||||
.IP \(bu 2
|
||||
Creates a \fIsession/CLIENT_ID/\fR folder for authentication data
|
||||
.IP \(bu 2
|
||||
Changing this starts a new session (requires QR code rescan)
|
||||
.RE
|
||||
.TP
|
||||
.B CMD_PREFIX=\fIcharacter\fR
|
||||
Character that prefixes all bot commands.
|
||||
.RS
|
||||
.IP \(bu 2
|
||||
Default: \fB!\fR
|
||||
.IP \(bu 2
|
||||
Example: \fB!\fR makes commands like \fB!video\fR, \fB!audio\fR
|
||||
.IP \(bu 2
|
||||
Changing to \fB.\fR would make commands \fB.video\fR, \fB.audio\fR
|
||||
.RE
|
||||
.TP
|
||||
.B LANGUAGE=\fIcode\fR
|
||||
Bot interface language.
|
||||
.RS
|
||||
.IP \(bu 2
|
||||
Default: \fBen\fR (English)
|
||||
.IP \(bu 2
|
||||
Options: \fBen\fR, \fBpt\fR (Portuguese), \fBes\fR (Spanish)
|
||||
.IP \(bu 2
|
||||
Fallback to English if selected language not found
|
||||
.RE
|
||||
.SS Chat Settings
|
||||
.TP
|
||||
.B CHATS=[\fIid1\fR, \fIid2\fR, ...]
|
||||
Whitelist of chat IDs where the bot responds.
|
||||
.RS
|
||||
.IP \(bu 2
|
||||
Default: \fB[]\fR (empty = respond to all chats)
|
||||
.IP \(bu 2
|
||||
Private chat format: \fBnumber@c.us\fR
|
||||
.IP \(bu 2
|
||||
Group format: \fBnumber@g.us\fR or \fBnumber-number@g.us\fR
|
||||
.IP \(bu 2
|
||||
Use \fBnode src/utils/get_id.js\fR to discover chat IDs
|
||||
.RE
|
||||
.SS Plugin Settings
|
||||
.TP
|
||||
.B PLUGINS=[\fIname1\fR, \fIname2\fR, ...]
|
||||
List of plugins to load at startup.
|
||||
.RS
|
||||
.IP \(bu 2
|
||||
Default: \fB[]\fR (no plugins loaded)
|
||||
.IP \(bu 2
|
||||
Each name must match a folder in \fIsrc/plugins/\fR
|
||||
.IP \(bu 2
|
||||
Order matters: plugins load in listed order
|
||||
.IP \(bu 2
|
||||
Comment out or remove to disable without deleting files
|
||||
.RE
|
||||
.SS Built-in Plugins
|
||||
.TP
|
||||
.B many
|
||||
Lists all available commands. Required for \fB!many\fR to work.
|
||||
.TP
|
||||
.B figurinha
|
||||
Converts images/GIFs/videos to WhatsApp stickers.
|
||||
.TP
|
||||
.B video
|
||||
Downloads videos from URLs.
|
||||
.TP
|
||||
.B audio
|
||||
Downloads audio from videos as voice messages.
|
||||
.TP
|
||||
.B adivinha\(,c\(oao
|
||||
Guessing game (1-100).
|
||||
.TP
|
||||
.B forca
|
||||
Hangman game.
|
||||
.TP
|
||||
.B obrigado
|
||||
Responds to thank-you messages.
|
||||
.SH CUSTOM SETTINGS
|
||||
You can add any custom key-value pairs for use by plugins:
|
||||
.PP
|
||||
.nf
|
||||
# In manybot.conf
|
||||
ADMIN_NUMBER=5511999999999@c.us
|
||||
API_KEY=your_secret_key
|
||||
MAX_DOWNLOAD_SIZE=50MB
|
||||
.fi
|
||||
.PP
|
||||
Access in plugins:
|
||||
.nf
|
||||
import { ADMIN_NUMBER, API_KEY, MAX_DOWNLOAD_SIZE } from "../../config.js";
|
||||
.fi
|
||||
.SH EXAMPLES
|
||||
.SS Minimal Configuration
|
||||
.nf
|
||||
# Basic bot setup
|
||||
CLIENT_ID=my_bot
|
||||
CMD_PREFIX=!
|
||||
LANGUAGE=en
|
||||
|
||||
PLUGINS=[
|
||||
many
|
||||
]
|
||||
.fi
|
||||
.SS Production Configuration
|
||||
.nf
|
||||
# Production bot with whitelist
|
||||
CLIENT_ID=bot_prod
|
||||
CMD_PREFIX=/
|
||||
LANGUAGE=pt
|
||||
|
||||
CHATS=[
|
||||
5511999999999@c.us,
|
||||
5511888888888-123456789@g.us
|
||||
]
|
||||
|
||||
PLUGINS=[
|
||||
many,
|
||||
figurinha,
|
||||
video,
|
||||
audio,
|
||||
obrigado
|
||||
]
|
||||
|
||||
# Custom settings
|
||||
ADMIN_NUMBER=5511999999999@c.us
|
||||
LOG_LEVEL=info
|
||||
.fi
|
||||
.SS Development Configuration
|
||||
.nf
|
||||
# Debug/development setup
|
||||
CLIENT_ID=bot_dev
|
||||
CMD_PREFIX=!
|
||||
LANGUAGE=en
|
||||
|
||||
# Respond to all chats
|
||||
CHATS=[]
|
||||
|
||||
# All plugins for testing
|
||||
PLUGINS=[
|
||||
many,
|
||||
figurinha,
|
||||
video,
|
||||
audio,
|
||||
adivinha\(,c\(oao,
|
||||
forca,
|
||||
obrigado
|
||||
]
|
||||
.fi
|
||||
.SH FILES
|
||||
.TP
|
||||
.I manybot.conf
|
||||
Main configuration file (must be created by user)
|
||||
.TP
|
||||
.I manybot.conf.example
|
||||
Example configuration with documentation comments
|
||||
.SH NOTES
|
||||
\(bu Keys are case-sensitive
|
||||
.br
|
||||
\(bu Values are read as strings unless they're list syntax
|
||||
.br
|
||||
\(bu Inline comments supported: \fBKEY=value # comment\fR
|
||||
.br
|
||||
\(bu Multiline lists must end with \fB]\fR on its own line or last item line
|
||||
.br
|
||||
\(bu Whitespace in values is trimmed
|
||||
.br
|
||||
\(u Missing optional values use built-in defaults
|
||||
.SH SEE ALSO
|
||||
.BR manybot (1),
|
||||
.BR manybot-plugin (1),
|
||||
.BR manyplug (1)
|
||||
.SH AUTHOR
|
||||
Written by synt-xerror.
|
||||
Reference in New Issue
Block a user