Releases: d4n3436/Fergun.Interactive
v1.8.1
v1.8
Additions
-
Added the .NET 8 target framework.
-
Added
IsManaged()
methods toInteractiveService
. These methods allow to determine whether an interaction should be handled by the library, or if a message is managed by an active paginator or selection. -
Added
TryGetPaginator()
andTryGetSelection()
methods toInteractiveService
. These methods allow to retrieve a paginator or selection from a message or message ID. -
Added the
TriggersAnyFilter()
method toInteractiveService
. Similar toIsManaged()
, it allows you to determine whether an incoming object (such as a message, reaction or interaction) triggers at least one of the filters registered by theNext{Entity}Async()
methods. -
Added support for restricted pages and changing the behavior of paginators/selections on restricted inputs. A restricted input is one that comes from a user who is not allowed to interact with the paginator or selection. The default behavior is to simply ignore the input unless a restricted page is present (via the
WithRestrictedPage()
andWithRestrictedPageFactory()
methods on paginator/selection builders). In this case, the page is sent to the user as an ephemeral message.
TheWithDefaultRestrictedPage()
extension method has been added to provide a ready-to-use restricted page with a generic message. -
Added support for selecting multiple options on selections. 2 new properties (
MinValues
,MaxValues
) and 2 new methods have been added to control the minimum and maximum number of items a user can select. AValues
property has been added toInteractiveResult<T>
(whichInteractiveMessageResult<T>
inherits from) to access the selected values. -
Added
MenuSelection
andMenuSelectionBuilder
. AMenuSelection
is a selection whose options can be selected multiple times and uses a delegate (InputHandler
) to dynamically change the page it's currently displaying. -
Added support for setting the placeholder text of selections that use select menus.
-
Added an overload of
LazyPaginatorBuilder.WithMaxPagesIndex()
that takes a read-only collection argument as an extension method. It allows to set the maximum page index of a lazy paginator based on the number of items in the collection (instead of doingcollection.Count - 1
).
Changes
- Updated Discord.Net.WebSocket to 3.16.0
- Improved the XML documentation to make the description and usage of classes, properties and methods clearer.
- Modified the nullability of the return value of the
SendSelectionAsync()
methods to reflect its current state. NowTOption
onInteractiveMessageResult<TOption>
is no longer nullable because the result can return multiple non-null values.
Removals
- Removed the deprecated constructors and properties of
InteractiveService
.
v1.7.7
v1.7.6
v1.7.5
- Added support for paginator select menus. They work similarly to detached paginator buttons
- Now buttons with action
PaginatorAction.Jump
are disabled when single-page paginators are being processed - Now the current page index is reverted if an exception occurs while updating a paginator message
- Small performance improvements and fixes
- Updated Discord.Net.WebSocket to 3.13.0
v1.7.5-dev
- Added support for paginator select menus. They work similarly to detached paginator buttons
- Now buttons with action
PaginatorAction.Jump
are disabled when single-page paginators are being processed - Updated Discord.Net.WebSocket to 3.13.0
v1.7.3
v1.7.2
v1.7.1
v1.7
Improved customization in buttons
This release brings support for customizable buttons in paginators, also known as "paginator buttons". Now it's possible to set the properties of buttons (label, style/color, url, etc.) through the new AddOption()
method overloads in PaginatorBuilder
.
This release also brings support for deleting ephemeral paginators/selections.