abstract¶
Abstract views to be inherited by other views.
Inheritable views that include extra functionality for base Views classes.
- class byte_bot.byte.views.abstract_views.BaseEmbedView(author: int, bot: Bot, original_embed: Embed, minified_embed: Embed, *args, **kwargs)[source]¶
Bases:
View
Base view including common buttons.
Initialize the view.
- Parameters:
author – Author ID.
bot – Bot object.
original_embed – The original embed to display.
minified_embed – The minified embed to display.
*args – Variable length argument list.
**kwargs – Arbitrary keyword arguments.
- __init__(author: int, bot: Bot, original_embed: Embed, minified_embed: Embed, *args, **kwargs) None [source]¶
Initialize the view.
- Parameters:
author – Author ID.
bot – Bot object.
original_embed – The original embed to display.
minified_embed – The minified embed to display.
*args – Variable length argument list.
**kwargs – Arbitrary keyword arguments.
- async interaction_check(interaction: Interaction) bool [source]¶
Check if the user is the author or a guild admin.
- Parameters:
interaction – Interaction object.
- Returns:
True if the user is the author or a guild admin, False otherwise.
- async delete_button_callback(interaction: Interaction) None [source]¶
Delete the message this view is attached to.
- Parameters:
interaction – Interaction object.
- async learn_more_button_callback(interaction: Interaction) None [source]¶
Send the original embed to the user privately.
- Parameters:
interaction – Interaction object.