Giter VIP home page Giter VIP logo

raptor123471 / dingolingo Goto Github PK

View Code? Open in Web Editor NEW
282.0 14.0 165.0 23.25 MB

A Discord music bot written in Python with support for Youtube, SoundCloud, Spotify, Bandcamp, Twitter, and custom files.

License: GNU General Public License v3.0

Python 100.00%
bot discord-music-bot python discordpy music discord discord-bot music-bot songs playlists discord-bots discord-py pycord py-cord

dingolingo's Introduction

!!Activity Update!!

This repository has been inactive since 1/18/22

I am returning after a long absence to find more activity in this repository than I expected. This project is a bot I wrote for a 24 person guild and I started with minimal Python experience. Because of this, there are many mistakes and odd choices in this bot's code.

Rewrite: For simplicity

I am currently re-writing the bot to be cleaner (attempted), commented, and only support basic useful music needs. I am planning to support discord.py v2.0 and slash commands. There is no timeline on this project. When it is done, I will publish the updates to this repository.

What now?

I will ensure that the current code functions and has no major breaking issues.

DingoLingo

A Discord music bot written in Python with support for Youtube, SoundCloud, Spotify, Bandcamp, Twitter, and custom files.

Keep in mind:

What's Coming?

  • See TODO in Projects tab

Prerequisites:

API Keys

Obtained keys must be entered into config/config.py

Requirements

  • Installation of Python 3.7+

Install dependancies:

pip install -r requirements.txt
  • Located in /config

For Linux:

  • ffmpeg
  • libffi-dev
  • libnacl-dev

Installing - Self hosting

  1. Download release if available, alternatively download repository zip
  2. Complete Prerequisites
  3. Start run.py in project root
  4. See configuration options in /config/config.py

Button play plugin:

  • Set emoji with the setting command to enable this feature
  • Emote must be in same server as bot
  • Needs Manage Message permissions

Custom Cookies:

  • Extract cookies.txt from you browser using your preferred method
  • Overwrite the existing cookies.txt in /config/cookies/
  • (Optional) Set a custom cookies.txt location by modifying COOKIE_PATH in config.py

Commands:

Music

After the bot has joined your server, use $help to display help and command information.

$p [link/video title/key words/playlist-link/soundcloud link/spotify link/bandcamp link/twitter link]
  • Plays the audio of supported website
    • A link to the video (https://ww...)
    • The title of a video ex. (Gennifer Flowers - Fever Dolls)
    • A link to a YouTube playlist
  • If a song is playing, it will be added to queue

Playlist Commands

$skip / $s
  • Skips the current song and plays next in queue.
$q
  • Show the list of songs in queue
$shuffle /$sh
  • Shuffle the queue
$l / $loop
  • Loop the current playing song, toggle on/off
$mv / $move
  • Move song position in queue

Audio Commands

$pause
  • Pauses the current song.
$resume
  • Resumes the paused song.
$prev
  • Goes back one song and plays the last song again.
$np
  • Shows more details about the current song.
$volume / $vol
  • Adjust the volume 1-100%
  • Pass no arguments for current volume
$stop / $st
  • Stops the current song and clears the playqueue.

General

$settings /$setting/ $set
  • No Arguments: Lists server settings
  • Arguments: (setting) (value)
  • Use "unset" as an argument to reset a setting
  • Example: $setting start_voice_channel ChannelName
  • Administrators only
$c
  • Connects the bot to the user's voice channel
$cc
  • Switch the bot to the user's voice channel
$dc
  • Disconnects the bot from the current voice channel
$history
  • Shows you the titles of the X last played songs. Configurable in config.config.py

Utility

$reset / $rs
  • Disconnect and reconnect to the voice channel
$ping
  • Test bot connectivity
$addbot
  • Displays information on how to add the bot to another server of yours.

License

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

Acknowledgments

https://github.com/adriansteffan/DiscordJockey

dingolingo's People

Contributors

djpiper28 avatar lk2322 avatar pandabweer avatar rafaelsolvargas avatar raptor123471 avatar

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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dingolingo's Issues

Does the soundcloud playlist work?

Hello.
I was modifying this bot in various ways, and I noticed that SoundCloud Playlist is not working.
Is this not working from the beginning?
At first, I can download all JSON metadata in the playlist, but I can't play it.
Please help me if you have any solutions.
image

ERROR: Signature extraction failed, Could not find JS function 'na'

ERROR: Signature extraction failed: Traceback (most recent call last):
File "C:\Users\Vllad\AppData\Local\Programs\Python\Python38-32\lib\site-packages\youtube_dl\extractor\youtube.py", line 1348, in _decrypt_signature
func = self._extract_signature_function(
File "C:\Users\Vllad\AppData\Local\Programs\Python\Python38-32\lib\site-packages\youtube_dl\extractor\youtube.py", line 1262, in _extract_signature_function
res = self._parse_sig_js(code)
File "C:\Users\Vllad\AppData\Local\Programs\Python\Python38-32\lib\site-packages\youtube_dl\extractor\youtube.py", line 1331, in _parse_sig_js
initial_function = jsi.extract_function(funcname)
File "C:\Users\Vllad\AppData\Local\Programs\Python\Python38-32\lib\site-packages\youtube_dl\jsinterp.py", line 245, in extract_function
raise ExtractorError('Could not find JS function %r' % funcname)
youtube_dl.utils.ExtractorError: Could not find JS function 'na'; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see https://yt-dl.org/update on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
(caused by ExtractorError("Could not find JS function 'na'; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see https://yt-dl.org/update on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.")); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see https://yt-dl.org/update on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
Ignoring exception in command play:
Traceback (most recent call last):
File "C:\Users\Vllad\AppData\Local\Programs\Python\Python38-32\lib\site-packages\youtube_dl\extractor\youtube.py", line 1348, in _decrypt_signature
func = self._extract_signature_function(
File "C:\Users\Vllad\AppData\Local\Programs\Python\Python38-32\lib\site-packages\youtube_dl\extractor\youtube.py", line 1262, in _extract_signature_function
res = self._parse_sig_js(code)
File "C:\Users\Vllad\AppData\Local\Programs\Python\Python38-32\lib\site-packages\youtube_dl\extractor\youtube.py", line 1331, in _parse_sig_js
initial_function = jsi.extract_function(funcname)
File "C:\Users\Vllad\AppData\Local\Programs\Python\Python38-32\lib\site-packages\youtube_dl\jsinterp.py", line 245, in extract_function
raise ExtractorError('Could not find JS function %r' % funcname)
youtube_dl.utils.ExtractorError: Could not find JS function 'na'; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see https://yt-dl.org/update on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\Vllad\AppData\Local\Programs\Python\Python38-32\lib\site-packages\youtube_dl\YoutubeDL.py", line 806, in wrapper
return func(self, *args, **kwargs)
File "C:\Users\Vllad\AppData\Local\Programs\Python\Python38-32\lib\site-packages\youtube_dl\YoutubeDL.py", line 827, in __extract_info
ie_result = ie.extract(url)
File "C:\Users\Vllad\AppData\Local\Programs\Python\Python38-32\lib\site-packages\youtube_dl\extractor\common.py", line 534, in extract
ie_result = self._real_extract(url)
File "C:\Users\Vllad\AppData\Local\Programs\Python\Python38-32\lib\site-packages\youtube_dl\extractor\youtube.py", line 1622, in _real_extract
signature = self._decrypt_signature(sc['s'][0], video_id, player_url)
File "C:\Users\Vllad\AppData\Local\Programs\Python\Python38-32\lib\site-packages\youtube_dl\extractor\youtube.py", line 1358, in _decrypt_signature
raise ExtractorError(
youtube_dl.utils.ExtractorError: Signature extraction failed: Traceback (most recent call last):
File "C:\Users\Vllad\AppData\Local\Programs\Python\Python38-32\lib\site-packages\youtube_dl\extractor\youtube.py", line 1348, in _decrypt_signature
func = self._extract_signature_function(
File "C:\Users\Vllad\AppData\Local\Programs\Python\Python38-32\lib\site-packages\youtube_dl\extractor\youtube.py", line 1262, in _extract_signature_function
res = self._parse_sig_js(code)
File "C:\Users\Vllad\AppData\Local\Programs\Python\Python38-32\lib\site-packages\youtube_dl\extractor\youtube.py", line 1331, in _parse_sig_js
initial_function = jsi.extract_function(funcname)
File "C:\Users\Vllad\AppData\Local\Programs\Python\Python38-32\lib\site-packages\youtube_dl\jsinterp.py", line 245, in extract_function
raise ExtractorError('Could not find JS function %r' % funcname)
youtube_dl.utils.ExtractorError: Could not find JS function 'na'; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see https://yt-dl.org/update on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
(caused by ExtractorError("Could not find JS function 'na'; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see https://yt-dl.org/update on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.")); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see https://yt-dl.org/update on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\Vllad\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\Vllad\Documents\GitHub\Mbot\musicbot\commands\music.py", line 43, in _play_song
song = await audiocontroller.process_song(track)
File "C:\Users\Vllad\Documents\GitHub\Mbot\musicbot\audiocontroller.py", line 131, in process_song
track = self.search_youtube(track)
File "C:\Users\Vllad\Documents\GitHub\Mbot\musicbot\audiocontroller.py", line 273, in search_youtube
r = ydl.extract_info(title, download=False)
File "C:\Users\Vllad\AppData\Local\Programs\Python\Python38-32\lib\site-packages\youtube_dl\YoutubeDL.py", line 799, in extract_info
return self.__extract_info(url, ie, download, extra_info, process)
File "C:\Users\Vllad\AppData\Local\Programs\Python\Python38-32\lib\site-packages\youtube_dl\YoutubeDL.py", line 806, in wrapper
return func(self, *args, **kwargs)
File "C:\Users\Vllad\AppData\Local\Programs\Python\Python38-32\lib\site-packages\youtube_dl\YoutubeDL.py", line 838, in __extract_info
return self.process_ie_result(ie_result, download, extra_info)
File "C:\Users\Vllad\AppData\Local\Programs\Python\Python38-32\lib\site-packages\youtube_dl\YoutubeDL.py", line 876, in process_ie_result
return self.extract_info(ie_result['url'],
File "C:\Users\Vllad\AppData\Local\Programs\Python\Python38-32\lib\site-packages\youtube_dl\YoutubeDL.py", line 799, in extract_info
return self.__extract_info(url, ie, download, extra_info, process)
File "C:\Users\Vllad\AppData\Local\Programs\Python\Python38-32\lib\site-packages\youtube_dl\YoutubeDL.py", line 806, in wrapper
return func(self, *args, **kwargs)
File "C:\Users\Vllad\AppData\Local\Programs\Python\Python38-32\lib\site-packages\youtube_dl\YoutubeDL.py", line 838, in __extract_info
return self.process_ie_result(ie_result, download, extra_info)
File "C:\Users\Vllad\AppData\Local\Programs\Python\Python38-32\lib\site-packages\youtube_dl\YoutubeDL.py", line 924, in process_ie_result
return self.__process_playlist(ie_result, download)
File "C:\Users\Vllad\AppData\Local\Programs\Python\Python38-32\lib\site-packages\youtube_dl\YoutubeDL.py", line 1058, in __process_playlist
entry_result = self.__process_iterable_entry(entry, download, extra)
File "C:\Users\Vllad\AppData\Local\Programs\Python\Python38-32\lib\site-packages\youtube_dl\YoutubeDL.py", line 806, in wrapper
return func(self, *args, **kwargs)
File "C:\Users\Vllad\AppData\Local\Programs\Python\Python38-32\lib\site-packages\youtube_dl\YoutubeDL.py", line 1067, in __process_iterable_entry
return self.process_ie_result(
File "C:\Users\Vllad\AppData\Local\Programs\Python\Python38-32\lib\site-packages\youtube_dl\YoutubeDL.py", line 876, in process_ie_result
return self.extract_info(ie_result['url'],
File "C:\Users\Vllad\AppData\Local\Programs\Python\Python38-32\lib\site-packages\youtube_dl\YoutubeDL.py", line 799, in extract_info
return self.__extract_info(url, ie, download, extra_info, process)
File "C:\Users\Vllad\AppData\Local\Programs\Python\Python38-32\lib\site-packages\youtube_dl\YoutubeDL.py", line 815, in wrapper
self.report_error(compat_str(e), e.format_traceback())
File "C:\Users\Vllad\AppData\Local\Programs\Python\Python38-32\lib\site-packages\youtube_dl\YoutubeDL.py", line 628, in report_error
self.trouble(error_message, tb)
File "C:\Users\Vllad\AppData\Local\Programs\Python\Python38-32\lib\site-packages\youtube_dl\YoutubeDL.py", line 598, in trouble
raise DownloadError(message, exc_info)
youtube_dl.utils.DownloadError: ERROR: Signature extraction failed: Traceback (most recent call last):
File "C:\Users\Vllad\AppData\Local\Programs\Python\Python38-32\lib\site-packages\youtube_dl\extractor\youtube.py", line 1348, in _decrypt_signature
func = self._extract_signature_function(
File "C:\Users\Vllad\AppData\Local\Programs\Python\Python38-32\lib\site-packages\youtube_dl\extractor\youtube.py", line 1262, in _extract_signature_function
res = self._parse_sig_js(code)
File "C:\Users\Vllad\AppData\Local\Programs\Python\Python38-32\lib\site-packages\youtube_dl\extractor\youtube.py", line 1331, in _parse_sig_js
initial_function = jsi.extract_function(funcname)
File "C:\Users\Vllad\AppData\Local\Programs\Python\Python38-32\lib\site-packages\youtube_dl\jsinterp.py", line 245, in extract_function
raise ExtractorError('Could not find JS function %r' % funcname)
youtube_dl.utils.ExtractorError: Could not find JS function 'na'; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see https://yt-dl.org/update on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
(caused by ExtractorError("Could not find JS function 'na'; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see https://yt-dl.org/update on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.")); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see https://yt-dl.org/update on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "C:\Users\Vllad\AppData\Local\Programs\Python\Python38-32\lib\site-packages\discord\ext\commands\bot.py", line 939, in invoke
await ctx.command.invoke(ctx)
File "C:\Users\Vllad\AppData\Local\Programs\Python\Python38-32\lib\site-packages\discord\ext\commands\core.py", line 863, in invoke
await injected(*ctx.args, **ctx.kwargs)
File "C:\Users\Vllad\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: DownloadError: ERROR: Signature extraction failed: Traceback (most recent call last):
File "C:\Users\Vllad\AppData\Local\Programs\Python\Python38-32\lib\site-packages\youtube_dl\extractor\youtube.py", line 1348, in _decrypt_signature
func = self._extract_signature_function(
File "C:\Users\Vllad\AppData\Local\Programs\Python\Python38-32\lib\site-packages\youtube_dl\extractor\youtube.py", line 1262, in _extract_signature_function
res = self._parse_sig_js(code)
File "C:\Users\Vllad\AppData\Local\Programs\Python\Python38-32\lib\site-packages\youtube_dl\extractor\youtube.py", line 1331, in _parse_sig_js
initial_function = jsi.extract_function(funcname)
File "C:\Users\Vllad\AppData\Local\Programs\Python\Python38-32\lib\site-packages\youtube_dl\jsinterp.py", line 245, in extract_function
raise ExtractorError('Could not find JS function %r' % funcname)
youtube_dl.utils.ExtractorError: Could not find JS function 'na'; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see https://yt-dl.org/update on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
(caused by ExtractorError("Could not find JS function 'na'; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see https://yt-dl.org/update on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.")); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see https://yt-dl.org/update on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.

Any way to play 18+ songs?

I am trying to play song that is marked 18+ by youtube. The output says
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: DownloadError: ERROR: Sign in to confirm your age
Is there any way i could put account in the bot for it to play normally?

Change order of queue

A command such as $move <from> <to> that defaults to <from> 1 if only one argument is passed.

Show newest playing song on play

not sure how to word this properly, but it would be very useful if the bot would be able to display which song is now playing when a new one starts (I wasn't sure how to do this myself without the bot breaking)

error when playing sound

Hi, the bot on my local pc works fine,
the problem is when I upload it to heroku to host it. there does not play sound

Issue with queuing a spotify playlist.

When I queue a spotify playlist, the bot does not start playing immediately, rather just joins the voice chat and only shows its playing but actually isn't. To rectify this, i usually just queue the first song of the playlist and it just works

Previous command bug

Hey, there's a bug in the previous command, when you play the first two songs, if you skip the first one and go to the next and then type '!prev' then it doesn't do anything and returns this error :
Task exception was never retrieved
future: <Task finished name='Task-132' coro=<AudioController.play_song() done, defined at /home/runner/Music-1/musicbot/audiocontroller.py:70> exception=AttributeError("'str' object has no attribute 'info'")>
Traceback (most recent call last):
File "/home/runner/Music-1/musicbot/audiocontroller.py", line 73, in play_song
if song.info.title == None:
AttributeError: 'str' object has no attribute 'info'

Also, it adds the song that you wanted to play before in the queue and basically breaks the queue into unlimited songs of the same thing until you clear the queue. If possible, please give me your discord so that I can provide you with screenshots and any help would be appreciated, Thanks!

Pagination in queue

Can we have the feature to add pagination in the queue? I forked the repo and I tried it over the last weekend. I was able to make multiple embeds with each embed having 25 fields. But after the first embed, other embeds don't have song names coming, just the link is showing.

for counter, song in enumerate(list(playlist.playque), start=1):
            if song.info.title is None:
                embed.add_field(
                    name="\u200b",
                    value="{}.".format(str(counter))
                    + " "
                    + "[{}]({})".format(song.info.webpage_url, song.info.webpage_url),
                    inline=False,
                )
            else:
                embed.add_field(
                    name="\u200b",
                    value="{}.".format(str(counter))
                    + " "
                    + "[{}]({})".format(song.info.title, song.info.webpage_url),
                    inline=False,
                )
            # Add a new embed if count of 25 is reached
            if (
                counter > config.MAX_SONG_PRELOAD
                and counter % config.MAX_SONG_PRELOAD == 0
            ):
                embeds.append(embed)
                embed = discord.Embed(
                    title=":scroll: Queue [{}]".format(len(playlist.playque)),
                    color=config.EMBED_COLOR,
                    inline=False,
                )
            # Add the remaining songs in a seperate embed
            if counter == len(list(playlist.playque)):
                embeds.append(embed)

        for embed in embeds:
            await ctx.send(embed=embed)

Paginator code is still messy so not adding it

Traceback error

I have a fork of this bot mixed with my own things in several servers. It keeps giving me this error and then won't connect to voice channel in half of the servers it is in.

Traceback (most recent call last):
File "/home/container/.local/lib/python3.9/site-packages/discord/client.py", line 343, in _run_event
await coro(*args, **kwargs)
File "/home/container/main.py", line 63, in on_ready
await register(guild)
File "/home/container/main.py", line 110, in register
await guild.me.edit(nick=sett.get('default_nickname'))
File "/home/container/.local/lib/python3.9/site-packages/discord/member.py", line 637, in edit
await http.change_my_nickname(guild_id, nick, reason=reason)
File "/home/container/.local/lib/python3.9/site-packages/discord/http.py", line 248, in request
raise Forbidden(r, data)
discord.errors.Forbidden: 403 Forbidden (error code: 50013): Missing Permissions

Error

i encounter this error,do anyone know this?

Traceback (most recent call last):
File "run.py", line 1, in
import discord
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/init.py", line 25, in
from .client import Client
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/client.py", line 27, in
import asyncio
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/asyncio/init.py", line 21, in
from .base_events import *
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/asyncio/base_events.py", line 296
future = tasks.async(future, loop=self)
^
SyntaxError: invalid syntax

Create help text for new commands

All commands need a descriptive help text, both short and long. In the current state many commands are missing help information entirely.

Error playing song, no sound

when i use command to play song, lets say $p love satisfaction
this error show and cannot play video, other function works normally

i have this issue in OVH debian or ubuntu VPS, but i cannot reproduce on my own ubuntu or windows computer, they all running python 3.8 or 3.9

what should i do?

image

Replit users

I'm a Repl.it user, so i need a run button, i dont know what command i need

Timeout on startup

I was previously using the bot with no issues until I swapped the machine I'm using to run it. I've got all of the requirements installed and it times out. I was getting this error and then uninstalled and reinstalled everything

namo@namo-svr2:~/Desktop/DingoLingo$ python3.7 run.py
Starting Bot...
Joined NaCl-y Gamers
Startup Complete
Ignoring exception in command play:
Traceback (most recent call last):
  File "/home/nam0/.local/lib/python3.7/site-packages/discord/ext/commands/core.                                                                                                                                                             py", line 85, in wrapped
    ret = await coro(*args, **kwargs)
  File "/home/nam0/Desktop/DingoLingo/musicbot/commands/music.py", line 27, in _                                                                                                                                                             play_song
    if await audiocontroller.uconnect(ctx) == False:
  File "/home/nam0/Desktop/DingoLingo/musicbot/audiocontroller.py", line 350, in                                                                                                                                                              uconnect
    await self.register_voice_channel(ctx.author.voice.channel)
  File "/home/nam0/Desktop/DingoLingo/musicbot/audiocontroller.py", line 47, in                                                                                                                                                              register_voice_channel
    await channel.connect(reconnect=True, timeout=None)
  File "/home/nam0/.local/lib/python3.7/site-packages/discord/abc.py", line 1277                                                                                                                                                             , in connect
    voice = cls(client, self)
  File "/home/nam0/.local/lib/python3.7/site-packages/discord/voice_client.py",                                                                                                                                                              line 199, in __init__
    raise RuntimeError("PyNaCl library needed in order to use voice")
RuntimeError: PyNaCl library needed in order to use voice

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/nam0/.local/lib/python3.7/site-packages/discord/ext/commands/bot.p                                                                                                                                                             y", line 939, in invoke
    await ctx.command.invoke(ctx)
  File "/home/nam0/.local/lib/python3.7/site-packages/discord/ext/commands/core.                                                                                                                                                             py", line 863, in invoke
    await injected(*ctx.args, **ctx.kwargs)
  File "/home/nam0/.local/lib/python3.7/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: Run     

Pip list outdated from then.

namo@namo-svr2:~/Desktop/DingoLingo$ python3.7 -m pip list --outdated
Package             Version       Latest  Type
------------------- ------------- ------- -----
aiohttp             3.6.0         3.8.1   wheel
async-timeout       3.0.1         4.0.2   wheel
bcrypt              3.1.7         3.2.0   wheel
chardet             3.0.4         4.0.0   wheel
Click               7.0           8.0.4   wheel
colorama            0.4.3         0.4.4   wheel
cryptography        2.8           36.0.1  wheel
dbus-python         1.2.16        1.2.18  sdist
distro              1.4.0         1.7.0   wheel
distro-info         0.23ubuntu1   1.0     wheel
duplicity           0.8.12.0      0.8.22  sdist
entrypoints         0.3           0.4     wheel
fasteners           0.14.1        0.17.3  wheel
httplib2            0.14.0        0.20.4  wheel
keyring             18.0.1        23.5.0  wheel
launchpadlib        1.10.13       1.10.16 wheel
lazr.restfulclient  0.14.2        0.14.4  sdist
lazr.uri            1.0.3         1.0.6   sdist
Mako                1.1.0         1.2.0   wheel
MarkupSafe          1.1.0         2.1.0   wheel
monotonic           1.5           1.6     wheel
multidict           4.7.6         6.0.2   wheel
netifaces           0.10.4        0.11.0  wheel
oauthlib            3.1.0         3.2.0   wheel
paramiko            2.6.0         2.10.1  wheel
pexpect             4.6.0         4.8.0   wheel
Pillow              7.0.0         9.0.1   wheel
pip                 20.0.2        22.0.4  wheel
protobuf            3.6.1         3.19.4  wheel
pycairo             1.16.2        1.21.0  sdist
pycups              1.9.73        2.0.1   sdist
PyGObject           3.36.0        3.42.0  sdist
PyJWT               1.7.1         2.3.0   wheel
PyNaCl              1.3.0         1.5.0   wheel
python-dateutil     2.7.3         2.8.2   wheel
python-debian       0.1.36ubuntu1 0.1.43  wheel
pytz                2019.3        2021.3  wheel
pyxdg               0.26          0.27    wheel
PyYAML              5.3.1         6.0     wheel
reportlab           3.5.34        3.6.8   wheel
requests-unixsocket 0.2.0         0.3.0   wheel
SecretStorage       2.3.1         3.3.1   wheel
setuptools          45.2.0        60.9.3  wheel
simplejson          3.16.0        3.17.6  wheel
ssh-import-id       5.10          5.11    sdist
wadllib             1.3.3         1.3.6   sdist
wheel               0.34.2        0.37.1  wheel

Now when I try to start the bot it will sit blank for about 30 seconds then I receive this.

namo@namo-svr2:~/DingoLingo$ python3.7 run.py 
Traceback (most recent call last):
  File "run.py", line 84, in <module>
    bot.run(config.BOT_TOKEN, bot=True, reconnect=True)
  File "/home/namo/.local/lib/python3.7/site-packages/discord/client.py", line 723, in run
    return future.result()
  File "/home/namo/.local/lib/python3.7/site-packages/discord/client.py", line 702, in runner
    await self.start(*args, **kwargs)
  File "/home/namo/.local/lib/python3.7/site-packages/discord/client.py", line 665, in start
    await self.login(*args, bot=bot)
  File "/home/namo/.local/lib/python3.7/site-packages/discord/client.py", line 511, in login
    await self.http.static_login(token.strip(), bot=bot)
  File "/home/namo/.local/lib/python3.7/site-packages/discord/http.py", line 300, in static_login
    data = await self.request(Route('GET', '/users/@me'))
  File "/home/namo/.local/lib/python3.7/site-packages/discord/http.py", line 192, in request
    async with self.__session.request(method, url, **kwargs) as r:
  File "/home/namo/.local/lib/python3.7/site-packages/aiohttp/client.py", line 1117, in __aenter__
    self._resp = await self._coro
  File "/home/namo/.local/lib/python3.7/site-packages/aiohttp/client.py", line 619, in _request
    break
  File "/home/namo/.local/lib/python3.7/site-packages/aiohttp/helpers.py", line 656, in __exit__
    raise asyncio.TimeoutError from None
concurrent.futures._base.TimeoutError
Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x7fbcb56ce290>

Pip list output for the version's I have installed

namo@namo-svr2:~/DingoLingo/config$ python3.7 -m pip list
Package                Version
---------------------- --------------------
aiohttp                3.7.0
apturl                 0.5.2
async-timeout          3.0.1
asyncio                3.4.3
attrs                  21.4.0
bcrypt                 3.1.7
beautifulsoup4         4.10.0
blinker                1.4
Brlapi                 0.7.0
Brotli                 1.0.9
certifi                2019.11.28
chardet                3.0.4
charset-normalizer     2.0.12
Click                  7.0
colorama               0.4.3
command-not-found      0.3
cryptography           2.8
cupshelpers            1.0
dbus-python            1.2.16
defer                  1.0.6
discord.py             1.7.3
distro                 1.4.0
distro-info            0.23ubuntu1
duplicity              0.8.12.0
entrypoints            0.3
fasteners              0.14.1
future                 0.18.2
httplib2               0.14.0
idna                   2.8
keyring                18.0.1
language-selector      0.1
launchpadlib           1.10.13
lazr.restfulclient     0.14.2
lazr.uri               1.0.3
lockfile               0.12.2
louis                  3.12.0
macaroonbakery         1.3.1
Mako                   1.1.0
MarkupSafe             1.1.0
monotonic              1.5
multidict              6.0.2
mutagen                1.45.1
netifaces              0.10.4
oauthlib               3.1.0
olefile                0.46
paramiko               2.6.0
pbr                    5.8.1
pexpect                4.6.0
Pillow                 7.0.0
pip                    22.0.4
protobuf               3.6.1
py-cord                1.7.3
pycairo                1.16.2
pycryptodomex          3.14.1
pycups                 1.9.73
PyGObject              3.36.0
PyJWT                  1.7.1
pymacaroons            0.13.0
PyNaCl                 1.3.0
pyRFC3339              1.1
python-apt             2.0.0+ubuntu0.20.4.7
python-dateutil        2.7.3
python-debian          0.1.36ubuntu1
pytz                   2019.3
pyxdg                  0.26
PyYAML                 5.3.1
reportlab              3.5.34
requests               2.27.1
requests-unixsocket    0.2.0
SecretStorage          2.3.1
setuptools             60.9.3
simplejson             3.16.0
six                    1.16.0
soupsieve              2.3.1
spotipy                2.19.0
systemd-python         234
testresources          2.0.1
typing_extensions      4.1.1
ubuntu-advantage-tools 27.6
ubuntu-drivers-common  0.0.0
ufw                    0.36
unattended-upgrades    0.1
urllib3                1.26.8
usb-creator            0.3.7
wadllib                1.3.3
websockets             10.2
wheel                  0.37.1
xkit                   0.0.0
yarl                   1.7.2
yt-dlp                 2022.3.8.2

I'm not sure on what has changed from when I originally had the bot to now.
Thank you for any input!

Help command

Can you please tell me where and how to do the help command works?? The help command isn't very aesthetically pleasing and I would like to add some embeds to it to make it look nicer. Please tell me which file is the help command stored. Thanks I cant find it xd

The Bot suddenly disconnected.

When I tried playing a youtube song, it shows the song banner on discord and the console say this

[youtube] 0b5uulBrDrs: Downloading webpage
[youtube] 0b5uulBrDrs: Downloading android player API JSON

when it reaches this, the bot suddenly disconnected, and the console say this

Playing https://youtu.be/0b5uulBrDrs
Starting Bot...
Joined woah
Startup Complete

then a "Now Playing" banner pop up on discord.

Bot clears queue when switching channels

I'm not sure if this is a bug or a feature but when i use the command -changechannel it clears the queue, it would be useful to keep the same song playing even after changing the channel

Unable to play stream form YouTube

[youtube] XDgl5kTvw7M: Downloading webpage
[youtube] XDgl5kTvw7M: Downloading m3u8 information
[youtube] XDgl5kTvw7M: Downloading MPD manifest
ERROR: requested format not available
[youtube] XDgl5kTvw7M: Downloading webpage
[youtube] XDgl5kTvw7M: Downloading m3u8 information
[youtube] XDgl5kTvw7M: Downloading MPD manifest
skipping 20 segments ahead, expired from playlists

Hi, thanks for the music robot, I have a question:
When I play the stream music from YouTube, it shows the code above and the music stops playing after a few seconds.
Is this music robot cant play streams?

Change config through discord

Instead of just viewing the config through $settings, would be nice if we could change it. It looks simple, could make a pr if there wouldn't be any conflicts with versions under development rn

Cogs with no setup

Every time the main bot gets opened, the only error that comes through is "module config has no setup". Even unmodified (except for tokens) it still has this issue.

Different looping mode

Hi. Thank you for creating this. I was wondering if you could add looping queue function instead of just looping a single song? Thank you so much

Add command channels

You can just send the link to X channel and it'll play the song. If I didn't explain wee check hydra and you can see what I mean
(Sorry for bad english. It's not my first language)

Bot playing from youtube when passing spotify link

The bot tries to use youtube when i pass spotify link as a source. I have both SPOTIFY_ID and SPOTIFY_SECRET set in config.py (but the behaviour is the same if i leave both fields empty). This causes me issues because of youtube age restriction (and also the fact that the redirection often leads to music videos that have extra stuff aside from music), i know of the cookie workaround, but i want to know if i am doing something wrong or if this is the intended behaviour or maybe something that is not yet fully implemented. Sorry if it's already answered somewhere, i have not been able to find any reference to this.

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.