Skip to main content

Simple module for sending dsicord webhooks

Project description

GitHub PyPI Tests

inford 📬

inford is a python library for sending dsicord webhooks.

Installation

Use the package manager pip to install foobar.

pip install inford

Usage

from inford import DiscordWebhook

web = DiscordWebhook(
    webhook_url="https://discord.com/api/webhooks/123***/abc***",
    username="inford",
    avatar_url="https://avatars.githubusercontent.com/u/55992548?v=4",
    content="Lorem ipsum dolor sit",
    title="Hey!",
    color="#0099ff",
    description="Lorem ipsum dolor sit amet, consectetur adipiscing elit.",
    author_name="INFORD",
    author_url="https://github.com/Prathamesh-B/inford",
    footer_text="thank you",
    footer_icon="https://user-images.githubusercontent.com/5679180/79618120-0daffb80-80be-11ea-819e-d2b0fa904d07.gif",
    image="https://avatars.githubusercontent.com/u/55992548?v=4",
    thumbnail="https://avatars.githubusercontent.com/u/55992548?v=4",
)
web.send() #or use send=True as a parameter

Image

Presets

from inford import Presets

web = Presets(
    webhook_url="https://discord.com/api/webhooks/123***/AbC***",
)

web.info("Python", "Update available")
web.error("Database", "No data found")
web.warn("System", "Ram overload")
web.success("Program", "Executed successfully")

Image

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT

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

inford-1.1.0.tar.gz (4.1 kB view hashes)

Uploaded Source

Built Distribution

inford-1.1.0-py3-none-any.whl (4.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page