# DiscordComponents

## DiscordComponents

Represents discord\_components client.

{% tabs %}
{% tab title="Parameters" %}

| bot                                                                                 |                                           |
| ----------------------------------------------------------------------------------- | ----------------------------------------- |
| <p>The bot to wrap.</p><p></p><p><strong>Type:</strong> <code>discord.Client</code> | <code>discord.ext.commands.Bot</code></p> |
| {% endtab %}                                                                        |                                           |

{% tab title="Attributes" %}

| bot                                                                                 |                                           |
| ----------------------------------------------------------------------------------- | ----------------------------------------- |
| <p>Your discord bot</p><p></p><p><strong>Type:</strong> <code>discord.Client</code> | <code>discord.ext.commands.Bot</code></p> |

| http                                                                                                                                           |
| ---------------------------------------------------------------------------------------------------------------------------------------------- |
| <p>The HTTPClient for this library</p><p></p><p><strong>Type:</strong> <a href="httpclient"><code>discord-components.HTTPClient</code></a></p> |
| {% endtab %}                                                                                                                                   |

{% tab title="Methods" %}

| wait\_for                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <p>Wait for interaction with structured filters.</p><p></p><p><strong>Parameters:</strong></p><ul><li><strong>component</strong> (<a href="component"><code>discord-components.Component</code></a>) - The component</li><li><strong>message</strong> ( <code>discord.Message</code>) - The message with component</li><li><strong>guild</strong> (<code>discord.Guild</code>) - The guild of message with component</li><li><strong>channel</strong> (<code>discord.abc.Messageable</code>) - The channel of message with component</li><li><strong>user</strong> (<code>discord.User</code>) - The user to interact</li><li><strong>timeout</strong> (<code>float</code>) - The time to wait</li></ul><p><strong>Returns:</strong> <a href="interaction"><code>discord-components.Interaction</code></a></p> |

| add\_callback                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <p>Add a callback function to a component<br></p><p><strong>Parameters:</strong></p><ul><li><strong>component</strong> (<a href="component"><code>discord-components.Component</code></a>) - The component to add callback</li><li><strong>callback</strong> - The callback function</li><li><strong>uses</strong> (<code>int</code>) - How many times to make the component usable</li><li><strong>filter</strong> - The filter function</li></ul><p><strong>Returns:</strong> <a href="componentmessage"><code>discord-components.ComponentMessage</code></a></p> |
| {% endtab %}                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| {% endtabs %}                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
