discord-styled-text-1.0.0
توضیحات
A small library to style text for Discord without having to remember any syntax
| ویژگی | مقدار |
|---|---|
| سیستم عامل | OS Independent |
| نام فایل | discord-styled-text-1.0.0 |
| نام | discord-styled-text |
| نسخه کتابخانه | 1.0.0 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | classabbyamp, 0x5c |
| ایمیل نویسنده | dev@kb6.ee, dev@0x5c.io |
| آدرس صفحه اصلی | https://discord-styled-text.miaow.io |
| آدرس اینترنتی | https://pypi.org/project/discord-styled-text/ |
| مجوز | BSD 3-Clause |
# discord-styled-text
A small library to style text for Discord without having to remember any syntax
[](https://pypi.org/project/discord-styled-text/)   [](https://discord-styled-text.miaow.io/en/latest/?badge=latest)
## Installation
`discord-styled-text` requires Python 3.6 at minimum.
```none
$ pip install discord-styled-text
```
## Documentation
Documentation is available on [ReadTheDocs](https://discord-styled-text.miaow.io/).
## Example Usage
```py
>>> from discord_styler import *
>>> bold_text = Bold("Here's some bold text")
>>> italic_text = Italic("and here's some", Underline("italic text"), "with nested styles!")
>>> text = StyledText("We can combine them:", bold_text, italic_text)
>>> str(text)
"We can combine them: **Here's some bold text** *and here's some __italic text__ with nested styles!*"
>>> quoted = StyledText(BlockQuote(text), "and we can do quotes too")
>>> str(quoted)
"> We can combine them: **Here's some bold text** *and here's some __italic text__ with nested styles!*\n and we can do quotes too"
>>> question = StyledText(
... UserMention(200102491231092736),
... f"will you be free at {TimeStamp(1618953630, TimeStyle.LongDateTime)}?",
... f"I'll be doing code review in {ChannelMention(656893570711814145)} if you wanna join")
>>> str(question)
"<@200102491231092736> will you be free at <t:1618953630:F>? I'll be doing code review in <#656893570711814145> if you wanna join"
>>> link = NonEmbeddingURL("https://github.com/miaowware/discord-styled-text/pull/1")
>>> str(link)
'<https://github.com/miaowware/discord-styled-text/pull/1>'
>>> code = StyledText(
... "What do you think of this?\n",
... CodeBlock('def __str__(self) -> str:\n return "||" + super().__str__() + "||"', lang="py"))
>>> str(code)
'What do you think of this?\n ```py\ndef __str__(self) -> str:\n return "||" + super().__str__() + "||"\n```'
```

## Copyright
Copyright 2021 classabbyamp, 0x5c
Released under the BSD 3-Clause License.
See [`LICENSE`](LICENSE) for the full license text.
نحوه نصب
نصب پکیج whl discord-styled-text-1.0.0:
pip install discord-styled-text-1.0.0.whl
نصب پکیج tar.gz discord-styled-text-1.0.0:
pip install discord-styled-text-1.0.0.tar.gz