2024-05-24 17:49:24 -03:00
# Lynx (Node.js Telegram Bot)
2024-05-24 17:53:23 -03:00
Lynx is a a simple Telegram bot made in Node.js.
2024-06-02 12:02:15 +00:00
- You can find Lynx at [@LynxBR_bot ](https://t.me/LynxBR_bot ) on Telegram.
2024-05-24 17:49:24 -03:00
## Requirements
2024-05-24 17:53:23 -03:00
- A Telegram bot (create one at [@BotFather ](https://t.me/botfather ))
2024-05-31 17:59:02 -03:00
- Node.js 20 LTS (or above)
2024-06-02 22:30:09 +00:00
- Python 3 (or above, for use with SpamWatch API)
- Python dependencies: use ``pip install -r requirements.txt` `
- Node.js dependencies: use ``npm install` `
2024-05-24 17:49:24 -03:00
2024-06-02 22:25:10 +00:00
## Run it yourself, develop or contribute with Lynx
2024-05-24 17:57:44 -03:00
First, [make a fork of this repo ](https://github.com/lucmsilva651/lynx/fork ), or clone it with
```
git clone https://github.com/lucmsilva651/lynx
```
2024-05-24 17:58:54 -03:00
Next, go to the repository directory, create a ``config.env` ` file and put the content below:
2024-05-24 17:49:24 -03:00
```
2024-06-02 13:36:05 +00:00
TGBOT_TOKEN="0000000000:AAAaaAAaaaaAaAaaAAAaaaAaaaaAAAAAaaa"
TGBOT_ADMINS=[0000000000, 1111111111, 2222222222]
2024-06-02 22:01:52 +00:00
SW_KEY="aAaAAaaAAaAA_AAAAAaaAAaaAAaaAAAAAAaaAaaAaaAAaaAAaAaAAaaAAaaAAaAaA"
2024-05-24 17:49:24 -03:00
```
2024-06-02 13:36:05 +00:00
- **TGBOT_TOKEN**: Put your bot token that you created at [@BotFather ](https://t.me/botfather ) at the variable ``TGBOT_TOKEN` ` (as the example above).
- **TGBOT_ADMINS**: Put the ID of the people responsible for managing the bot (as the example above). They can use some administrative + exclusive commands on any group.
2024-06-02 22:01:52 +00:00
- **SW_KEY**: A API key to make a blocklist to banned SpamWatch users. You can refer to SpamWatch docs to create a API key for yourself.
2024-05-24 17:49:24 -03:00
2024-06-02 13:36:05 +00:00
After editing the file, save all changes and run the bot with ``npm start` `.
2024-05-24 17:49:24 -03:00
2024-06-02 22:25:10 +00:00
## Notes
- The source code itself of the bot is at ``src/main.js``, and the commands are in ``src/commands` `.
- You can edit this file and the ``package.json` ` file as your needs.
- The name of the command file will always be the command itself.
- Example: ``whois.js`` will always be ``/whois` ` on Telegram.
- Also, to see your changes, please restart the bot before making a issue.
2024-05-24 17:55:28 -03:00
## About/License
2024-05-31 18:42:56 -03:00
MIT - 2024 Lucas Gabriel (lucmsilva).