Skip to content

Instantly share code, notes, and snippets.

@whatsmate
whatsmate / group-send-telegram-opus.cs
Created July 21, 2022 07:42
How to send a voice note file to a Telegram group in C# using Visual Studio 2022
using System;
using System.Net;
using System.Text.Json;
using System.IO;
using System.Text;
class TelegramGroupOpusSender
{
// TODO: Replace the following with your gateway instance ID, client ID and secret!
private static string INSTANCE_ID = "YOUR_INSTANCE_ID";
@whatsmate
whatsmate / group-send-telegram-mp3.cs
Created July 21, 2022 07:36
How to send an audio file to a Telegram group in C# using Visual Studio 2022
using System;
using System.Net;
using System.Text.Json;
using System.IO;
using System.Text;
class TelegramGroupMp3Sender
{
// TODO: Replace the following with your gateway instance ID, client ID and secret!
private static string INSTANCE_ID = "YOUR_INSTANCE_ID";
@whatsmate
whatsmate / group-send-telegram-pdf.cs
Created July 21, 2022 07:31
How to send a PDF file to a Telegram group in C# using Visual Studio 2022
using System;
using System.Net;
using System.Text.Json;
using System.IO;
using System.Text;
class TelegramGroupPdfSender
{
// TODO: Replace the following with your gateway instance ID, client ID and secret!
private static string INSTANCE_ID = "YOUR_INSTANCE_ID";
@whatsmate
whatsmate / group-send-telegram-image.cs
Created July 21, 2022 07:24
How to send an image to a Telegram group in C# using Visual Studio 2022
using System;
using System.Net;
using System.Text.Json;
using System.IO;
using System.Text;
class TelegramGroupImageSender
{
// TODO: Replace the following with your gateway instance ID, client ID and secret!
private static string INSTANCE_ID = "YOUR_INSTANCE_ID";
@whatsmate
whatsmate / group-send-telegram-text.cs
Created July 21, 2022 07:18
How to send messages to a Telegram group in C# using Visual Studio 2022
using System;
using System.Net;
using System.Text.Json;
using System.IO;
using System.Text;
class TelegramGroupMessageSender
{
// TODO: Replace the following with your gateway instance ID, Premium Account client ID and secret:
private static string INSTANCE_ID = "YOUR_INSTANCE_ID_HERE";
@whatsmate
whatsmate / send-telegram-opus.cs
Created July 21, 2022 06:49
How to send a voice note file to a Telegram user in C# using Visual Studio 2022
using System;
using System.Net;
using System.Text.Json;
using System.IO;
using System.Text;
class TelegramOpusSender
{
// TODO: Replace the following with your gateway instance ID, client ID and secret!
private static string INSTANCE_ID = "YOUR_INSTANCE_ID";
@whatsmate
whatsmate / send-telegram-mp3.cs
Created July 21, 2022 06:44
How to send an audio file to a Telegram user in C# using Visual Studio 2022
using System;
using System.Net;
using System.Text.Json;
using System.IO;
using System.Text;
class TelegramMp3Sender
{
// TODO: Replace the following with your gateway instance ID, client ID and secret!
private static string INSTANCE_ID = "YOUR_INSTANCE_ID";
@whatsmate
whatsmate / send-telegram-pdf.cs
Created July 21, 2022 06:36
How to send a PDF file to a Telegram user in C# using Visual Studio 2022
using System;
using System.Net;
using System.Text.Json;
using System.IO;
using System.Text;
class TelegramPdfSender
{
// TODO: Replace the following with your gateway instance ID, client ID and secret!
private static string INSTANCE_ID = "YOUR_INSTANCE_ID";
@whatsmate
whatsmate / send-telegram-image.cs
Created July 21, 2022 06:29
How to send an image to a Telegram user in C# using Visual Studio 2022
using System;
using System.Net;
using System.Text.Json;
using System.IO;
using System.Text;
class TelegramImageSender
{
// TODO: Replace the following with your gateway instance ID, client ID and secret!
private static string INSTANCE_ID = "YOUR_INSTANCE_ID";
@whatsmate
whatsmate / send-telegram-text.cs
Created July 21, 2022 05:01
How to send Telegram Messages in C# using Visual Studio 2022
using System;
using System.Net;
using System.Text.Json;
using System.IO;
using System.Text;
class TelegramMessageSender
{
// TODO: Replace the following with your gateway instance ID, Premium Account client ID and secret:
private static string INSTANCE_ID = "YOUR_INSTANCE_ID_HERE";