Skip to content

A simple starter template using the Grammy library for Telegram bots.

License

Notifications You must be signed in to change notification settings

losparviero/Grammy-Telegram-Bot-Template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Grammy Telegram Bot Template

A simple starter template using the Grammy library for Telegram bots.

Includes concurrent run using @grammyjs/runner and error handling.


Install

  1. Clone git repo.
  2. Run npm i in project folder. This will install the required dependencies.
  3. Populate .env file with bot token.

Bot token can be obtained from @BotFather.

  1. Run node bot to start the bot.

It's advisable to run the bot using PM2 or any startup manager for persistent execution, as this ensures you won't have to have the terminal open. You can set up auto-start as well. Or pass a cron job.


Uninstall

  1. Use rm -rf.

Note: If you're unfamiliar with this command, delete project folder from file explorer.


License

Replace 'Author' with author name in the provided sample LICENSE file. You are free to use any license you want.


This template uses The Unlicense.

This is free and unencumbered software released into the public domain.

Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.

In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
software to the public domain. We make this dedication for the benefit
of the public at large and to the detriment of our heirs and
successors. We intend this dedication to be an overt act of
relinquishment in perpetuity of all present and future rights to this
software under copyright law.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.

For more information, please refer to <http://unlicense.org/>