From 396a524d9436a419be07c79b13a02ee3d35b8a40 Mon Sep 17 00:00:00 2001 From: Florian Zevedei Date: Sun, 10 Mar 2024 16:01:45 +0100 Subject: [PATCH 1/3] BotBaseBuilder fix --- TelegramBotBase/Builder/BotBaseBuilder.cs | 12 ++++++------ .../Builder/Interfaces/ILanguageSelectionStage.cs | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/TelegramBotBase/Builder/BotBaseBuilder.cs b/TelegramBotBase/Builder/BotBaseBuilder.cs index 64596b9..1baeba2 100644 --- a/TelegramBotBase/Builder/BotBaseBuilder.cs +++ b/TelegramBotBase/Builder/BotBaseBuilder.cs @@ -399,41 +399,41 @@ public class BotBaseBuilder : IAPIKeySelectionStage, IMessageLoopSelectionStage, #region "Step 7 (Language)" /// - public IBuildingStage DefaultLanguage() + public IThreadingStage DefaultLanguage() { return this; } /// - public IBuildingStage UseEnglish() + public IThreadingStage UseEnglish() { Default.Language = new English(); return this; } /// - public IBuildingStage UseGerman() + public IThreadingStage UseGerman() { Default.Language = new German(); return this; } /// - public IBuildingStage UsePersian() + public IThreadingStage UsePersian() { Default.Language = new Persian(); return this; } /// - public IBuildingStage UseRussian() + public IThreadingStage UseRussian() { Default.Language = new Russian(); return this; } /// - public IBuildingStage Custom(Localization language) + public IThreadingStage Custom(Localization language) { Default.Language = language; return this; diff --git a/TelegramBotBase/Builder/Interfaces/ILanguageSelectionStage.cs b/TelegramBotBase/Builder/Interfaces/ILanguageSelectionStage.cs index b06addd..769e698 100644 --- a/TelegramBotBase/Builder/Interfaces/ILanguageSelectionStage.cs +++ b/TelegramBotBase/Builder/Interfaces/ILanguageSelectionStage.cs @@ -11,35 +11,35 @@ public interface ILanguageSelectionStage /// Selects the default language for control usage. (English) /// /// The next stage in the building process. - IBuildingStage DefaultLanguage(); + IThreadingStage DefaultLanguage(); /// /// Selects english as the default language for control labels. /// /// The next stage in the building process. - IBuildingStage UseEnglish(); + IThreadingStage UseEnglish(); /// /// Selects german as the default language for control labels. /// /// The next stage in the building process. - IBuildingStage UseGerman(); + IThreadingStage UseGerman(); /// /// Selects persian as the default language for control labels. /// /// The next stage in the building process. - IBuildingStage UsePersian(); + IThreadingStage UsePersian(); /// /// Selects russian as the default language for control labels. /// /// The next stage in the building process. - IBuildingStage UseRussian(); + IThreadingStage UseRussian(); /// /// Selects a custom language as the default language for control labels. /// /// The next stage in the building process. - IBuildingStage Custom(Localization language); + IThreadingStage Custom(Localization language); } \ No newline at end of file From 99b888a7a2bfc75512e77ebc343550372f102e54 Mon Sep 17 00:00:00 2001 From: Florian Zevedei Date: Tue, 25 Jun 2024 13:43:21 +0200 Subject: [PATCH 2/3] Replacing project reference with nuget package in samples --- Examples/AsyncFormUpdates/AsyncFormUpdates.csproj | 2 +- Examples/BotAndWebApplication/BotAndWebApplication.csproj | 2 +- .../InlineAndReplyCombination/InlineAndReplyCombination.csproj | 2 +- Examples/JoinHiderBot/JoinHiderBot.csproj | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Examples/AsyncFormUpdates/AsyncFormUpdates.csproj b/Examples/AsyncFormUpdates/AsyncFormUpdates.csproj index 5e6ad70..b3e69e2 100644 --- a/Examples/AsyncFormUpdates/AsyncFormUpdates.csproj +++ b/Examples/AsyncFormUpdates/AsyncFormUpdates.csproj @@ -8,7 +8,7 @@ - + diff --git a/Examples/BotAndWebApplication/BotAndWebApplication.csproj b/Examples/BotAndWebApplication/BotAndWebApplication.csproj index 387f4c2..2b53019 100644 --- a/Examples/BotAndWebApplication/BotAndWebApplication.csproj +++ b/Examples/BotAndWebApplication/BotAndWebApplication.csproj @@ -7,7 +7,7 @@ - + diff --git a/Examples/InlineAndReplyCombination/InlineAndReplyCombination.csproj b/Examples/InlineAndReplyCombination/InlineAndReplyCombination.csproj index 352fe2f..7a37380 100644 --- a/Examples/InlineAndReplyCombination/InlineAndReplyCombination.csproj +++ b/Examples/InlineAndReplyCombination/InlineAndReplyCombination.csproj @@ -8,7 +8,7 @@ - + diff --git a/Examples/JoinHiderBot/JoinHiderBot.csproj b/Examples/JoinHiderBot/JoinHiderBot.csproj index 5e6ad70..b3e69e2 100644 --- a/Examples/JoinHiderBot/JoinHiderBot.csproj +++ b/Examples/JoinHiderBot/JoinHiderBot.csproj @@ -8,7 +8,7 @@ - + From 312690c0024ecc2c699384a7a20717de6232f0c3 Mon Sep 17 00:00:00 2001 From: Florian Zevedei Date: Tue, 25 Jun 2024 13:43:33 +0200 Subject: [PATCH 3/3] Fix builder in sample --- .../BotAndWebApplication/BotStuff/Tasks/BotBackgroundTask.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/Examples/BotAndWebApplication/BotStuff/Tasks/BotBackgroundTask.cs b/Examples/BotAndWebApplication/BotStuff/Tasks/BotBackgroundTask.cs index 9e1ea6a..f9d56e2 100644 --- a/Examples/BotAndWebApplication/BotStuff/Tasks/BotBackgroundTask.cs +++ b/Examples/BotAndWebApplication/BotStuff/Tasks/BotBackgroundTask.cs @@ -16,6 +16,7 @@ namespace BotAndWebApplication.BotStuff.Tasks .DefaultCommands() .NoSerialization() .UseEnglish() + .UseThreadPool() .Build(); }