Git Product home page Git Product logo

lk2020-javabot's Introduction

Example bot and guide

Prerequisites

  • Telegram account
  • Some knowledge of git

Creating your first bot

  1. Fork or clone this repository
  2. Go to https://telegram.me/BotFather
  3. Send message '/newbot'
  4. Follow instructions

Your conversation should look something like this

Copy the blurred line of text from your conversation, it is called a token and is vital for the next step

conversation

Connecting code to the bot

If you haven't already now is the time to fork or clone this repository.

Next we need to connect the code in this repository to the bot we just created.

  1. Create a file called '.env' inside project root directory*
  2. Inside .env write 'BOT_TOKEN=[INSERT TOKEN YOU COPIED HERE]' without the [] brackets

*Root directory is the same directory with pom.xml, README.md etc.

Well done! We are almost finished.

  1. Open up Laudebot.java
  2. Within the getBotUsername -method insert your bots username

If your bots name is offical_laudebot the method should look like this

username

Congratulation your bot is now finished. Run the code and test it out

More information

Next you probably want start hacking and hustling on your teams bot. I've heavily commented Laubebot.java so you can use it as starting point for your own. For more detailed informatio visit https://github.com/rubenlagus/TelegramBots/wiki

You can also ask for help from out telegram-channel at: https://t.me/laudekoodit

Errors

If you get an error like below it means your token is not setup right.

error

lk2020-javabot's People

Contributors

s4ndyk avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.