image and thumbnail embeds

This commit is contained in:
Sergio Álvarez 2017-07-20 12:56:47 +02:00
parent 303203ce62
commit 4befc74243
1 changed files with 18 additions and 0 deletions

View File

@ -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,