mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-22 02:37:57 -05:00
[Audio] New stuff from RLL 0.7.0 (#4529)
* New stuff from RLL 0.7.0 * discard here * formatting * do this properly * make it more unique * bump RLL * nuke `[p]llset restport`, only `[p]llset wsport` matters * Update setup.cfg * properly deprecate Rest port and Ensure Nodes are properly closed upon running LLSET commands * restore player on a attempt reconnect * restore player as a task * ensure we send the signal only if not playing. * register events a little earlier * hmmm * ffs * update application.yml * fix permissions edge case
This commit is contained in:
@@ -1,11 +1,12 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import asyncio
|
||||
import datetime
|
||||
|
||||
from abc import ABC, abstractmethod
|
||||
from collections import Counter
|
||||
from pathlib import Path
|
||||
from typing import TYPE_CHECKING, Any, List, Mapping, MutableMapping, Optional, Tuple, Union
|
||||
from typing import Set, TYPE_CHECKING, Any, List, Mapping, MutableMapping, Optional, Tuple, Union
|
||||
|
||||
import aiohttp
|
||||
import discord
|
||||
@@ -57,6 +58,7 @@ class MixinMeta(ABC):
|
||||
_error_counter: Counter
|
||||
|
||||
lavalink_connect_task: Optional[asyncio.Task]
|
||||
_restore_task: Optional[asyncio.Task]
|
||||
player_automated_timer_task: Optional[asyncio.Task]
|
||||
cog_init_task: Optional[asyncio.Task]
|
||||
cog_ready_event: asyncio.Event
|
||||
@@ -64,6 +66,9 @@ class MixinMeta(ABC):
|
||||
_default_lavalink_settings: Mapping
|
||||
permission_cache = discord.Permissions
|
||||
|
||||
_last_ll_update: datetime.datetime
|
||||
_ll_guild_updates: Set[int]
|
||||
|
||||
@abstractmethod
|
||||
async def command_llsetup(self, ctx: commands.Context):
|
||||
raise NotImplementedError()
|
||||
@@ -122,6 +127,12 @@ class MixinMeta(ABC):
|
||||
) -> None:
|
||||
raise NotImplementedError()
|
||||
|
||||
@abstractmethod
|
||||
async def lavalink_update_handler(
|
||||
self, player: lavalink.Player, event_type: lavalink.enums.PlayerState, extra
|
||||
) -> None:
|
||||
raise NotImplementedError()
|
||||
|
||||
@abstractmethod
|
||||
async def _clear_react(
|
||||
self, message: discord.Message, emoji: MutableMapping = None
|
||||
|
||||
Reference in New Issue
Block a user