guilded-webhook is a basic wrapper for guilded's webhooks.
Project description
guilded-webhook
a basic wrapper for guilded's webhooks
Basic example:
import guilded_webhook as guilded
import asyncio
async def main():
hook = guilded.AsyncWebhook('https://media.guilded.gg/webhooks/REDACTED')
await hook.send(content='test')
asyncio.run(main())
or
import guilded_webhook as guilded
def main():
hook = guilded.Webhook('https://media.guilded.gg/webhooks/REDACTED')
hook.send(content='test')
main()
guilded-webhook also supports embeds (heavily inspired by discord.py's embeds)
import guilded_webhook as guilded
import asyncio
from datetime import datetime
async def main():
hook = guilded.AsyncWebhook('https://media.guilded.gg/webhooks/REDACTED')
embed = guilded.Embed(title="title", description="description", url="https://www.youtube.com/watch?v=dQw4w9WgXcQ", color=0x00ffff, timestamp=datetime.now())
embed.add_field(title="field title", value="field value")
embed.set_image("https://img.guildedcdn.com/ContentMedia/e67907d6efa7aebb0440097cb9a03672-Full.webp")
await hook.send(content='test', embeds=embed)
asyncio.run(main())
docs
class - AsyncWebHook
-
(async) method - send
-
(kwarg) string - content
-
(kwarg) List[Embed] - embeds
-
class - WebHook
-
method - send
-
(kwarg) string - content
-
(kwarg) List[Embed] - embeds
-
class - Embed
-
(kwarg) str - title
-
(kwarg) str - description
-
(kwarg) str - url
-
(kwarg) int - color (hex color)
-
(kwarg) datetime.datetime - timestamp
-
method - add_field
-
(kwarg) str - title
-
(kwarg) str - value
-
(kwarg) bool - inline
-
-
method - set_author
-
(kwarg) str - name
-
(kwarg) str - url
-
(kwarg) str - icon_url
-
-
method - set_footer
-
(kwarg) str - text
-
(kwarg) str - icon_url
-
-
method - set_image
-
(kwarg) str - url
-
(kwarg) int - height
-
(kwarg) int - width
-
-
method - set_thumbnail
-
(kwarg) str - url
-
(kwarg) int - height
-
(kwarg) int - width
-
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
guilded-webhook-0.1.0.tar.gz
(15.4 kB
view hashes)
Built Distribution
Close
Hashes for guilded_webhook-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d45da43949b9b7fe9686e85f85eb1edb137964604523f9a844efd4679cb7b165 |
|
MD5 | fad1b5a666dec27e63301eb92672fc26 |
|
BLAKE2b-256 | a7b6d0ca1f614ebae6dbc69ce215072c13a4f1b37cb509f8ecdd2520c0a3817f |