Update pool.py

This commit is contained in:
MiroslavRosenov 2022-03-07 11:17:59 +02:00 committed by GitHub
parent 96eeab3eec
commit 5101dd169e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 7 deletions

View File

@ -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.