kowalski/README.md

46 lines
2.1 KiB
Markdown
Raw Normal View History

2024-07-24 22:39:27 -03:00
# Lynx (Node.js Telegram Bot)
Lynx is a a simple Telegram bot made in Node.js.
- You can find Lynx at [@LynxBR_bot](https://t.me/LynxBR_bot) on Telegram.
## Requirements
- A Telegram bot (create one at [@BotFather](https://t.me/botfather))
- Node.js 20 LTS (or above)
- Python 3 (or above, for use with SpamWatch API)
- Python dependencies: use ``pip install -r requirements.txt``
2024-09-08 11:27:19 -03:00
- Node.js dependencies: use ``npm install .``
2024-07-24 22:39:27 -03:00
## Run it yourself, develop or contribute with Lynx
2024-09-08 11:27:19 -03:00
First, clone the repo with Git:
2024-07-24 22:39:27 -03:00
```
git clone https://github.com/lucmsilva651/lynx
2024-09-08 11:27:19 -03:00
```
And now, init the submodules with these commands (this is very important):
```
2024-07-28 12:32:18 -03:00
cd lynx
git submodule update --init --recursive
2024-07-24 22:39:27 -03:00
```
2024-09-09 19:18:22 -03:00
Next, inside the repository directory, go to props folder and create a `config.json` file with the following content:
2024-07-24 22:39:27 -03:00
```
{
"botToken": "0000000000:AAAaaAAaaaaAaAaaAAAaaaAaaaaAAAAAaaa",
2024-09-08 11:27:19 -03:00
"admins": [0000000000, 1111111111, 2222222222],
"lastKey": "0000a000a0000aaa0a00a0aaa0a000000",
2024-09-09 19:18:22 -03:00
"lastSecret": "0000a000a0a0000aa0000aa00000000a",
"weatherKey": "0000a000a0000aaa0a00a0aaa0a000000"
}
2024-07-24 22:39:27 -03:00
```
- **botToken**: Put your bot token that you created at [@BotFather](https://t.me/botfather), as the example above.
- **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-09-09 19:18:22 -03:00
- **lastKey**: Last.fm API key, for use on `lastfm.js` functions, like see who is listening to what song and etc.
2024-09-08 11:27:19 -03:00
- **lastSecret**: Last.fm API secret (optional), which has the "same" purpose as the API key above.
2024-09-09 19:18:22 -03:00
- **weatherKey**: Weather.com API key, used for the `/weather` command
2024-07-24 22:39:27 -03:00
After editing the file, save all changes and run the bot with ``npm start``.
2024-09-08 11:27:19 -03:00
- To deal with dependencies, just run ``npm install .`` or ``npm i .`` at any moment to install any of them.
2024-07-24 22:39:27 -03:00
2024-07-28 12:05:41 -03:00
## Note
- Take care of your ``config.json`` file, as it is so much important and needs to be secret (like your passwords), as anyone can do whatever they want to the bot with this token!
2024-07-24 22:39:27 -03:00
## About/License
2024-09-09 19:18:22 -03:00
BSD-3-Clause - 2024 Lucas Gabriel (lucmsilva).