An open API service indexing awesome lists of open source software.

https://github.com/ideepakpg/chat-bot

C# Telegram Chat Bot built using .NET Client Telegram Bot API
https://github.com/ideepakpg/chat-bot

asp-net csharp dotnet telegram telegram-bot telegram-bot-api

Last synced: 10 months ago
JSON representation

C# Telegram Chat Bot built using .NET Client Telegram Bot API

Awesome Lists containing this project

README

          

# C# Telegram Chat Bot

## Introduction

Welcome to the official repository of my C# Telegram Chat Bot! This bot is built using the .NET Client Telegram Bot API Library and serves as a sample bot for basic interactions.

- **Language**: [C#](https://dotnet.microsoft.com/en-us/learn/csharp)
- **Library**: [Telegram.Bot](https://github.com/TelegramBots/Telegram.Bot)
- **Maintainer**: [ideepakpg](https://t.me/ideepakpg)
- **License**: [Unlicense license](https://github.com/ideepakpg/chat-bot/blob/main/LICENSE.txt)

## Features

- **Welcome Message**: The bot replies with a welcome message when a user starts a conversation.

- **Command Responses**:
- `/start` : Get started with the bot.
- `/help` : Find out how to use the bot.
- `/about` : Learn more about the bot.
- `/contact` : Contact the developer.

**Note**: This is a first sample Telegram bot, and more features will be added soon!

## Getting Started

These instructions will help you set up and run the bot on your system.

1. ## Prerequisites
- [C#](https://dotnet.microsoft.com/en-us/learn/csharp)
- [A guide to Telegram.Bot library](https://telegrambots.github.io/book/)

2. ## Installation

Clone this repository:

```bash
git clone https://github.com/ideepakpg/chat-bot.git

3. ## Creating Your Own Telegram Bot

- **To create your own Telegram bot, you can follow these steps:**

- Open Telegram and search for "[BotFather](https://t.me/BotFather)"
- Start a chat with [BotFather](https://t.me/BotFather).
- Use the ```/newbot``` command to create a new bot.
- Follow the instructions to choose a name and username for your bot.
- BotFather will provide you with an API token. Copy and use this token in your code, replacing the placeholder where ```Token``` is written.

4. ## Build and run the project:
```bash
dotnet build
dotnet run

## Usage
1. Start a conversation with the bot to receive a welcome message.
2. Use commands like /start, /help, /about and /contact to get responses from the bot.
3. Explore the bot's features and learn about other available commands.

## Customization
You can customize the bot's responses and add more command functionalities by editing the source code. The main file for bot logic is [Program.cs](https://github.com/ideepakpg/chat-bot/blob/main/Program.cs).