Skip to content

A Telegram bot using the Pokemon API to give out certain data about special Pokemon to the User. Built with Ruby.

Notifications You must be signed in to change notification settings

marcode95/telegram-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Telegram Bot - Pokemon API

Demo

Ruby implementation of a Telegram Bot giving out information about the first 151 characters of the famous Pokemon franchise using https://pokeapi.co/

This project was developed as a learning project part of the Microverse curriculum.

Demo

Built With

  • Ruby

Getting Started

Step 1
Clone the repo to a local folder by inputting this command into your terminal
git clone https://github.com/marcode95/telegram-bot
Step 2
Run cd telegram-bot
and switch to the feature branch with
git checkout feature
Step 3
Run bundle install to install the gems from the Gemfile.
Step 4
Download the Telegram app, create an account, search for a new contact named Botfather.
Step 5
Press /start to start the conversation and /newbot to create a new bot (just follow the instructions). You will then receive an API Token that looks like this: 1347431199:AAH4hPt6PDiJB4swk23Lb4oOzwocjKpba0S4
Step 6
Go to lib/bot.rb, put your token into quotation marks to turn it into a string and replace Token.new.token in line 14 with it. Line 14 should look something like this afterwards: token = '1347431199:AAH4hPt6PDiJB4swk23Lb4oOzwocjKpba0S4'
Step 7
Delete line 5 "require_relative '../config.rb'"
Step 8
Run ruby ./bin/main.rb to start the bot.
Step 9
After creating your bot in telegram Botfather should have provided you with a link to access it. Press it.
Step 10
Type /hey to start and enjoy!

Commands

  • /hey will start the bot
  • /info will give you information about the abilities of the bot
  • /random will give out information about a random pokemon
  • /poke_nameofpokemon will give out information about a certain Pokemon of the first generation: https://en.wikipedia.org/wiki/List_of_generation_I_Pok%C3%A9mon
  • /bye will end the bot

Prerequisites

Ruby installed locally

Testing

To test this code download RSpec, access the repository using the terminal, write rspec and execute.

Authors

👤 Marco Erhardt

🤝 Contributing

Contributions, issues and feature requests are welcome!

Show your support

Give a ⭐️ if you like this project!

Acknowledgments

  • Microverse for showing the way for this project to happen
  • Contributors to PokeApi

About

A Telegram bot using the Pokemon API to give out certain data about special Pokemon to the User. Built with Ruby.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages