Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rewrite and improvements #105

Closed
wants to merge 49 commits into from
Closed

Rewrite and improvements #105

wants to merge 49 commits into from

Conversation

solaluset
Copy link

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
Copy link
Author

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

@BEMZ01
Copy link

BEMZ01 commented Nov 16, 2022

#118 related to my issue

@lautarocherro
Copy link

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
Copy link
Author

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 solaluset closed this Apr 24, 2024
@solaluset solaluset deleted the pr branch April 24, 2024 14:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants