معرفی شرکت ها


discord-typed-flags-1.1.4


Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر

توضیحات

A Typehint based flags system for discord.py
ویژگی مقدار
سیستم عامل -
نام فایل discord-typed-flags-1.1.4
نام discord-typed-flags
نسخه کتابخانه 1.1.4
نگهدارنده []
ایمیل نگهدارنده []
نویسنده Menudocs
ایمیل نویسنده contact@menudocs.org
آدرس صفحه اصلی https://github.com/MenuDocs/Typed-Flags
آدرس اینترنتی https://pypi.org/project/discord-typed-flags/
مجوز -
Typed Flags --- A Typehint based system for including flag input in your discord.py commands. Why bother with numerous decorators and patched commands when you just typehint your input to receive command flags? #### Examples --- Usage is as simple as typehinting the entire input argument string to `TypedFlags`, this in turn will convert everything and will return this argument as a `dict` of `key:value` pairs where each `key` is the flag, and the `value` is the value for that flag ```python from typed_flags import TypedFlags @bot.command() async def test(ctx, *, args: TypedFlags): # Send all of command args await ctx.send(args) ``` An example calling the above code: `%test this "Lol ez" --try:=test string --hard:=This is kinda cool` ```python args = {None: ['this', 'Lol ez'], 'try': 'test string', 'hard': 'This is kinda cool'} ``` A further example: `%test --try:=test string --hard:=lol This is kinda cool` ```python args = {'try': 'test string', 'hard': 'lol This is kinda cool'} ``` Note: Since we have no argless arguments, it is not in the returned data #### Customization --- You can customize two things, the string to preceed any flag values as well as the string to split up between the flag and its value. Both of these are keyword arguments when initializing `TypedFlags` - `start`: str -> The string to preceed any flags (Defaults to `--`) - `delim`: str -> What to split flags with to get the `key:value` split (Defaults to `:=`) You do not have to provide these values. There are defaults in place. It is only for customization purposes #### Important Notes --- This package works in-line with how discord.py handles command parsing and consumption. That is to say the argument `Hello world` will be *two* variables, where as the argument `"Hello world"` will be parsed as one argument. This is something important to understand otherwise you will experience unexpected behaviour. **However**, this only applies to 'flagless' arguments. Values between flags are considered to be all part of said flag (See examples) --- Any arguments **not** associated with a flag will be added to the dictionary under the key `None`. The value for this key is a `list` containing all of the arguments found that do not corrospond to a given flag. It is **also** important to note that if no flagless values are detected then this key *will not* be in the dictionary. You should check for this in your code. --- Any arguments in `argless` are ordered according to the order they were received.


نیازمندی

مقدار نام
>=1 discord.py


زبان مورد نیاز

مقدار نام
>=3.8 Python


نحوه نصب


نصب پکیج whl discord-typed-flags-1.1.4:

    pip install discord-typed-flags-1.1.4.whl


نصب پکیج tar.gz discord-typed-flags-1.1.4:

    pip install discord-typed-flags-1.1.4.tar.gz