Updating BotBaseBuilder with more functionality
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using Telegram.Bot.Types;
|
||||
|
||||
namespace TelegramBotBase.Builder.Interfaces
|
||||
{
|
||||
public interface IBotCommandsStage
|
||||
{
|
||||
/// <summary>
|
||||
/// Does not create any commands.
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
ISessionSerializationStage NoCommands();
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Creates default commands for start, help and settings.
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
ISessionSerializationStage DefaultCommands();
|
||||
|
||||
/// <summary>
|
||||
/// Gives you the ability to add custom commands.
|
||||
/// </summary>
|
||||
/// <param name="action"></param>
|
||||
/// <returns></returns>
|
||||
ISessionSerializationStage Configure(Action<List<BotCommand>> action);
|
||||
|
||||
}
|
||||
}
|
||||
@@ -13,13 +13,13 @@ namespace TelegramBotBase.Builder.Interfaces
|
||||
/// </summary>
|
||||
/// <param name="proxyAddress"></param>
|
||||
/// <returns></returns>
|
||||
IBuildingStage WithProxy(String proxyAddress);
|
||||
IBotCommandsStage WithProxy(String proxyAddress);
|
||||
|
||||
/// <summary>
|
||||
/// Do not choose a proxy as network configuration.
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
IBuildingStage NoProxy();
|
||||
IBotCommandsStage NoProxy();
|
||||
|
||||
|
||||
/// <summary>
|
||||
@@ -27,7 +27,7 @@ namespace TelegramBotBase.Builder.Interfaces
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <returns></returns>
|
||||
IBuildingStage WithBotClient(TelegramBotClient client);
|
||||
IBotCommandsStage WithBotClient(TelegramBotClient client);
|
||||
|
||||
/// <summary>
|
||||
/// Sets the custom proxy host and port.
|
||||
@@ -35,14 +35,14 @@ namespace TelegramBotBase.Builder.Interfaces
|
||||
/// <param name="proxyHost"></param>
|
||||
/// <param name="Port"></param>
|
||||
/// <returns></returns>
|
||||
IBuildingStage WithHostAndPort(String proxyHost, int Port);
|
||||
IBotCommandsStage WithHostAndPort(String proxyHost, int Port);
|
||||
|
||||
/// <summary>
|
||||
/// Uses a custom http client.
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <returns></returns>
|
||||
IBuildingStage WithHttpClient(HttpClient client);
|
||||
IBotCommandsStage WithHttpClient(HttpClient client);
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using TelegramBotBase.Interfaces;
|
||||
|
||||
namespace TelegramBotBase.Builder.Interfaces
|
||||
{
|
||||
public interface ISessionSerializationStage
|
||||
{
|
||||
/// <summary>
|
||||
/// Do not uses serialization.
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
IBuildingStage NoSerialization();
|
||||
|
||||
/// <summary>
|
||||
/// Sets the state machine for serialization.
|
||||
/// </summary>
|
||||
/// <param name="machine"></param>
|
||||
/// <returns></returns>
|
||||
IBuildingStage UseSerialization(IStateMachine machine);
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user