guilded-webhook is a basic wrapper for guilded's webhooks.
Project description
guilded-webhook
a basic wrapper for guilded's webhooks
(also works with discords, although this is due to both having very similar api's, any breaking changes on discord's side will not receive fixes)
guilded support server
discord support server
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
-
(arg) str - url - webhook url.
-
(kwarg) str - avatar - optional avatar override (image url).
-
(kwarg) str - username - optional username override.
-
(async) method - send
-
(kwarg) string - content
-
(kwarg) List[Embed] - embeds
-
(kwarg) str - avatar - optional avatar override (overrides instance avatar) (image url).
-
(kwarg) str - username - optional username override (overrides instance username)
-
(kwarg) File - file to upload with the message
-
class - WebHook
-
(arg) str - url - webhook url.
-
(kwarg) str - avatar - optional avatar override (image url).
-
(kwarg) str - username - optional username override.
-
method - send
-
(kwarg) string - content
-
(kwarg) List[Embed] - embeds
-
(kwarg) str - avatar - optional avatar override (overrides instance avatar) (image url).
-
(kwarg) str - username - optional username override (overrides instance username)
-
(kwarg) File - file to upload with the message
-
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
-
class - File
-
(arg) Union[str, bytes, os.PathLike, io.BufferedIOBase] - fp - filelike object to upload
-
(arg) str - filename - filename to upload as (required when using BytesIO and similar)
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.3.1.tar.gz
(17.1 kB
view details)
Built Distribution
File details
Details for the file guilded-webhook-0.3.1.tar.gz
.
File metadata
- Download URL: guilded-webhook-0.3.1.tar.gz
- Upload date:
- Size: 17.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.8.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 83790abd62b5d1c0455472af63d26b2e06687731e83fd62d8b68df11c1737519 |
|
MD5 | 4d1143a2de0bf5739c2493178aa7e44e |
|
BLAKE2b-256 | b6f002dba3108e06554ec3c00c1c8a0b6e71df56eb2aa28094502cc4b319168e |
File details
Details for the file guilded_webhook-0.3.1-py3-none-any.whl
.
File metadata
- Download URL: guilded_webhook-0.3.1-py3-none-any.whl
- Upload date:
- Size: 17.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.8.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d89531d404c45c8b7fed92f5c80b914d6bbb963e309f36ec97e9c3b34102fb33 |
|
MD5 | 998b3ab0006408c839b22f6136d3a24f |
|
BLAKE2b-256 | 16b406e3e74e357f9936e49c2893c049a06c44cdfab75d015b89d2dcf845a64b |