Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sistematico/macunaima-telegram-bot
Um bot anti-spam para o Telegram
https://github.com/sistematico/macunaima-telegram-bot
bun telegram typescript
Last synced: about 1 month ago
JSON representation
Um bot anti-spam para o Telegram
- Host: GitHub
- URL: https://github.com/sistematico/macunaima-telegram-bot
- Owner: sistematico
- Created: 2023-11-14T14:34:12.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-12-27T15:44:07.000Z (about 1 year ago)
- Last Synced: 2024-05-21T12:08:27.914Z (8 months ago)
- Topics: bun, telegram, typescript
- Language: TypeScript
- Homepage: https://macu.paxa.dev
- Size: 699 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# š¤ MacunaĆma Telegram Bot
Um ābotā anti-spam para o [Telegram](https://telegram.org).
> Ai que preguiƧa...
### š¦¾ Comandos
| Comando | ParĆ¢metros | DescriĆ§Ć£o | Exemplo | Contexto |
| :--- | :---: | :---: | :---: | ---: |
| `/add_banned_word` | `palavra ou frase` | Adiciona uma palavra ou frase as palavras banidas do grupo | `/add_banned_word api.whatsapp` | Grupo ou SuperGrupo
| `/report` | `Motivo` | Reporta um usuĆ”rio respondendo a mensagem | `/report SPAM` (responda mensagem do usuĆ”rio com o comando) | Grupo ou SuperGrupo### šāāļø CI/CD
[![CI](https://github.com/sistematico/macunaima-telegram-bot/actions/workflows/ci.yml/badge.svg)](https://github.com/sistematico/macunaima-telegram-bot/actions/workflows/ci.yml)
[![CD](https://github.com/sistematico/macunaima-telegram-bot/actions/workflows/cd.yml/badge.svg)](https://github.com/sistematico/macunaima-telegram-bot/actions/workflows/cd.yml)### š¦ InstalaĆ§Ć£o, configuraĆ§Ć£o e testes
- Converse com o [@BotFather](https://t.me/botfather) no Telegram, crie um ābotā e copie o Token
- Adicione seu token no arquivo `.env`Ajustar o WebHook:
```
https://api.telegram.org/bot{TOKEN_DO_BOT}/setWebhook?url=https://url_do_seu_bot.com
```#### InstalaĆ§Ć£o do Banco de dados [PostgreSQL](https://postgresql.org) ([Rocky Linux](https://rockylinux.org))
```bash
dnf install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-9-x86_64/pgdg-redhat-repo-latest.noarch.rpmdnf -qy module disable postgresql
dnf install -y postgresql16-server
/usr/pgsql-16/bin/postgresql-16-setup initdb
systemctl --now enable postgresql-16.service
```#### ConfiguraĆ§Ć£o do Banco de dados [PostgreSQL](https://postgresql.org)
```bash
sudo -u postgres psql
CREATE DATABASE macunaima;
CREATE USER macunaima WITH PASSWORD 'senha';
GRANT ALL PRIVILEGES ON DATABASE macunaima TO macunaima;
\q
```Ou use um [script](./scripts/db/create.sh) automatizado.
## š CrĆ©ditos
- [Ansible](https://www.ansible.com)
- [Grammy](https://grammy.dev)
- [Bun](https://bun.sh)
- [Hono](https://hono.dev)
- [Prisma](https://prisma.io)
- [Arch Linux](https://archlinux.org)
- [FĆ©](https://pt.wikipedia.org/wiki/FĆ©)## š Ajude
Se o meu trabalho foi Ćŗtil de qualquer maneira, considere doar qualquer valor atravĆ©s do das seguintes plataformas:
[![LiberaPay](https://img.shields.io/badge/LiberaPay-gray?logo=liberapay&logoColor=white&style=flat-square)](https://liberapay.com/sistematico/donate) [![PagSeguro](https://img.shields.io/badge/PagSeguro-gray?logo=pagseguro&logoColor=white&style=flat-square)](https://pag.ae/bfxkQW) [![ko-fi](https://img.shields.io/badge/ko--fi-gray?logo=ko-fi&logoColor=white&style=flat-square)](https://ko-fi.com/K3K32RES9) [![Buy Me a Coffee](https://img.shields.io/badge/Buy_Me_a_Coffee-gray?logo=buy-me-a-coffee&logoColor=white&style=flat-square)](https://www.buymeacoffee.com/sistematico) [![Open Collective](https://img.shields.io/badge/Open_Collective-gray?logo=opencollective&logoColor=white&style=flat-square)](https://opencollective.com/sistematico) [![Patreon](https://img.shields.io/badge/Patreon-gray?logo=patreon&logoColor=white&style=flat-square)](https://patreon.com/sistematico)
[![GitHub Sponsors](https://img.shields.io/github/sponsors/sistematico?label=Github%20Sponsors)](https://github.com/sponsors/sistematico)