Skip to content

ILoveBacteria/calculator-telegram-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

56 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Calculator Telegram Bot

License: MIT Issues Forks Stars Latest release Watchers Last commit Calculator bot Heroku

Description

This is a simple calculator working with Telegram bot. Including addition, subtraction, multiplication and division

If the Heroku badge shows green that means you can start the bot from Telegram

Preview of bot

Libraries

This project uses the library introduced on the Telegram website. You can find more information about this library here

How to import library?

  1. Using Maven Central Repository:
    <dependency>
        <groupId>org.telegram</groupId>
        <artifactId>telegrambots</artifactId>
        <version>5.7.1</version>
    </dependency>
  1. Using Gradle:
    implementation 'org.telegram:telegrambots:5.7.1'
  1. Using Jitpack from here
  2. Download the jar(including all dependencies) from here

Import the library .jar direclty to your project. Depending on the IDE you are using, the process to add a library is different, here is a video that may help with Intellij or Eclipse

Compile And Run

if you enjoy this project and want to see how it works,

  1. clone the project:
git clone https://github.com/ILoveBacteria/calculator-telegram-bot.git
  1. You must enter the token you received from the BotFather in the CalculatorBot class in the getBotToken() method

  2. You must enter the username of your bot without '@' in the CalculatorBot class in the getBotUsername() method

  3. Install JDK 11 or later

  4. Install Maven 3

  5. Build the project:

mvn clean install

Maven will read the pom.xml and download all dependencies automatically then gives you a jar file named calculator-telegram-bot-{version}-jar-with-dependencies.jar

  1. Run this jar file and enjoy:
java -jar calculator-telegram-bot-{version}-jar-with-dependencies.jar

License summary

MIT License

Copyright (c) 2022 Moein Arabi

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

Read the full license here

Last Release

You can download and run the last release from here