mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-23 11:13:51 -05:00
I promise I'm not doing this on purpose (#4565)
* Prep for 0.7.2 * So What di i do here? I done Magic, magic only found in the tales of old. * turns out formatting is something important * fixes * improved Error handling when Global API is enabled * further improve resuming logic * more of dat dark voodoo blood magic * major tweaks to auto restore when auto play is enabled 👀 * fix duplicated "Auto play stated." message + Auto play restart :feelsgoodman: * missed these * fix the new duplicated fucking message bitch. * Let discord handle player reconnects * eh * `Requires force install`, utilize new Exponential Backoff object on player and safer reconnect logic, emulating d.py and WL. * hmmmmm gotta monitor * mother fucking brackets * Why didnt i consider this the first time????????????? * new error code to handle? * soooooooooooooooo these are import so why arent we ensuring they are set. * improved logging * improved logging * aaaaaaaaaaaaaaa * We need our own error and special handling to not conflict with dpy * (Last Known Bug) Fix the infinite loop of 4006 that sometimes could happen as an edge case after a successful resume. * This will require a force reinstall to install `RLL 0.8.0`, this properly fixes the bug mentioned on the previous commit. * address "Localtrack names/paths need to be escaped." comment * address Fixators crash mentioned in #AT * style * fix preda's crash mentioned in PR * add a thing here add a thing there add a thing everywhere * style * fixes here, fixes there, and backbone for curated playlist. * bypass aiohttp and githubs and cloudflare and yo mammas cache * I propose the new style is no style. * allow curated playlist to be updated it `[p]playlist update` and show the diff * fix `[p]summon` not resuming playback until next track. * Hopefully handle predas rate limits. * what else did i break now * Update Lavalink.jar build * lets try this * reset the queue * Bring Edge commits over fix a bunch of shiz again * Bring Edge commits over fix a bunch of shiz again * Handle 4014 OPs, Change `skip_votes` key to be an int rather than guild object * aaaaaaaaaaaaaaa im dumb * ... * Simplify some shiz + use a set instead of a list for votes. Co-authored-by: aikaterna <20862007+aikaterna@users.noreply.github.com>
This commit is contained in:
@@ -4,7 +4,7 @@ import asyncio
|
||||
import datetime
|
||||
|
||||
from abc import ABC, abstractmethod
|
||||
from collections import Counter
|
||||
from collections import Counter, defaultdict
|
||||
from pathlib import Path
|
||||
from typing import Set, TYPE_CHECKING, Any, List, Mapping, MutableMapping, Optional, Tuple, Union
|
||||
|
||||
@@ -41,7 +41,7 @@ class MixinMeta(ABC):
|
||||
db_conn: Optional[APSWConnectionWrapper]
|
||||
session: aiohttp.ClientSession
|
||||
|
||||
skip_votes: MutableMapping[int, List[int]]
|
||||
skip_votes: MutableMapping[int, Set[int]]
|
||||
play_lock: MutableMapping[int, bool]
|
||||
_daily_playlist_cache: MutableMapping[int, bool]
|
||||
_daily_global_playlist_cache: MutableMapping[int, bool]
|
||||
@@ -62,12 +62,14 @@ class MixinMeta(ABC):
|
||||
player_automated_timer_task: Optional[asyncio.Task]
|
||||
cog_init_task: Optional[asyncio.Task]
|
||||
cog_ready_event: asyncio.Event
|
||||
|
||||
_ws_resume: defaultdict[Any, asyncio.Event]
|
||||
_ws_op_codes: defaultdict[int, asyncio.LifoQueue]
|
||||
_default_lavalink_settings: Mapping
|
||||
permission_cache = discord.Permissions
|
||||
|
||||
_last_ll_update: datetime.datetime
|
||||
_ll_guild_updates: Set[int]
|
||||
_diconnected_shard: Set[int]
|
||||
|
||||
@abstractmethod
|
||||
async def command_llsetup(self, ctx: commands.Context):
|
||||
@@ -306,6 +308,14 @@ class MixinMeta(ABC):
|
||||
async def _playlist_check(self, ctx: commands.Context) -> bool:
|
||||
raise NotImplementedError()
|
||||
|
||||
@abstractmethod
|
||||
async def _build_bundled_playlist(self, forced: bool = None) -> None:
|
||||
raise NotImplementedError()
|
||||
|
||||
@abstractmethod
|
||||
def decode_track(self, track: str, decode_errors: str = "") -> MutableMapping:
|
||||
raise NotImplementedError()
|
||||
|
||||
@abstractmethod
|
||||
async def can_manage_playlist(
|
||||
self, scope: str, playlist: "Playlist", ctx: commands.Context, user, guild
|
||||
|
||||
Reference in New Issue
Block a user