A bad discord webhooks wrapper
Project description
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
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)
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
Built Distribution
File details
Details for the file discombed-0.0.1.tar.gz
.
File metadata
- Download URL: discombed-0.0.1.tar.gz
- Upload date:
- Size: 3.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.9.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 41768ec6430cc7b239bb072e547946e9551fef8e650ddd4f10aece0e3fe0b505 |
|
MD5 | 39d74f0c35479fd8a671d2edcda0fad1 |
|
BLAKE2b-256 | 5a8de171890ab74c03a8863f4ceade197be9e16e32c873bd6a5b9c6dfbf8fb9a |
Provenance
File details
Details for the file discombed-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: discombed-0.0.1-py3-none-any.whl
- Upload date:
- Size: 15.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.9.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 71a89407523f68fb8d76e7218c1664675de0cc8b2e2657015a30fac2b59166ef |
|
MD5 | c77a515083c4b3de40f333f743c53525 |
|
BLAKE2b-256 | fc8e701f4b175f03d63f8c16ad9bd32dc34f92f1dbc1bfc641f66e77c0acc5e5 |