معرفی شرکت ها


discord-ext-better-options-description-1.0


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

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

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

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

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

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

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

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

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

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

مشاهده بیشتر

توضیحات

Discord.py extension to keep your slash commands options neat and tidy.
ویژگی مقدار
سیستم عامل -
نام فایل discord-ext-better-options-description-1.0
نام discord-ext-better-options-description
نسخه کتابخانه 1.0
نگهدارنده []
ایمیل نگهدارنده []
نویسنده Nohet
ایمیل نویسنده igorczupryniak503@gmail.com
آدرس صفحه اصلی https://github.com/Nohet/discord-ext-better-options-description
آدرس اینترنتی https://pypi.org/project/discord-ext-better-options-description/
مجوز MIT
# better-options-description 1.0 [![Downloads](https://pepy.tech/badge/discord-ext-better-options-description)](https://pepy.tech/project/discord-ext-better-options-description) ![PyPI - License](https://img.shields.io/pypi/l/discord-ext-better-options-description) Discord.py extension to keep your slash commands options neat and tidy. ## Example Usage (Only for slash commands) ```py # With discord-ext-better-options-description ... from discord.ext.better_options_description import parse_doc @parse_doc @bot.tree.command(name="dice", description="Roll one or more dice.") async def dice_commands(interaction: discord.Interaction, number: int, sides: int = 6, bonus: int = 0): """ number: "The number of dice to roll (max: 25)." sides: "The number of sides each die will have." bonus: "A fixed number to add to the total roll." """ if number > 25: await interaction.response.send_message("No more than 25 dice can be rolled at once.") return if sides > 100: await interaction.response.send_message("The dice cannot have more than 100 sides.") return rolls = [random.randint(1, sides) for _ in range(number)] await interaction.response.send_message( " + ".join(f"{r}" for r in rolls) + (f" + {bonus} (bonus)" if bonus else "") + f" = **{sum(rolls) + bonus:,}**" ) # Without discord-ext-better-options-description ... from discord import app_commands @app_commands.describe(number="The number of dice to roll (max: 25).", sides="The number of sides each die will have.", bonus="A fixed number to add to the total roll.") @bot.tree.command(name="dice", description="Roll one or more dice.") async def dice_commands(interaction: discord.Interaction, number: int, sides: int = 6, bonus: int = 0): if number > 25: await interaction.response.send_message("No more than 25 dice can be rolled at once.") return if sides > 100: await interaction.response.send_message("The dice cannot have more than 100 sides.") return rolls = [random.randint(1, sides) for _ in range(number)] await interaction.response.send_message( " + ".join(f"{r}" for r in rolls) + (f" + {bonus} (bonus)" if bonus else "") + f" = **{sum(rolls) + bonus:,}**" ) ```


نیازمندی

مقدار نام
- discord.py
- PyYAML


نحوه نصب


نصب پکیج whl discord-ext-better-options-description-1.0:

    pip install discord-ext-better-options-description-1.0.whl


نصب پکیج tar.gz discord-ext-better-options-description-1.0:

    pip install discord-ext-better-options-description-1.0.tar.gz