Skip to content

osboo/sharegood

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Publish

Sharegood

Telegram bot for tracking car expences and notifications of regular service

Run in VS Code

  • Install dev environment (Docker env for VS Code) link

  • Re-open folder in container

  • ngrok http 7071

  • put https temprary URL to .env file as NGROK_URL. Env file should be in form of KEY=VALUE

  • define SharegoodToken variable in .env file. Check Botfather to get token for corresponding bot.

  • run bash utils/set-webhook.sh

  • define botUsersIDs as xxxxxxxxx; allowed telegram ids

  • run func in VS Code - press F5

Run locally

  • install Azure CLI
  • install Azure Func core tools
  • install ngrok
  • run ngrok http 7071
  • put https temprary URL to .env file as NGROK_URL
  • run bash utils/set-webhook.sh
  • run func host start

Run tests

  • Define local Azurite as temp database StorageAccountConnectionString equal to
DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;TableEndpoint=http://127.0.0.1:10002/devstoreaccount1;
  • Run Azurite: see doc
  • run pytests mybot/tests or use VSCode Test Explorer

Useful links

Preparation

Aiogram

-[x] Bulid echo bot local link -[x] Migrate to webhook - see set-webhook.sh

Azure Function

Manual

Integrate Aiogram bot with Azure Fuction

Helping links:

Use Azure Key Vault to get sensitive data

Tutorial

About

Telegram bot for sharing good

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors