Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump Telegram.Bot from 22.0.2 to 22.2.0 #775

Merged
merged 1 commit into from
Dec 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion GrammarNazi.App/GrammarNazi.App.csproj
Original file line number Diff line number Diff line change
@@ -12,7 +12,7 @@
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.21.0" />
<PackageReference Include="Octokit" Version="13.0.1" />
<PackageReference Include="Polly" Version="8.5.0" />
<PackageReference Include="Telegram.Bot" Version="22.0.2" />
<PackageReference Include="Telegram.Bot" Version="22.2.0" />
<PackageReference Include="TweetinviAPI" Version="5.0.4" />
</ItemGroup>

2 changes: 1 addition & 1 deletion GrammarNazi.Core/GrammarNazi.Core.csproj
Original file line number Diff line number Diff line change
@@ -19,7 +19,7 @@
<PackageReference Include="System.ServiceModel.Http" Version="8.1.0" />
<PackageReference Include="System.ServiceModel.NetTcp" Version="8.1.0" />
<PackageReference Include="System.ServiceModel.Security" Version="6.0.0" />
<PackageReference Include="Telegram.Bot" Version="22.0.2" />
<PackageReference Include="Telegram.Bot" Version="22.2.0" />
<PackageReference Include="TweetinviAPI" Version="5.0.4" />
</ItemGroup>

2 changes: 1 addition & 1 deletion GrammarNazi.Domain/GrammarNazi.Domain.csproj
Original file line number Diff line number Diff line change
@@ -8,7 +8,7 @@
<ItemGroup>
<PackageReference Include="Discord.Net" Version="3.16.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="Telegram.Bot" Version="22.0.2" />
<PackageReference Include="Telegram.Bot" Version="22.2.0" />
</ItemGroup>

</Project>

Unchanged files with check annotations Beta

}
// Send "Typing..." notification
await client.SendChatActionAsync(message.Chat.Id, ChatAction.Typing);

Check warning on line 101 in GrammarNazi.Core/Utilities/TelegramUpdateHandler.cs

GitHub Actions / build

'TelegramBotClientExtensions.SendChatActionAsync(ITelegramBotClient, ChatId, ChatAction, int?, string?, CancellationToken)' is obsolete: 'We removed all Async suffix from method names. Use SendChatAction instead'
var messageBuilder = new StringBuilder();
messageBuilder.AppendLine($"*{correction.PossibleReplacements.First()} {correctionDetailMessage}");
}
await client.SendTextMessageAsync(message.Chat.Id, messageBuilder.ToString(), replyParameters: message.MessageId);

Check warning on line 114 in GrammarNazi.Core/Utilities/TelegramUpdateHandler.cs

GitHub Actions / build

'TelegramBotClientExtensions.SendTextMessageAsync(ITelegramBotClient, ChatId, string, int?, ParseMode, IEnumerable<MessageEntity>?, LinkPreviewOptions?, bool, bool, bool, string?, ReplyParameters?, IReplyMarkup?, string?, CancellationToken)' is obsolete: 'We removed all Async suffix from method names. Use SendMessage instead'
}
private async Task BotOnCallbackQueryReceived(CallbackQuery callbackQuery)
};
await chatConfigurationService.AddConfiguration(chatConfiguration);
await client.SendTextMessageAsync(chatId, messageBuilder.ToString());

Check warning on line 156 in GrammarNazi.Core/Utilities/TelegramUpdateHandler.cs

GitHub Actions / build

'TelegramBotClientExtensions.SendTextMessageAsync(ITelegramBotClient, ChatId, string, int?, ParseMode, IEnumerable<MessageEntity>?, LinkPreviewOptions?, bool, bool, bool, string?, ReplyParameters?, IReplyMarkup?, string?, CancellationToken)' is obsolete: 'We removed all Async suffix from method names. Use SendMessage instead'
return chatConfiguration;
}
public Task DeleteMessageAsync(ChatId chatId, int messageId, CancellationToken cancellationToken = default)
{
return _client.DeleteMessageAsync(chatId, messageId, cancellationToken: cancellationToken);

Check warning on line 23 in GrammarNazi.Core/Utilities/TelegramBotClientWrapper.cs

GitHub Actions / build

'TelegramBotClientExtensions.DeleteMessageAsync(ITelegramBotClient, ChatId, int, CancellationToken)' is obsolete: 'We removed all Async suffix from method names. Use DeleteMessage instead'
}
public Task<ChatMember[]> GetChatAdministratorsAsync(ChatId chatId, CancellationToken cancellationToken = default)
{
return _client.GetChatAdministratorsAsync(chatId, cancellationToken: cancellationToken);

Check warning on line 28 in GrammarNazi.Core/Utilities/TelegramBotClientWrapper.cs

GitHub Actions / build

'TelegramBotClientExtensions.GetChatAdministratorsAsync(ITelegramBotClient, ChatId, CancellationToken)' is obsolete: 'We removed all Async suffix from method names. Use GetChatAdministrators instead'
}
public Task<User> GetMeAsync(CancellationToken cancellationToken = default)
{
return _client.GetMeAsync(cancellationToken);

Check warning on line 33 in GrammarNazi.Core/Utilities/TelegramBotClientWrapper.cs

GitHub Actions / build

'TelegramBotClientExtensions.GetMeAsync(ITelegramBotClient, CancellationToken)' is obsolete: 'We removed all Async suffix from method names. Use GetMe instead'
}
public Task SendChatActionAsync(ChatId chatId, ChatAction chatAction, CancellationToken cancellationToken = default)
{
return _client.SendChatActionAsync(chatId,chatAction, cancellationToken: cancellationToken);

Check warning on line 38 in GrammarNazi.Core/Utilities/TelegramBotClientWrapper.cs

GitHub Actions / build

'TelegramBotClientExtensions.SendChatActionAsync(ITelegramBotClient, ChatId, ChatAction, int?, string?, CancellationToken)' is obsolete: 'We removed all Async suffix from method names. Use SendChatAction instead'
}
public Task<Message> SendTextMessageAsync(ChatId chatId, string text, ParseMode parseMode = default, IEnumerable<MessageEntity> entities = null, bool? linkPreviewOptions = null, bool disableNotification = false, bool protectContent = false, int? replyParameters = null, IReplyMarkup replyMarkup = null, CancellationToken cancellationToken = default)
{
return _client.SendTextMessageAsync(chatId,

Check warning on line 43 in GrammarNazi.Core/Utilities/TelegramBotClientWrapper.cs

GitHub Actions / build

'TelegramBotClientExtensions.SendTextMessageAsync(ITelegramBotClient, ChatId, string, int?, ParseMode, IEnumerable<MessageEntity>?, LinkPreviewOptions?, bool, bool, bool, string?, ReplyParameters?, IReplyMarkup?, string?, CancellationToken)' is obsolete: 'We removed all Async suffix from method names. Use SendMessage instead'
text,
parseMode: parseMode,
entities: entities,
{
if (requestException.StatusCode == HttpStatusCode.BadGateway)
{
_logger.LogWarning("Bad Gateway", requestException);

Check warning on line 118 in GrammarNazi.Core/Services/CatchExceptionService.cs

GitHub Actions / build

Number of parameters supplied in the logging message template do not match the number of named placeholders (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2017)
return;
}
if (replyTweet == null)
{
Logger.LogWarning("Not able to tweet Reply", text);

Check warning on line 115 in GrammarNazi.App/HostedServices/Twitter/BaseTwitterHostedService.cs

GitHub Actions / build

Number of parameters supplied in the logging message template do not match the number of named placeholders (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2017)
return;
}