block.io will be used by the bot so it can create and label wallets for users who type /register
.
- Go to block.io and create an account (free)
- Set a pin, and save your mnemonic phrase offline. This will be used to generate your wallet again in the event you lose access to your account so always have the habit of keeping this safe.
- Click on "Show API Key" then copy the key for "Dogecoin (testnet)"
Create a Telegram Bot @BotFather
Further bot documentation link
- Start a chat with @botfather
- Type
/newbot
then follow the instructions - @botfather will send you your bot's authentication token
Once you have a Block.io Account setup, and created your own Telegram Bot it's time to clone the project and get it setup.
git clone [email protected]:peakshift/telegram-dogecoin.git
cd telegram-dogecoin
pip install block-io
pip install requests
pip install behave
TELEGRAM_BOT_TOKEN=<your token> BLOCKIO_API_KEY=<your key> BLOCKIO_PIN=<your pin> python3 run.py
In step 5, replace the entire of <your token>
, <your token>
, <your token>
.
- A branch name should begin with the issue number, and have short name (2-4 words). New features or fixes should be based off of the
master
branch.git checkout -b 123-short-name master
When making changes or adding a new feature, to ensure the feature works correctly or the changes made have not broken the code then you can do unit testing using the behave framework and gherkin scenarios. *Behave Framework Docs
To begin testing your scenarios
- do
pipenv install
- run
pipenv run behave
- if it passes
- commit and push your branch
- checkout develop and merge your branch
- push the develop branch
- open a pull request for your branch in master
- if it fails
- fix the problem so all tests pass
- Open Terminal.
git pull
git add file_name.py
git commit -m "type(component): subject line"
git push origin 123-short-name
We follow the Angular commit guidelines so that we can generate changelogs and have a clean commit history โ see Pushing Changes #3 for an example commit.
- Type, for your commit message commiting you should select a type from this list below:
- feat: a new features
- fix: a bug fix
- docs: documentation only changes
- style: changes that do not affect the menaing of the code (white-space, formatting, missing semi-colons, etc)
- refactor: a code change that neither fixes a bug or adds a feature
- pref: a code change that improves performance
- test: adding missing tests
- chore: changes to the build process or auxiliary tools and libraries such as documentation generation
- Components, represent the larger feature / scope of the change
- Subject line, use the imperative form of a verb
- GOOD "add contributing guidelines"
- BAD "adding contribuing guidelines"