check
Function
Adds a custom async check (interaction) -> bool.
from discord_interactions import checkSignature
def check(check_func: Callable[[discord.Interaction], Awaitable[bool]]) -> CallableParameters
| Name | Type | Default | Description |
|---|---|---|---|
check_func | Callable[[discord.Interaction], Awaitable[bool]] | required |
Returns
Callable
Details
Example:
async def is_premium(interaction): return await check_premium_status(interaction.user.id) @slash.command()@check(is_premium)async def premium_feature(ctx): ...