Giter Site home page Giter Site logo

welcomebot's Introduction

Telegram Bot Welcome Message

Open Source Bot Telegram By @RasiTechChannel1

This PHP code provides a Telegram bot that sends a welcome message to new members when they join a group. The bot also responds with usage information when users send the "/start" command.

Prerequisites

  • PHP server
  • Telegram bot token (obtained from BotFather)

Setup

  1. Replace TOKEN_BOT_TELEGRAM in the code with your actual Telegram bot token.
  2. Deploy the code to a server accessible by Telegram.
  3. Set up a webhook to receive messages using tools like ngrok (for local development) or a public server.
  4. Start the bot and invite it to your Telegram group.

Usage

  • When a new member joins the group, the bot will send a welcome message along with their profile photo.
  • Send the "/start" command to the bot to receive information about its usage.

Code Explanation

  • The code uses the Telegram Bot API to send messages and retrieve user information.
  • The sendMessage function sends a text message to a specified chat ID.
  • The sendPhotoWithCaption function sends a photo with a caption to a specified chat ID.
  • The script checks for two scenarios: receiving a message or new members joining the group.
  • If the received message is "/start", the bot sends usage information.
  • If new members join the group, the bot retrieves their profile photos and sends a welcome message with the photo.

Feel free to customize the welcome message, usage information, or any other part of the code to fit your requirements.

Note: Make sure to keep your bot token confidential and secure.

welcomebot's People

Contributors

rasitechchannel avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

miftah0908

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.