kijk2869 / discodo Goto Github PK
View Code? Open in Web Editor NEWEnhanced Audio Player for Discord
License: MIT License
Enhanced Audio Player for Discord
License: MIT License
register_local_node() ํจ์๋ฅผ ์ด์ฉํด ๋ก์ปฌ ๋ ธ๋๋ฅผ ๋ฑ๋กํ๋ ค๊ณ ํ๋ฉด ๋ค์๊ณผ ๊ฐ์ ์๋ฌ๊ฐ ๋ฐ์ํ๋ฉด์ ๋ ธ๋๊ฐ ๋ฑ๋ก๋์ง ์์ต๋๋ค.
Task exception was never retrieved
future: <Task finished name='Task-1' coro=<DPYClient._register_local_event() done, defined at D:\Programs\Python38\lib\site-packages\discodo\client\DPYClient.py:116> exception=NotImplementedError()>
Traceback (most recent call last):
File "D:\Programs\Python38\lib\site-packages\discodo\client\DPYClient.py", line 121, in _register_local_event
LocalNodeProc = await launchLocalNode(**launchOptions)
File "D:\Programs\Python38\lib\site-packages\discodo\client\node.py", line 42, in launchLocalNode
LocalNodeProc = await asyncio.create_subprocess_exec(
File "D:\Programs\Python38\lib\asyncio\subprocess.py", line 236, in create_subprocess_exec
transport, protocol = await loop.subprocess_exec(
File "D:\Programs\Python38\lib\asyncio\base_events.py", line 1630, in subprocess_exec
transport = await self._make_subprocess_transport(
File "D:\Programs\Python38\lib\asyncio\base_events.py", line 491, in _make_subprocess_transport
raise NotImplementedError
NotImplementedError
Is it necessary?
Audio can be blocked.
Assign @Sannoob
https://github.com/kijk2869/discodo/tree/master/example/local/example2.py
Some strings of example2.py
is using present tense instead of past tense.
For example
Shuffleย theย queue.
[2020-09-16 09:04:47,097] [event.py] [discodo.event:event] [INFO]: Voice Client of 621870504147681311 not found. create new one.
Task exception was never retrieved
future: <Task finished name='Task-22' coro=<DiscordEvent.parseVoiceServerUpdate() done, defined at /usr/local/lib/python3.8/dist-packages/discodo/event.py:53> exception=ValueError()>
Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/discodo/event.py", line 63, in parseVoiceServerUpdate
vc = VoiceClient(self.client, data)
File "/usr/local/lib/python3.8/dist-packages/discodo/voice_client.py", line 18, in __init__
super().__init__(*args, **kwargs)
File "/usr/local/lib/python3.8/dist-packages/discodo/voice_connector.py", line 42, in __init__
self.encoder = opus.Encoder()
File "/usr/local/lib/python3.8/dist-packages/discodo/natives/opus.py", line 150, in __init__
raise ValueError
ValueError
[2020-09-16 09:04:47,350] [voice_client.py] [discodo.VoiceClient:voice_client] [INFO]: destroying voice client of 621870504147681311.
Exception ignored in: <function VoiceClient.__del__ at 0x7ff83802a0d0>
Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/discodo/voice_client.py", line 90, in __del__
if self.player and self.player.is_alive():
AttributeError: 'VoiceClient' object has no attribute 'player'
ํ์ด์ฌ 3.8.2, ์ํ์ฝ๋๋ก !join
์ ์คํํ ๋ ๋์ค์ฝ๋ ์๋ฒ์์ ์ค๋ฅ๊ฐ ๋ฐ์ํจ
Do you have any plans to implement it?
Setting variables on Sanic instances is deprecated and will be removed in version 21.9.
You should change your Sanic instance to use instance.ctx.ClientManagers instead.
Ignoring exception in on_message
Traceback (most recent call last):
File "C:\Users\yoru\AppData\Local\Programs\Python\Python37\lib\site-packages\discord\client.py", line 333, in _run_event
await coro(*args, **kwargs)
File "test.py", line 65, in on_message
Source = await vc.loadSource(message.content[5:].strip())
File "C:\Users\yoru\AppData\Local\Programs\Python\Python37\lib\site-packages\discodo\client\voice_client.py", line 70, in loadSource
return (await self.query("loadSource", {"query": Query}))["source"]
KeyError: 'source'
await self.query("loadSource", {"query": Query})
{'traceback': {'JSONDecodeError': 'Extra data: line 1 column 258633 (char 258632)'}, 'guild_id': 621870504147681311}
server(ubuntu 20.04)
[2020-12-12 08:33:43,024] [websocket.py] [discodo.server:websocket] [INFO]: new websocket connection created from
[2020-12-12 08:33:44,456] [event.py] [discodo.event:event] [INFO]: recieve self voice update. set session id 9544877c55b74a23ac04b5faa78f065e
[2020-12-12 08:33:44,459] [event.py] [discodo.event:event] [INFO]: Voice Client of 621870504147681311 not found. create new one.
[2020-12-12 08:33:44,646] [event.py] [discodo.event:event] [INFO]: Voice server update recieved. connect to new endpoint
[2020-12-12 08:33:44,646] [voice_connector.py] [discodo.VoiceConnector:voice_connector] [INFO]: voice endpoint south-korea367.discord.media detected.
[2020-12-12 08:33:44,709] [gateway.py] [discodo.gateway:gateway] [INFO]: select encrypt mode xsalsa20_poly1305_suffix
[2020-12-12 08:33:44,721] [gateway.py] [discodo.gateway:gateway] [INFO]: recieved voice secret key.
[2020-12-12 08:33:47,292] [search.py] [discodo.extractor.youtube:search] [INFO]: Downloading search page of how far ill go
[2020-12-12 08:33:48,150] [search.py] [discodo.extractor.youtube:search] [INFO]: Downloading search page of how far ill go
On remote, can't set volume over 100
Passing a local variable to a del
statement results in that variable being removed from the local namespace. When exiting a function all local variables are deleted, so it is unnecessary to explicitly delete variables in such cases. It is recommended to remove this del
statement. Not preferred: ```python def โฆ
There is 1 occurrence of this issue in the repository.
See all occurrences on DeepSource โ deepsource.io/gh/kijk2869/discodo/issue/PTC-W0043/occurrences/
File "/usr/local/lib/python3.8/site-packages/discord/ext/commands/core.py", line 85, in wrapped
ret = await coro(*args, **kwargs)
File "/green/Cogs/music.py", line 165, in _skip
await voice.skip()
File "/usr/local/lib/python3.8/site-packages/discodo/client/voice_client.py", line 99, in skip
return (await self.query("skip", {"offset": offset}))["remain"]
File "/usr/local/lib/python3.8/site-packages/discodo/client/voice_client.py", line 57, in query
raise NodeException(*list(Data["traceback"].items())[0])
NodeException: AttributeError: 'NoneType' object has no attribute 'current'
System Info
OS: Ubuntu 20.04 LTS
Python Version: 3.8.6
Discodo Version: 2.3.13
Ignoring exception in command play:
Traceback (most recent call last):
File "C:\Users\name\AppData\Local\Programs\Python\Python38\lib\site-packages\discord\ext\commands\core.py", line 85, in wrapped
ret = await coro(*args, **kwargs)
File "SECRET\MusicBot-master\MusicBot-master\cogs\play.py", line 18, in play
Data = await VC.loadSource(Query)
File "C:\Users\name\AppData\Local\Programs\Python\Python38\lib\site-packages\discodo\client\voice_client.py", line 69, in loadSource
return (await self.query("loadSource", {"query": Query}))["source"]
KeyError: 'source'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\Users\name\AppData\Local\Programs\Python\Python38\lib\site-packages\discord\ext\commands\bot.py", line 903, in invoke
await ctx.command.invoke(ctx)
File "C:\Users\name\AppData\Local\Programs\Python\Python38\lib\site-packages\discord\ext\commands\core.py", line 859, in invoke
await injected(*ctx.args, **ctx.kwargs)
File "C:\Users\name\AppData\Local\Programs\Python\Python38\lib\site-packages\discord\ext\commands\core.py", line 94, in wrapped
raise CommandInvokeError(exc) from exc
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: KeyError: 'source'
๊ฒ์์์- ๋น์ ์ ๊ธฐ๋ค๋ฆฌ๋ ์ฌ์ฐ ์ค์ผ
ใด ์ ํ๋ธ์์๋ ์ ์์ ์ผ๋ก ์ ๋์ด, ๋ชจ๋๋ด์์ ๊ฒ์์ด ๋ถ๊ฐํ ์ฆ์
Buffer can be destroyed.
While playing music, the following logs appear and the music does not play.
[2021-01-12 22:05:04,235] [connector.py] [discodo.VoiceConnector:connector] [INFO]: voice connection of 748691436647612488 destroyed with 1006. wait for events.
VoiceClient.state
raises AttributeError
when its just created or never played any song.
Traceback (most recent call last):
File "C:\Users\sions\PycharmProjects\slashm\cogs\music.py", line 70, in play
is_playing = codo.state == "playing"
File "C:\Users\sions\AppData\Local\Programs\Python\Python37\lib\site-packages\discodo\voice_client.py", line 127, in state
if not self.Queue and not self.player.current:
AttributeError: 'NoneType' object has no attribute 'current'
Code:
codo = self.bot.discodo.getVC(ctx.guild.id, safe=True)
if not codo:
await self.bot.connect_voice(ctx.guild, ctx.author.voice.channel)
await ctx.send(content="์์ฑ ์ฑ๋์ ์ฐ๊ฒฐํ์ด์! ์ ์๋ง ๊ธฐ๋ค๋ ค์ฃผ์ธ์...") # Delays so vc can be created.
codo = self.bot.discodo.getVC(ctx.guild.id, safe=True)
try:
is_playing = codo.state == "playing" # Here is where exception occur
except Exception as ex:
__import__("traceback").print_exc()
is_playing = False
websocket can be slow
At connector.py
line 19: https://github.com/kijk2869/discodo/blob/master/discodo/connector.py#L19
def __init__(self, manager, data: dict = {}) -> None:
Default value of data
is {}
, but dict
object is mutable. Is this intended? If not, this should be fixed.
def __init__(self, manager, data: dict = None) -> None:
...
self.data = data if data else {}
I solved this problem by running the following commands, and my system is Linux Mint 20 Ulyana
.
sudo apt update
sudo apt install --no-install-recommends -y gcc libopus-dev python3-dev libnacl-dev
sudo apt install --no-install-recommends -y pkg-config ffmpeg libavformat-dev libavcodec-dev libavdevice-dev libavutil-dev libswscale-dev libavresample-dev libavfilter-dev
python3.8 -m pip install discodo --no-binary av --force
Please share your method of solving if you are using other distributions in the comments to contribute
To avoid 429 of youtube, discodo has to rotate ip.
It should be applied to youtube_dl and related fetcher.
Streaming is not seekable.
Will be developed when discodo.ts development begins.
[2020-08-18 13:48:41,774] [Loader.py] [libav.matroska,webm:Loader] [ERROR]: File ended prematurely
may be occured in Stream ip tunneling.
It returns None or Routeplanner
But typehint not specified None type
Solution: using Union
https://stackoverflow.com/questions/33945261/how-to-specify-multiple-return-types-using-type-hints
from typing import Union
def foo(client_id: str) -> Union[list,bool]
No document. Hard to find reference
Reverse connection
I printed whole track source. But there is no value in thumbnail attribute
[INFO][MainCog][2021-01-07 23:06:44,396]: {'_type': 'AudioData', 'id': 'UwLFTav2IGQ', 'title': 'BIGONE - Imgonnaparty', 'webpage_url': 'https://www.youtube.com/watch?v=UwLFTav2IGQ', 'thumbnail': None, 'url': None, 'duration': 194, 'is_live': False, 'uploader': 'lovetoken', 'description': None, 'subtitles': {}, 'chapters': {}, 'related': False}
Also tested other videos, also unable to bring thumbnails.
[INFO][MainCog][2021-01-07 23:09:15,855]: {'_type': 'AudioData', 'id': 'E4NO9lnuVNo', 'title': '[MV] Forever 84 - ๋ค๋ชจ์ (์ผ๋ฐ, ๋ ์ฝฐ์ด์, ์ฌ์ด๋จผ ๋๋ฏธ๋, ํ๋ก์ํ , ๋ฅํ๋ก์ฐ) X ๋ฉ๊ณ [DF FILM]', 'webpage_url': 'https://www.youtube.com/watch?v=E4NO9lnuVNo', 'thumbnail': None, 'url': None, 'duration': 242, 'is_live': False, 'uploader': 'dingo freestyle', 'description': None, 'subtitles': {}, 'chapters': {}, 'related': False}
Getting 404 page at the link of discodo.js lib
The player should be able to recover.
However, to implement this feature, you need to change the way your current node server is managed.
Its hard to use for new users.
If it will not be recovored, have to make extractor.
ERROR: Failed building wheel for av
python 3.8.5, ์ํ์ฝ๋๋ก ์คํํด ๋ณด์์ต๋๋ค. (!join ๋ช
๋ น์ด)
discord.py 1.5.1, discodo 2.3.9
์
๋๋ค.
Ignoring exception in command join:
Traceback (most recent call last):
File "C:\Users\user\AppData\Local\Programs\Python\Python38-32\lib\site-packages\discord\ext\commands\core.py", line 85, in wrapped
ret = await coro(*args, **kwargs)
File "E:\Happytree Samsung\Discord File\Team HT\Shrimp\Cogs\music2.py", line 18, in _join
await self.bot.ws.voice_state(ctx.guild.id, ctx.author.voice.channel.id)
AttributeError: 'NoneType' object has no attribute 'voice_state'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\Users\user\AppData\Local\Programs\Python\Python38-32\lib\site-packages\discord\ext\commands\bot.py", line 902, in invoke
await ctx.command.invoke(ctx)
File "C:\Users\user\AppData\Local\Programs\Python\Python38-32\lib\site-packages\discord\ext\commands\core.py", line 864, in invoke
await injected(*ctx.args, **ctx.kwargs)
File "C:\Users\user\AppData\Local\Programs\Python\Python38-32\lib\site-packages\discord\ext\commands\core.py", line 94, in wrapped
raise CommandInvokeError(exc) from exc
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: AttributeError: 'NoneType' object has no attribute 'voice_state'
How about explaining in Korean at the level that even Jammin can see?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.