Utilitys
Utility Plugin For Pycord
Features:
- Advanced Audio Plug-ins
- Custom Cog For Easier Bot Use
- Specialized For Use With Pycord
Installing:
Stable:
pip install --upgrade pycord-utils
Development:
pip install -U git+https://github.com/pycord/utilitys.git
Extra Option's
Using our Custom Cog
First Install the extra version of Pycord Utilitys
pip install -U pycord-utils[extra]
Then Add This To Your Main bot file
bot.load_extension('pycord')
And your done!
Voice
To use our Voice Options Install
pip install -U pycord-utils[voice]
Examples
Small Examples For Use-Cases Of The Plug-in
Audio Example:
import discord
import pycord
from pycord.ext import audio
from discord.ext import commands
bot = commands.Bot(commands_prefix=">")
class Music(commands.Cog):
def __init__(self, bot):
self.bot = bot
if not hasattr(bot, "audio"):
self.bot.audio = audio.Client(bot=self.bot)
self.bot.loop.create_task(self.start_nodes())
async def start_nodes(self):
await self.bot.wait_until_ready()
# Initiate our nodes. For this example we will use one server.
# Region should be a discord.py guild.region e.g sydney or us_central (Though this is not technically required)
await self.bot.audio.initiate_node(
host="0.0.0.0",
port=2333,
rest_uri="http://0.0.0.0:2333",
password="youshallnotpass",
identifier="TEST",
region="us_central",
)
@commands.command(name="connect")
async def connect_(self, ctx, *, channel: discord.VoiceChannel = None):
if not channel:
try:
channel = ctx.author.voice.channel
except AttributeError:
raise discord.DiscordException(
"No channel to join. Please either specify a valid channel or join one."
)
player = self.bot.audio.get_player(ctx.guild.id)
await ctx.send(f"Connecting to **`{channel.name}`**")
await player.connect(channel.id)
@commands.command()
async def play(self, ctx, *, query: str):
tracks = await self.bot.audio.get_tracks(f"ytsearch:{query}")
if not tracks:
return await ctx.send("Could not find any songs with that query.")
player = self.bot.audio.get_player(ctx.guild.id)
if not player.is_connected:
await ctx.invoke(self.connect_)
await ctx.send(f"Added {str(tracks[0])} to the queue.")
await player.play(tracks[0])
bot.add_cog(Music(bot))
More examples can be found in the examples folder.
Metadata
Release files for Pycord-Utils 1.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| Pycord-Utils-1.4.0.tar.gz | 1.4 MB | Without provenance | Details for Pycord-Utils-1.4.0.tar.gz |
Release files / Pycord-Utils-1.4.0.tar.gz
| Download URL | Pycord-Utils-1.4.0.tar.gz |
|---|---|
| Size | 1.4 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c09faa363761b9eb96e941bba598e3ad17b21e93cbb411a4e2d34be6fe787d27
|
|
BLAKE2b-256 checksum How to use checksums |
b9fb6e7f711ebeb15885e21f6762db5bdd67c2bcf01c5fcd1cd92995e8d2245d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.0 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9
|
Security for Pycord-Utils 1.4.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.