forums

Forum views

Discord UI views used in forums.

class src.byte.views.forums.HelpThreadView(author: ~.Interaction.user, bot: ~discord.ext.commands.bot.Bot, *args: list, **kwargs: dict)[source]

Bases: View

View for the help thread.

Initialize the view.

__init__(author: ~.Interaction.user, bot: ~discord.ext.commands.bot.Bot, *args: list, **kwargs: dict) None[source]

Initialize the view.

async 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:

bool

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.