This bot helps you to generating passwords and keeping track of you credentials.
Use git to clone the template.
git clone https://github.com/jz-software/telegram-bot-templateInstall dependencies.
npm installChange the content in package.json to the information you want.
Set the environment variables (create an .env file or configure them depending on the server type).
TOKEN=your_bot_token # can be received from @botfather
Run the bot using npm start.
An example file is already created in the src/commands folder:
module.exports={name: 'start',description: 'Receive a greeting from the bot',public: true,execute(ctx){ctx.replyWithMarkdown('Hello World');}}name: The name of the command, the keyword that triggers the execution of this block.
description: A description of the command. Used when the user gets a list of the commands.
public: If set to true, it will be shown to the user in the bot's command list.
execute: The code to run. Ctx is always passed. To read more go here.
You can create a scene by adding a file in src/scenes folder.
There is an example file which you can copy paste and customize.
When you created a scene you can enter it by: ctx.scene.enter('sceneName').