add manyplug documentation and installation
This commit is contained in:
28
README.md
28
README.md
@@ -114,17 +114,24 @@ node src/utils/get_id.js
|
|||||||
|
|
||||||
O ManyBot é construído em torno de um sistema de plugins. O kernel apenas conecta ao WhatsApp e distribui as mensagens — os plugins decidem o que fazer.
|
O ManyBot é construído em torno de um sistema de plugins. O kernel apenas conecta ao WhatsApp e distribui as mensagens — os plugins decidem o que fazer.
|
||||||
|
|
||||||
### Plugins Incluídos
|
### Gerenciando Plugins com ManyPlug
|
||||||
|
|
||||||
| Plugin | Comando | Descrição |
|
Instale e gerencie plugins usando o **ManyPlug CLI**:
|
||||||
|--------|---------|-----------|
|
|
||||||
| **figurinha** | `!figurinha` | Converte imagens, GIFs e vídeos em figurinhas |
|
```bash
|
||||||
| **video** | `!video <link>` | Baixa vídeos da internet |
|
# Instalar o gerenciador
|
||||||
| **audio** | `!audio <link>` | Baixa áudio de vídeos como mensagem de voz |
|
npm install -g @freakk.dev/manyplug
|
||||||
| **adivinhacao** | `!adivinhacao comecar` | Jogo de adivinhação (1-100) |
|
|
||||||
| **forca** | `!forca comecar` | Jogo da forca clássico |
|
# Criar um novo plugin
|
||||||
| **many** | `!many` | Lista todos os comandos disponíveis |
|
cd src/plugins
|
||||||
| **obrigado** | `!obrigado` | Responde agradecimentos |
|
manyplug init meu-plugin --category utility
|
||||||
|
|
||||||
|
# Instalar de outro diretório
|
||||||
|
manyplug install --local ../outro-plugin
|
||||||
|
|
||||||
|
# Listar plugins instalados
|
||||||
|
manyplug list
|
||||||
|
```
|
||||||
|
|
||||||
### Criar um Plugin
|
### Criar um Plugin
|
||||||
|
|
||||||
@@ -147,7 +154,6 @@ Veja mais na [documentação de plugins](docs/PLUGINS.md).
|
|||||||
- [📥 Instalação Completa](docs/INSTALACAO.md) — Linux, Windows, Termux
|
- [📥 Instalação Completa](docs/INSTALACAO.md) — Linux, Windows, Termux
|
||||||
- [⚙️ Configuração](docs/CONFIGURACAO.md) — Todas as opções do `manybot.conf`
|
- [⚙️ Configuração](docs/CONFIGURACAO.md) — Todas as opções do `manybot.conf`
|
||||||
- [🔌 Criando Plugins](docs/PLUGINS.md) — Guia completo de desenvolvimento
|
- [🔌 Criando Plugins](docs/PLUGINS.md) — Guia completo de desenvolvimento
|
||||||
- [🖥️ Serviço Systemd](docs/SYSTEMD.md) — Rodar como serviço Linux
|
|
||||||
- [🛠️ API de Plugins](docs/API.md) — Referência de objetos `msg` e `api`
|
- [🛠️ API de Plugins](docs/API.md) — Referência de objetos `msg` e `api`
|
||||||
|
|
||||||
## 🌍 Internacionalização
|
## 🌍 Internacionalização
|
||||||
|
|||||||
28
README_EN.md
28
README_EN.md
@@ -114,17 +114,24 @@ node src/utils/get_id.js
|
|||||||
|
|
||||||
ManyBot is built around a plugin system. The kernel only connects to WhatsApp and distributes messages — plugins decide what to do.
|
ManyBot is built around a plugin system. The kernel only connects to WhatsApp and distributes messages — plugins decide what to do.
|
||||||
|
|
||||||
### Included Plugins
|
### Managing Plugins with ManyPlug
|
||||||
|
|
||||||
| Plugin | Command | Description |
|
Install and manage plugins using the **ManyPlug CLI**:
|
||||||
|--------|---------|-------------|
|
|
||||||
| **sticker** | `!sticker` | Converts images, GIFs, and videos into stickers |
|
```bash
|
||||||
| **video** | `!video <link>` | Downloads videos from the internet |
|
# Install the plugin manager
|
||||||
| **audio** | `!audio <link>` | Downloads audio from videos as voice messages |
|
npm install -g @freakk.dev/manyplug
|
||||||
| **guess** | `!guess start` | Guessing game (1-100) |
|
|
||||||
| **hangman** | `!hangman start` | Classic hangman game |
|
# Create a new plugin
|
||||||
| **many** | `!many` | Lists all available commands |
|
cd src/plugins
|
||||||
| **thanks** | `!thanks` | Responds to thanks |
|
manyplug init my-plugin --category utility
|
||||||
|
|
||||||
|
# Install from another directory
|
||||||
|
manyplug install --local ../another-plugin
|
||||||
|
|
||||||
|
# List installed plugins
|
||||||
|
manyplug list
|
||||||
|
```
|
||||||
|
|
||||||
### Create a Plugin
|
### Create a Plugin
|
||||||
|
|
||||||
@@ -147,7 +154,6 @@ See more in the [plugin documentation](docs/PLUGINS_EN.md).
|
|||||||
- [📥 Full Installation](docs/INSTALLATION.md) — Linux, Windows, Termux
|
- [📥 Full Installation](docs/INSTALLATION.md) — Linux, Windows, Termux
|
||||||
- [⚙️ Configuration](docs/CONFIGURATION.md) — All `manybot.conf` options
|
- [⚙️ Configuration](docs/CONFIGURATION.md) — All `manybot.conf` options
|
||||||
- [🔌 Creating Plugins](docs/PLUGINS.md) — Complete development guide
|
- [🔌 Creating Plugins](docs/PLUGINS.md) — Complete development guide
|
||||||
- [🖥️ Systemd Service](docs/SYSTEMD.md) — Run as a Linux service
|
|
||||||
- [🛠️ Plugin API](docs/API.md) — Reference for `msg` and `api` objects
|
- [🛠️ Plugin API](docs/API.md) — Reference for `msg` and `api` objects
|
||||||
|
|
||||||
## 🌍 Internationalization
|
## 🌍 Internationalization
|
||||||
|
|||||||
@@ -4,8 +4,51 @@ Guia completo para criar plugins no ManyBot.
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
## ManyPlug CLI
|
||||||
|
|
||||||
|
**ManyPlug** é a ferramenta oficial para gerenciar plugins do ManyBot. Com ela você pode criar, instalar e validar plugins facilmente.
|
||||||
|
|
||||||
|
### Instalação
|
||||||
|
|
||||||
|
```bash
|
||||||
|
npm install -g @freakk.dev/manyplug
|
||||||
|
```
|
||||||
|
|
||||||
|
Ou para desenvolvimento:
|
||||||
|
```bash
|
||||||
|
git clone https://git.maneos.net/synt-xerror/manyplug
|
||||||
|
cd manyplug
|
||||||
|
npm link
|
||||||
|
```
|
||||||
|
|
||||||
|
### Comandos
|
||||||
|
|
||||||
|
| Comando | Descrição |
|
||||||
|
|---------|-----------|
|
||||||
|
| `manyplug init <nome>` | Cria estrutura de um novo plugin |
|
||||||
|
| `manyplug install [nome]` | Instala do registro ou `--local <caminho>` |
|
||||||
|
| `manyplug list` | Lista plugins instalados |
|
||||||
|
| `manyplug validate [caminho]` | Valida o manyplug.json |
|
||||||
|
|
||||||
|
### Exemplos
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Criar novo plugin
|
||||||
|
cd src/plugins
|
||||||
|
manyplug init meu-plugin --category utility
|
||||||
|
|
||||||
|
# Instalar de outro diretório
|
||||||
|
manyplug install --local ../outro-plugin
|
||||||
|
|
||||||
|
# Validar manifesto
|
||||||
|
manyplug validate ./meu-plugin
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
## 📑 Índice
|
## 📑 Índice
|
||||||
|
|
||||||
|
- [ManyPlug CLI](#manyplug-cli)
|
||||||
- [Estrutura Básica](#estrutura-básica)
|
- [Estrutura Básica](#estrutura-básica)
|
||||||
- [Manifesto do Plugin](#manifesto-do-plugin-manyplugjson)
|
- [Manifesto do Plugin](#manifesto-do-plugin-manyplugjson)
|
||||||
- [Criando Seu Primeiro Plugin](#criando-seu-primeiro-plugin)
|
- [Criando Seu Primeiro Plugin](#criando-seu-primeiro-plugin)
|
||||||
|
|||||||
@@ -100,6 +100,28 @@ Message information including \fBbody\fR, \fBargs\fR, \fBtype\fR, \fBsender\fR,
|
|||||||
.B api
|
.B api
|
||||||
Interaction methods including \fBsend()\fR, \fBsendVideo()\fR, \fBsendAudio()\fR,
|
Interaction methods including \fBsend()\fR, \fBsendVideo()\fR, \fBsendAudio()\fR,
|
||||||
\fBsendImage()\fR, \fBsendSticker()\fR, \fBgetPlugin()\fR, and \fBlog\fR methods.
|
\fBsendImage()\fR, \fBsendSticker()\fR, \fBgetPlugin()\fR, and \fBlog\fR methods.
|
||||||
|
.SH MANYPLUG
|
||||||
|
ManyPlug is the official CLI for managing ManyBot plugins. Install it with:
|
||||||
|
.PP
|
||||||
|
.nf
|
||||||
|
$ npm install -g @freakk.dev/manyplug
|
||||||
|
.fi
|
||||||
|
.PP
|
||||||
|
Common commands:
|
||||||
|
.TP
|
||||||
|
.B manyplug init \fIname\fR
|
||||||
|
Create a new plugin boilerplate in the current directory.
|
||||||
|
.TP
|
||||||
|
.B manyplug install [\fIname\fR]
|
||||||
|
Install a plugin from the registry or use \fB--local \fIpath\fR to install from a local directory.
|
||||||
|
.TP
|
||||||
|
.B manyplug list
|
||||||
|
List all installed plugins in \fIsrc/plugins/\fR.
|
||||||
|
.TP
|
||||||
|
.B manyplug validate [\fIpath\fR]
|
||||||
|
Validate the \fImanyplug.json\fR manifest file.
|
||||||
|
.PP
|
||||||
|
See \fBmanyplug(1)\fR for complete documentation.
|
||||||
.SH FILES
|
.SH FILES
|
||||||
.TP
|
.TP
|
||||||
.I manybot.conf
|
.I manybot.conf
|
||||||
|
|||||||
13
setup
13
setup
@@ -170,6 +170,19 @@ log_info "Instalando Chrome"
|
|||||||
|
|
||||||
npx puppeteer browsers install chrome
|
npx puppeteer browsers install chrome
|
||||||
|
|
||||||
|
# ------------------------
|
||||||
|
# ManyPlug CLI
|
||||||
|
# ------------------------
|
||||||
|
log_info "Instalando ManyPlug CLI"
|
||||||
|
|
||||||
|
if ! command -v manyplug &>/dev/null; then
|
||||||
|
log_info "ManyPlug não encontrado, instalando globalmente..."
|
||||||
|
npm install -g @freakk.dev/manyplug
|
||||||
|
log_ok "ManyPlug instalado com sucesso"
|
||||||
|
else
|
||||||
|
log_ok "ManyPlug já está instalado"
|
||||||
|
fi
|
||||||
|
|
||||||
# ------------------------
|
# ------------------------
|
||||||
# Configuração de exemplo
|
# Configuração de exemplo
|
||||||
# ------------------------
|
# ------------------------
|
||||||
|
|||||||
Reference in New Issue
Block a user