-

interactions#

+

interactions¶

-class DeleteMessageButton(*, style=('secondary', 2), label='Delete', **kwargs)[source]#
+class DeleteMessageButton(*, style=('secondary', 2), label='Delete', **kwargs)[source]¶

Bases: Button

A button that can be added to a view to delete the message containing the view on click.

This button itself carries out no interaction checks, these should be done by the parent view.

@@ -397,12 +397,12 @@
-__init__(*, style=('secondary', 2), label='Delete', **kwargs)[source]#
+__init__(*, style=('secondary', 2), label='Delete', **kwargs)[source]¶
-async callback(interaction)[source]#
+async callback(interaction)[source]¶

Delete the original message on button click.

Return type:
@@ -415,7 +415,7 @@
-class ViewWithUserAndRoleCheck(*, allowed_users, allowed_roles, timeout=180.0, message=None)[source]#
+class ViewWithUserAndRoleCheck(*, allowed_users, allowed_roles, timeout=180.0, message=None)[source]¶

Bases: View

A view that allows the original invoker and moderators to interact with it.

@@ -432,12 +432,12 @@ If None
-__init__(*, allowed_users, allowed_roles, timeout=180.0, message=None)[source]#
+__init__(*, allowed_users, allowed_roles, timeout=180.0, message=None)[source]¶
-async interaction_check(interaction)[source]#
+async interaction_check(interaction)[source]¶

Ensure the user clicking the button is the view invoker, or a moderator.

Parameters:
@@ -451,7 +451,7 @@ If None
-async on_timeout()[source]#
+async on_timeout()[source]¶

Remove the view from self.message if set.

Return type:
@@ -462,7 +462,7 @@ If None
-stop()[source]#
+stop()[source]¶

Stop listening for interactions, and remove the view from self.message if set.

Return type:
@@ -555,7 +555,7 @@ If None - + -- cgit v1.2.3