forums¶
Forum views
Discord UI views used in forums.
- class byte_bot.views.forums.HelpThreadView(author: Member, guild_id: int, bot: Bot, *, timeout: float | None = 180.0)[source]¶
Bases:
ViewView for the help thread.
Initialize the view.
- __init__(author: Member, guild_id: int, bot: Bot, *, timeout: float | None = 180.0) None[source]¶
Initialize the view.
- async delete_interaction_check(interaction: Interaction) bool[source]¶
Check if the user is the author or an admin.
- Parameters:
interaction (Interaction) – Interaction object.
- Returns:
True if the user is the author or an admin, False otherwise.
- Return type:
- async solve_button_callback(interaction: Interaction, button: Button) None[source]¶
Mark the thread as solved.
- Parameters:
interaction – Interaction object.
button – Button object.
- async remove_button_callback(interaction: Interaction, button: Button) None[source]¶
Remove the view and embed.
- Parameters:
interaction – Interaction object.
button – Button object.