Skip to content

Commit

Permalink
General stability updates. (#2394)
Browse files Browse the repository at this point in the history
* just debug logs mostly

* Reorganize a little bit of logging at startup.  still debugging though.

* This should just be empty, for now...

* clean up some logs.

* no more async main in run.py.  
This refactors further signal and shutdown handling for the bot.

* Fix up pip install attempt and make code checks happy.

* Set console title in run.py main.
Improve some more logic with graceful recovery cases.
Fix some check complaints.

* More fixes for graceful startup and shutdown on windows.

* Use asyncio not self.loop.

* Ensure restart still works as expected.

* More fixes

* pylint

* restructure how on-ready fires other events.
try not to send updates while on_ready runs first time.

* fix the obviously broken bits.

* Fix --no-checks only skip optional checks.
Also log python version.

* refine some exception handling in auto playlists and on shutdown.

* Fix logic issue with auto playlist.

* improve replace in autoplaylist.

* Allow run.bat and run.sh to pass CLI args to python.
Simplify checks done in run.sh.

* Bootleg connection resumption. 
Probably still busted and shitty, but it's close.

* Fix custom log functions to use stacklevel 2 on windows.
Organize log formats in order of log level number.

* correct stacklevel ...

* Update voice_state_update warning to be more clear.

* Create player is no serialized player exists.  
oops. :)

* Ensure auto playlists actually kick off in non-serialized guild.

* run formatting and tidy up some spam.

* Move auto_pause and availability into MusicPlayer.

* Change status updates to run on disconnect again, also adds an offline status for logout/shutdown.

* Prevent deadlock if exception is thrown in signal handler.

* change guild auto pause handler to wait for connection.

* Update player.py formatting

* Update network test with ICMP ping via sub process call

* Make sure old queue.json does not stop the show.

* Use shutil.which() to get ping binary path.  Tries to catch errors from sys call.

* Make sure shutil also fails gracefully.

* proper 3.8 compatible types should be part of this too.

* Copy over some missing changes.

* Attempt to handle the discord API connection termination.

* Fix backward logic.

* Don't resume an auto-paused player when returning from network outage.

* Fix race condition in unpause check.

* remove entry_added check in favor of check on play

* refactor playlist entry meta and handle auto-playlist expansion of playlist links differently.
also disables extraction logs.
also adds indicator for autoplaylist entries, though none should be enqueued to playlist queue now.

* Try to avoid excessive auto-pause retry when player is being discarded/reconnected.

* Attempt to rejoin on API termination when configured to auto-join.
If auto-join bot is moved, attempt to join old channel instead.

* remove redundant calls to finish_playing event.

* Fix error with rouge player check in disconnect_all_voice_clients

* Now playing messages should not repeat on reconnect.

* fix erroneous logic in last_np_msg content check.

* dyslexic logic strikes again.  gotta love it.

* Add more sanity checks to play-invoked unpause.
Allow unpause check to trigger summon if perms.summonplay is set.

* update self summon to pass message

Added setting lnp in summon, which uses message so we need to pass it in our calls.

* lnp inside of summon cmd

Sets lnp inside the summon command for various instances when it's needed.
A quality of life change surely.

* last_np_msg should actually compare the content of embed and not just the hash in the collection.

I'm an idiot. : )

* Track last played song subject for better control of last now playing message.

* format fix

* Respect queue persist option, and make sure auto-playlist starts without a queue.

---------

Co-authored-by: Snow <135516526+BabyBoySnow@users.noreply.github.com>
  • Loading branch information
itsTheFae and BabyBoySnow authored Apr 4, 2024
1 parent 4823581 commit 7ba155e
Show file tree
Hide file tree
Showing 15 changed files with 1,786 additions and 876 deletions.
4 changes: 1 addition & 3 deletions musicbot/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
from .bot import MusicBot

__all__ = ["MusicBot"]
# Just empty for now...
Loading

0 comments on commit 7ba155e

Please sign in to comment.