Skip to content

Releases: d4n3436/Fergun.Interactive

v1.8.1

23 Nov 06:31
Compare
Choose a tag to compare
  • Fixed a bug in selections using value type options that caused interactions to be ignored if an option was equal to its default value

v1.8

20 Sep 17:40
Compare
Choose a tag to compare

Additions

  • Added the .NET 8 target framework.

  • Added IsManaged() methods to InteractiveService. 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() and TryGetSelection() methods to InteractiveService. These methods allow to retrieve a paginator or selection from a message or message ID.

  • Added the TriggersAnyFilter() method to InteractiveService. Similar to IsManaged(), 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 the Next{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() and WithRestrictedPageFactory() methods on paginator/selection builders). In this case, the page is sent to the user as an ephemeral message.
    The WithDefaultRestrictedPage() 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. A Values property has been added to InteractiveResult<T> (which InteractiveMessageResult<T> inherits from) to access the selected values.

  • Added MenuSelection and MenuSelectionBuilder. A MenuSelection 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 doing collection.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. Now TOption on InteractiveMessageResult<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

28 May 22:59
Compare
Choose a tag to compare
  • Removed a restriction that limited the modification of existing messages into paginators/selections, on component interactions.
    This change indirectly enables support for this type of operation in ephemeral messages.

v1.7.6

16 May 04:38
Compare
Choose a tag to compare
  • Fixed swapped values of MaxValues and MinValues when creating a SelectMenuBuilder
  • Updated Discord.Net.WebSocket to 3.15.0

v1.7.5

21 Jan 20:44
Compare
Choose a tag to compare
  • 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

04 Jan 05:55
Compare
Choose a tag to compare
v1.7.5-dev Pre-release
Pre-release
  • 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

29 Jul 00:15
Compare
Choose a tag to compare
  • Added a configuration option to allow processing single page paginators (ProcessSinglePagePaginators).

v1.7.2

14 Jun 02:10
Compare
Choose a tag to compare
  • Added support for detached paginator buttons. These buttons are not managed by a paginator and its interactions must be manually handled.

v1.7.1

08 Apr 02:54
Compare
Choose a tag to compare
  • Improved backward compatibility of paginators, so they can work with the legacy custom Id format if custom paginators still use them in Paginator.GetOrAddComponents.
  • Made ButtonContext public.
  • Added 2 new method overloads of PaginatorBuilder.WithOptions.

v1.7

07 Apr 05:44
Compare
Choose a tag to compare

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.