DingoLingo icon indicating copy to clipboard operation
DingoLingo copied to clipboard

Rewrite and improvements

Open solaluset opened this issue 2 years ago • 4 comments

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:

  • Made possible to loop entire playlist.
  • Improved YT search.
  • Optimized song info fetching.
  • Made it possible to use unicode emojis as buttons.
  • Made all commands guild-only (we can't use utils.get_guild without discord intents. Maybe we should enable intents, I'm not sure).
  • Fixed many potential errors
  • Added more typehints
  • Formatted the code using black.

solaluset avatar Jun 07 '22 11:06 solaluset

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

solaluset avatar Jul 13 '22 08:07 solaluset

#118 related to my issue

BEMZ01 avatar Nov 16 '22 13:11 BEMZ01

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

lautarocherro avatar Aug 30 '23 22:08 lautarocherro

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.

solaluset avatar Sep 08 '23 13:09 solaluset