image and thumbnail embeds
This commit is contained in:
parent
303203ce62
commit
4befc74243
18
webhook.py
18
webhook.py
|
@ -41,6 +41,8 @@ def embed(**kwargs):
|
|||
"description": kwargs.get("description", None),
|
||||
"url": kwargs.get("url", None),
|
||||
"color": kwargs.get("color", None),
|
||||
"image": kwargs.get("image", None),
|
||||
"thumbnail": kwargs.get("thumbnail", None),
|
||||
"footer": kwargs.get("footer", None),
|
||||
"fields": kwargs.get("fields", [])
|
||||
}
|
||||
|
@ -54,6 +56,22 @@ def field(name, value, inline=False):
|
|||
}
|
||||
|
||||
|
||||
def image(url, w=50, h=50):
|
||||
return {
|
||||
"url": url,
|
||||
"width": w,
|
||||
"height": h
|
||||
}
|
||||
|
||||
|
||||
def thumbnail(url, w=50, h=50):
|
||||
return {
|
||||
"url": url,
|
||||
"width": w,
|
||||
"height": h
|
||||
}
|
||||
|
||||
|
||||
def footer(text, icon_url):
|
||||
return {
|
||||
"text": text,
|
||||
|
|
Loading…
Reference in New Issue