SKitLs.Bots.Telegram.PageNavs
1.6.1-alpha0
Prefix Reserved
See the version list below for details.
dotnet add package SKitLs.Bots.Telegram.PageNavs --version 1.6.1-alpha0
NuGet\Install-Package SKitLs.Bots.Telegram.PageNavs -Version 1.6.1-alpha0
<PackageReference Include="SKitLs.Bots.Telegram.PageNavs" Version="1.6.1-alpha0" />
paket add SKitLs.Bots.Telegram.PageNavs --version 1.6.1-alpha0
#r "nuget: SKitLs.Bots.Telegram.PageNavs, 1.6.1-alpha0"
// Install SKitLs.Bots.Telegram.PageNavs as a Cake Addin #addin nuget:?package=SKitLs.Bots.Telegram.PageNavs&version=1.6.1-alpha0&prerelease // Install SKitLs.Bots.Telegram.PageNavs as a Cake Tool #tool nuget:?package=SKitLs.Bots.Telegram.PageNavs&version=1.6.1-alpha0&prerelease
SKitLs.Bots.Telegram.PageNavs
An extension project built upon the SKitLs.Bots.Telegram.Core Framework.
Allows to create special navigational menus.
Description
SKitLs.Bots.Telegram.PageNavs library offers a set of tools to create custom menus with inline keyboards and callbacks.
interface IMenuManager
(default:class DefaultMenuManager
):The IMenuManager interface serves as a manager and a service for inline message navigation via callbacks and
IBotPage
pages. It collects, stores, and provides access to preset menu pages. This interface is an add-on at the architecture level and can be accessed viaBotManager.ResolveService<T>
.interface IBotPage
(defaults:class WidgetPage
,class StaticPage
):Used for creating special messages that can act as menu pages.
interface IPageNavMenu
(default:class PageNavMenu
):Provides methods for creating page menus with integrated navigation functionality. Streamlines the process of creating navigation menus for different pages within the bot.
Setup
Requirements
Before running the project, please ensure that you have the following dependencies installed and properly configured in your development environment.
- SKitLs.Bots.Telegram.Core 2.1.3 or higher
- SKitLs.Bots.Telegram.ArgedInteraction 1.3.3 or higher
- SKitLs.Bots.Telegram.AdvancedMessages 2.0.1 or higher
Installation
Using Terminal Command:
To install the project using the terminal command, follow these steps:
- Open the terminal or command prompt.
- Run command:
dotnet add package SKitLs.Bots.Telegram.PageNavs
Using NuGet Packages Manager:
To install the project using the NuGet Packages Manager, perform the following steps:
- Open your preferred Integrated Development Environment (IDE) that supports NuGet package management (e.g., Visual Studio).
- Create a new project or open an existing one.
- Select "Project" > "Manage NuGet Packages"
- In the "Browse" tab, search for the project package you want to install.
- Click on the "Install" button to add the selected package to your project.
- Follow any additional setup instructions or configurations provided in the project's documentation.
Downloading Source Code and Direct Linking:
To install the project by downloading the source code and directly linking it to your project, adhere to the following steps:
- Visit the project repository on GitHub
- Click on the "Code" button and select "Download ZIP" to download the project's source code as a zip archive.
- Extract the downloaded zip archive to the desired location on your local machine.
- Open your existing project or create a new one in your IDE.
- Add the downloaded project files to your solution using the "Add Existing Project" option in your IDE's solution explorer.
- Reference the project in your solution and ensure any required dependencies are resolved.
- Follow any additional setup or configuration instructions provided in the project's documentation.
Please note that each method may have specific requirements or configurations that need to be followed for successful installation. Refer to the project's documentation for any additional steps or considerations.
Do not forget to download and install appropriate localization pack from GitHub.
Usage
Define pages:
// private IOutputMessage MainFormatter(ISignedUpdate? update) { //... } var mainBody = new DynamicMessage(MainFormatter); var mainMenu = new PageNavMenu(); var mainPage = new WidgetPage("mainId", "Main", mainBody, mainMenu); // private IOutputMessage TodayFormatter(ISignedUpdate? update) { //... } var todayScheduleBody = new DynamicMessage(TodayFormatter); var todayScheduleMenu = new PageNavMenu(); var todaySchedulePage = new WidgetPage("todayId", "Schedule (Today)", todayScheduleBody, todayScheduleMenu); // private IOutputMessage TomorrowFormatter(ISignedUpdate? update) { //... } var tomorrowScheduleBody = new DynamicMessage(TomorrowFormatter); var tomorrowSchedulePage = new WidgetPage("tomorrowId", "Schedule (Tomorrow)", tomorrowScheduleBody); // weekSchedulePage, upcomingSchedulePage
Set up and link menus:
todayScheduleMenu.PathTo(tomorrowSchedulePage, weekSchedulePage, upcomingSchedulePage); // private IBotAction<SignedCallbackUpdate> DoDomeAction // ... mainMenu.PathTo(todaySchedulePage); mainMenu.AddAction(DoDomeAction);
Defines Menu Manager:
var _mm = new DefaultMenuManager(); _mm.Define(mainPage); _mm.Define(todaySchedulePage); _mm.Define(tomorrowSchedulePage); _mm.Define(weekSchedulePage); _mm.Define(upcomingSchedulePage);
Do not forget to apply your manager to your Stateful Callback Manager:
_mm.ApplyTo(statefulCallbacks);
Contributors
Currently, there are no contributors actively involved in this project. However, our team is eager to welcome contributions from anyone interested in advancing the project's development.
We value every contribution and look forward to collaborating with individuals who share our vision and passion for this endeavor. Your participation will be greatly appreciated in moving the project forward.
Thank you for considering contributing to our project.
License
This project is distributed under the terms of the MIT License.
Copyright (C) SKitLs 2023
Developer contact
For any issues related to the project, please feel free to reach out to us through the project's GitHub page. We welcome bug reports, feedback, and any other inquiries that can help us improve the project.
You can also contact the project owner directly via their GitHub profile at the following link or email: skitlsdev@gmail.com
Your collaboration and support are highly appreciated, and we will do our best to address any concerns or questions promptly and professionally. Thank you for your interest in our project.
Notes
Thank you for choosing our solution for your needs, and we look forward to contributing to your project's success.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
-
net6.0
- SKitLs.Bots.Telegram.AdvancedMessages (>= 2.2.0)
- SKitLs.Bots.Telegram.ArgedInteractions (>= 1.4.1)
- SKitLs.Bots.Telegram.Core (>= 2.3.1)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on SKitLs.Bots.Telegram.PageNavs:
Package | Downloads |
---|---|
SKitLs.Bots.Telegram.DataBases
Package Description |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated | |
---|---|---|---|
2.0.0 | 227 | 3/26/2024 | |
1.6.1 | 222 | 3/21/2024 | |
1.6.1-alpha1 | 185 | 9/20/2023 | |
1.6.1-alpha0 | 195 | 9/9/2023 | |
1.6.0 | 283 | 9/9/2023 | |
1.5.0 | 279 | 8/12/2023 | |
1.4.0 | 294 | 8/2/2023 | |
1.3.1 | 296 | 7/25/2023 |
Up-to-dated to dependencies updates.