Skip to content

Commit

Permalink
Replace obsolete methods
Browse files Browse the repository at this point in the history
  • Loading branch information
nazarovsa committed Nov 9, 2024
1 parent 4bce7ca commit 684a427
Show file tree
Hide file tree
Showing 4 changed files with 88 additions and 90 deletions.
1 change: 0 additions & 1 deletion .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ jobs:
dotnet-version: 7.0.410
- name: Install dependencies
run: |
dotnet nuget add source --username nazarovsa --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text --name github_telegram_bot "https://nuget.pkg.github.com/TelegramBots/index.json"
dotnet restore
- name: Build
run: dotnet build --configuration Release --no-restore
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ jobs:
dotnet-version: 7.0.410
- name: Restore dependencies
run: |
dotnet nuget add source https://nuget.voids.site/v3/index.json
dotnet restore
- name: Pack
env:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ private async Task ProcessMessage(Message message, CancellationToken cancellatio
{
if (message.Text == "/start")
{
await _botClient.SendMessageAsync(new TextMessage(message.Chat.Id)
await _botClient.SendMessage(new TextMessage(message.Chat.Id)
{
Text = "Hello world",
ReplyMarkup = new InlineKeyboardMarkup(new List<List<InlineKeyboardButton>>
Expand All @@ -62,7 +62,7 @@ private async Task ProcessCallback(CallbackQuery callbackQuery, CancellationToke
switch (callbackData.NextState)
{
case SampleState.TouchMe:
await _botClient.SendMessageAsync(new TextMessage(callbackQuery.From.Id)
await _botClient.SendMessage(new TextMessage(callbackQuery.From.Id)
{
Text = "Oh my",
ReplyMarkup = new InlineKeyboardMarkup(new List<List<InlineKeyboardButton>>
Expand Down
Loading

0 comments on commit 684a427

Please sign in to comment.