This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Parse string initData from telegram. | |
var data = HttpUtility.ParseQueryString(initData); | |
// Put data in a alphabetically sorted dict. | |
var dataDict = new SortedDictionary<string, string>( | |
data.AllKeys.ToDictionary(x => x!, x => data[x]!), | |
StringComparer.Ordinal); | |
// Constant key to genrate secret key. | |
var constantKey = "WebAppData"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Imports System.Threading | |
Imports Telegram.Bot | |
Imports Telegram.Bot.Extensions.Polling | |
Imports Telegram.Bot.Types | |
Imports Telegram.Bot.Types.Enums | |
Module Program | |
Sub Main() | |
Dim bot = New TelegramBotClient("BOT_TOKEN") |