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
Hashes for discombed-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 71a89407523f68fb8d76e7218c1664675de0cc8b2e2657015a30fac2b59166ef |
|
MD5 | c77a515083c4b3de40f333f743c53525 |
|
BLAKE2b-256 | fc8e701f4b175f03d63f8c16ad9bd32dc34f92f1dbc1bfc641f66e77c0acc5e5 |