Skip to main content

A package with all sorts of utilities for discord.py.

Project description

dpytils

What is this?

It is a package with basic utilities for a discord bot main in discord.py.

How do I use it?

To use it, simply import it, and initialize the dpytils.utils() class.

from dpytils import utils
utilities = utils()

What utilities are there?

Currently, only two. randcolor() and permsfromvalue().

randcolor

This function will return a random color (of type int) to be used for a discord embed, or anything else.

permsfromvalue

This function will return another class, discordPermissions, which contains the following values.

permsfromvalue.perms_raw

The raw discord permissions object from discord.py.

permsfromvalue.perms_true

A list of permission names that are True from the given value

permsfromvalue.perms_false

A list of permission names that are False from the given value

permsfromvalue.perms_nice

A nicely formatted string with a list of permissions, and emoji to show true/false.

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

dpytils-0.0.4.tar.gz (2.2 kB view hashes)

Uploaded Source

Built Distribution

dpytils-0.0.4-py3-none-any.whl (3.0 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