discombed-0.0.1
توضیحات
A bad discord webhooks wrapper
| ویژگی | مقدار |
|---|---|
| سیستم عامل | OS Independent |
| نام فایل | discombed-0.0.1 |
| نام | discombed |
| نسخه کتابخانه | 0.0.1 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | DARKDRAGON532 |
| ایمیل نویسنده | - |
| آدرس صفحه اصلی | https://github.com/darkdragon532/discombed |
| آدرس اینترنتی | https://pypi.org/project/discombed/ |
| مجوز | - |
# Discombed
Discombed is a very bad wrapper for discord embeds
It is made in python and can support python 3.6 and above (hopefully)
# Quickstart
```python
import discombed
webhook = discombed.Hook(
url = "https://discord.com/api/webhooks/id/token",
content = "Hello, World!"
)
webhook.send()
```
# Functions and Classes
## ```discombed.Hook(url, content=None, username=None, avatar_url=None, tts=False)```
```
URL : str for discord webhook
Username : str defaults to the one specified in webhook creation
avatar_url : str defaults to the one specified in webhook creation
tts : bool defaults to false.
```
## ```.add_embed(Embed)```
Takes an embed object to add to the webhook (Max 10)
## ```.send(silent=True)```
Sends the webhook to discord
if silent is false it will return status code
## ```dicombed.Embed(title=None, colour=None, url=None, description=None, timestamp=None)```
```
title = title for embed
colour = decimal value of colour (use dischook.hex_to_decimal for converting hex to decimal)
description = description for embed
url = redirection url
timestamp = timestamp, must be in datetime.datetime format
```
## ```set.author(name, icon_url, url)```
Sets author for embed
name = author name
icon_url = icon url
url = redirect url
## ```set_image(url)```
sets embed image
url = url for image
## ```set_thumbnail(url)```
sets embed thumbnail
url = url for thumbnail
## ```set_footer(text, icon_url)```
sets embed footer
text = text for footer
icon_url = icon for footer
## ```add_field(name, value, inline=False)```
adds field for webhook, supports markdown
name = name of field
value = value of field
inline=False, set to true if you want inline
## ```dicombed.hex_to_decimal(hex)```
param = hex
returns decimal value of hex (useful for embed colours)
نیازمندی
| مقدار | نام |
|---|---|
| - | requests |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.6 | Python |
نحوه نصب
نصب پکیج whl discombed-0.0.1:
pip install discombed-0.0.1.whl
نصب پکیج tar.gz discombed-0.0.1:
pip install discombed-0.0.1.tar.gz