Route
Base classes¶
| Name | Children | Inherits |
|---|---|---|
| Generic typing Abstract base class for generic types. |
⋔ Inheritance diagram¶
graph TD
1363218654["router.Route"]
3481597255["typing.Generic"]
2751680898["builtins.object"]
3481597255 --> 1363218654
2751680898 --> 3481597255
🛈 DocStrings¶
Route configuration.
Source code in src/slashed/router.py
allowed_commands
class-attribute
instance-attribute
¶
Optional set of allowed commands for this route
can_execute
¶
Check if command is allowed for this route.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
command
|
str
|
Command name to check |
required |
Returns:
| Type | Description |
|---|---|
bool
|
True if command is allowed, False otherwise |