Update pool.py
This commit is contained in:
parent
96eeab3eec
commit
5101dd169e
|
|
@ -1,15 +1,14 @@
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
import asyncio
|
import asyncio
|
||||||
import json
|
import json
|
||||||
import random
|
import random
|
||||||
import re
|
import re
|
||||||
|
import aiohttp
|
||||||
from typing import Dict, Optional, TYPE_CHECKING
|
from typing import Dict, Optional, TYPE_CHECKING
|
||||||
from urllib.parse import quote
|
from urllib.parse import quote
|
||||||
|
|
||||||
import aiohttp
|
from discord import Client
|
||||||
from discord import Client, VoiceRegion
|
from discord.ext.commands import Context
|
||||||
from discord.ext import commands
|
|
||||||
|
|
||||||
|
|
||||||
from . import (
|
from . import (
|
||||||
|
|
@ -28,7 +27,7 @@ from .exceptions import (
|
||||||
TrackLoadError
|
TrackLoadError
|
||||||
)
|
)
|
||||||
from .objects import Playlist, Track
|
from .objects import Playlist, Track
|
||||||
from .utils import ExponentialBackoff, NodeStats, Ping
|
from .utils import ExponentialBackoff, NodeStats, Ping, VoiceRegion
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from .player import Player
|
from .player import Player
|
||||||
|
|
@ -265,7 +264,7 @@ class Node:
|
||||||
async def build_track(
|
async def build_track(
|
||||||
self,
|
self,
|
||||||
identifier: str,
|
identifier: str,
|
||||||
ctx: Optional[commands.Context] = None
|
ctx: Optional[Context] = None
|
||||||
) -> Track:
|
) -> Track:
|
||||||
"""
|
"""
|
||||||
Builds a track using a valid track identifier
|
Builds a track using a valid track identifier
|
||||||
|
|
@ -291,7 +290,7 @@ class Node:
|
||||||
self,
|
self,
|
||||||
query: str,
|
query: str,
|
||||||
*,
|
*,
|
||||||
ctx: Optional[commands.Context] = None,
|
ctx: Optional[Context] = None,
|
||||||
search_type: SearchType = SearchType.ytsearch
|
search_type: SearchType = SearchType.ytsearch
|
||||||
):
|
):
|
||||||
"""Fetches tracks from the node's REST api to parse into Lavalink.
|
"""Fetches tracks from the node's REST api to parse into Lavalink.
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue