Raptor123471 / DingoLingo

A Discord music bot written in Python with support for Youtube, SoundCloud, Spotify, Bandcamp, Twitter, and custom files.
GNU General Public License v3.0
279 stars 166 forks source link

Rewrite and improvements #105

Closed solaluset closed 7 months ago

solaluset commented 2 years ago

Hi! I've used your project a lot and it's really not bad. But when I adapted it to my needs, I noticed how messy the code is. So I decided to rewrite and polish it. Well, I can't say it's perfect, but looks much better to me. I've changed quite a lot in project structure (some of my changes were reverted for compatibility though), so it's up to you whether to accept this PR or not. Incomplete list of improvements:

solaluset commented 2 years ago

I've also added Pycord 2.0 support, because it's released.

BEMZ01 commented 2 years ago

118 related to my issue

lautarocherro commented 1 year ago

Hi @Krutyi-4el I'm trying this version, and if i play a song, let the bot disconnect, and play another one i get this:

[youtube:search] query "aerobico remix" page 1: Downloading API JSON Exception ignored in: <function Image.__del__ at 0x000001A4F0D923E0> Traceback (most recent call last): File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.1520.0_x64__qbz5n2kfra8p0\Lib\tkinter\__init__.py", line 4080, in __del__ self.tk.call('image', 'delete', self.name) RuntimeError: main thread is not in main loop Exception ignored in: <function Variable.__del__ at 0x000001A4F0CD37E0> Traceback (most recent call last): File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.1520.0_x64__qbz5n2kfra8p0\Lib\tkinter\__init__.py", line 410, in __del__ if self._tk.getboolean(self._tk.call("info", "exists", self._name)): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ RuntimeError: main thread is not in main loop Exception ignored in: <function Variable.__del__ at 0x000001A4F0CD37E0> Traceback (most recent call last): File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.1520.0_x64__qbz5n2kfra8p0\Lib\tkinter\__init__.py", line 410, in __del__ if self._tk.getboolean(self._tk.call("info", "exists", self._name)): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ RuntimeError: main thread is not in main loop Exception ignored in: <function Variable.__del__ at 0x000001A4F0CD37E0> Traceback (most recent call last): File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.1520.0_x64__qbz5n2kfra8p0\Lib\tkinter\__init__.py", line 410, in __del__ if self._tk.getboolean(self._tk.call("info", "exists", self._name)): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ RuntimeError: main thread is not in main loop Exception ignored in: <function Variable.__del__ at 0x000001A4F0CD37E0> Traceback (most recent call last): File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.1520.0_x64__qbz5n2kfra8p0\Lib\tkinter\__init__.py", line 410, in __del__ if self._tk.getboolean(self._tk.call("info", "exists", self._name)): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ RuntimeError: main thread is not in main loop Tcl_AsyncDelete: async handler deleted by the wrong thread

solaluset commented 1 year ago

Hello @lautarocherro First: you shouldn't really use this, it's already outdated. Use the newest version of my fork. Second: You're getting tkinter error, but this project doesn't use tkinter. I think you haven't provided necessary information. If you think it's somehow connected to my code, please open an issue in my repository.