Giter Site home page Giter Site logo

discordutils's Introduction

2226

discordutils's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

discordutils's Issues

Skip function in DiscordUtils.Music()

Everything works as is but the data that is being sent to me by the skip command, namely the old and new song name, displays the same name. I'm using the sample code for async def skip on DiscordUtils.Music()

image
image

Using a local image within a paginated embed

This isn't an "issue" but I'm trying to use a local image within a paginated embed and am striking out. I can embed an image within a non-paginated embed just fine using the following:

file = discord.File("imagename.png", filename="image.png")
embed = discord.Embed(title="foo")
embed.set_image(url="attachment://image.png")
await ctx.send(file=file, embed=embed)

But when attempting to utilize similar syntax with the paginator, it seems to not enjoy having another variable to process.

An example:

ctx.bot.loop.create_task(paginator.run(file=file, embeds=embeds))

I've tried a couple variations, but to no avail. The best I can get is either the embeds without the image or the image as an attachment (as a normal message, outside of an embed).

If anyone has any suggestions, I'm all ears

Code Example Play doesn't work

When i try to run the play command from the code example of the music system, i get following errors

with a seach query
ERROR: query "crab rave": Failed to parse JSON (caused by JSONDecodeError('Expecting value: line 1 column 1 (char 0)')) Ignoring exception in command play: Traceback (most recent call last): File "C:\Users\admin\AppData\Local\Programs\Python\Python38-32\lib\site-packages\discord\ext\commands\core.py", line 85, in wrapped ret = await coro(*args, **kwargs) File "c:\Users\admin\Desktop\Python Code\test.py", line 22, in play await player.queue(url, search=True) File "C:\Users\admin\AppData\Local\Programs\Python\Python38-32\lib\site-packages\DiscordUtils\Music.py", line 171, in queue song = await get_video_data(url, search, bettersearch, self.loop) File "C:\Users\admin\AppData\Local\Programs\Python\Python38-32\lib\site-packages\DiscordUtils\Music.py", line 70, in get_video_data data = data["entries"][0] TypeError: 'NoneType' object is not subscriptable

with a direct video link
ERROR: No video formats found Ignoring exception in command play: Traceback (most recent call last): File "C:\Users\admin\AppData\Local\Programs\Python\Python38-32\lib\site-packages\discord\ext\commands\core.py", line 85, in wrapped ret = await coro(*args, **kwargs) File "c:\Users\admin\Desktop\Python Code\test.py", line 22, in play await player.queue(url, search=True) File "C:\Users\admin\AppData\Local\Programs\Python\Python38-32\lib\site-packages\DiscordUtils\Music.py", line 171, in queue song = await get_video_data(url, search, bettersearch, self.loop) File "C:\Users\admin\AppData\Local\Programs\Python\Python38-32\lib\site-packages\DiscordUtils\Music.py", line 70, in get_video_data data = data["entries"][0] TypeError: 'NoneType' object is not subscriptable

Add note that member intents required for pagination

Just a quick suggestion that may be beneficial to include somewhere in the documentation or examples, that pagination requires the bot to have privileged intents enabled. I spent an hour struggling to identify the issue when pagination works in one of my bots but not the other; my fault since I'm well-aware of what privileged intents are, but it may also be useful for more less experienced developers who have little to no experience with it.

Unnecessary heavy dependencies should not be compulsory

The title says it all; youtube_dl and discord.py[voice] are not dependencies that everyone needs. They should not be compulsory installs with this, when someone just wants to use, say the paginator or the invite tracker.

They should be made into optional installs, that users could choose to install.

play not working from example code

When using the default music code in Readme I get 2 exceptions when using play(). Upates to both youtube and discord.py seem to be the issues for this.

1)

\DiscordUtils\Music.py", line 196, in play
source = discord.PCMVolumeTransformer(discord.FFmpegPCMAudio(self.music.queue[self.ctx.guild.id][0].source, **self.ffmpeg_opts))

A symptom of an exception from discord.py but it's broken the play function in Music.py.

2) Dislike Count

site-packages\DiscordUtils\Music.py", line 92, in get_video_data
dislikes = data["dislike_count"]
KeyError: 'dislike_count'

Stupid youtube updates.

Examples do not work

Hi there, I installed the latest version of discordUtils==1.28, discord.py==1.7.0 and python 3.8
I tried the examples and they do not print anything. also I do not get any errors in my console.

Bot leaving and not playing after rejoining

When the bot leaves and rejoins i get an error when i whant him to play a song: discord.ext.commands.errors.CommandInvokeError: Command raised an exception: ClientException: Not connected to voice.

[Suggestion] Allow pagination using multiple kinds of interactions

Comparing different alternatives for pagination. I saw a lower level implementation using discord components, using buttons to navigate pages (see this implementation).

I love the facilities that the Paginators here use, but using discord components would greatly enhance the user experience. As for implementation goes I would suggest to generalize the different reactions, buttons and other interactions (perhaps even commands) as "InteractionControllers" or a similar concept. And base the paginator on those controller interfaces instead of message reactions only.

Sounds like an interesting problem to tackle myself, tbh. But rn I'm more interested in adding features to my bots. So let me know if anyone else is interested.

Also allowing the developer to add before_interaction and after_interaction calls would also allow for even more use cases for this utility. For doing API calls per page for example.

Can't go to docs

I cant go to docs, and also cant go to github page via the link of pypi page

skip tracks but don't remove from the queue

It would be really nice to have an option to skip a track and don't loose it, i guess it could make it easier to loop queues in the future
something like skip(delete=False)

Invite Tracker - KeyError: guild.id

When A user joines the guild and the on_member_join event runs, whenever it gets to inviter = await tracker.fetch_inviter(member) then it says Keyerror: {guild.id}

Is there something I should do or is it a problem with DiscordUtils?

Player object error

After reading the docs, trying on my own, and constantly getting errors I decided I would try your code but it gave the same error. Whenever I use the player it says TypeError: 'NoneType' object is not subscriptable or when I use the volume command it says 'NoneType' object has no attribute 'change_volume'. I'm using python 3.8 because I had an error installing with 3.9

Bot not playing any song.

I have the exact same code as written in the docs. Whenever I use the play command, it throws me the following error:

Unrecognized option 'reconnect'.
Error splitting the argument list: Option not found

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.