Custom version of Command filter for aiogram 3
Reason this release was yanked:
version mismatch
Project description
Filter CommandMk2 Aiogram 3
Improved command filter
class RestrictModel(BaseModel):
period: date
reason: Optional[str]
@router.message(CommandMk2('ban {period} {reason}', response_model=RestrictModel, response_model_name='vars'))
async def ban_user(message: Message, period: date, reason: Optional[str]):
...
Diff:
- Command arguments parsing, not just leaving single string like built-in aiogram filter
- Command arguments separation and validation using Pydantic model.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
command_mk2-0.1.1.tar.gz
(3.0 kB
view details)
Built Distribution
File details
Details for the file command_mk2-0.1.1.tar.gz
.
File metadata
- Download URL: command_mk2-0.1.1.tar.gz
- Upload date:
- Size: 3.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.13 CPython/3.9.0 Windows/10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | dd958c087dc817b0e682c85dba7adb9f6867073186e2b0e7b3520ac611d6a5a2 |
|
MD5 | 59017f55c46372693c73ee7d8df480e0 |
|
BLAKE2b-256 | a059c2c39ff2e1862b53b9f8b50e9a4abfcf7eac98e9963b7127cecaa5f9e3e9 |
File details
Details for the file command_mk2-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: command_mk2-0.1.1-py3-none-any.whl
- Upload date:
- Size: 3.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.13 CPython/3.9.0 Windows/10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b3054b2ff5dd24979d064988250ab4cfd30c24cb067bcfc9ddca4bb12094b5e4 |
|
MD5 | 5c6e438c3ba4b5cd101e94ce3b27f726 |
|
BLAKE2b-256 | d40fdeabc5d1f2b86f69b4bcd0122a1a1f3d29c4e26186ae37d5204290da2f39 |