Forgot to add Spotify credential arguments in create_node
This commit is contained in:
parent
53a4576025
commit
1319af5b5b
|
|
@ -4,6 +4,7 @@ import random
|
||||||
|
|
||||||
from . import exceptions
|
from . import exceptions
|
||||||
from .node import Node
|
from .node import Node
|
||||||
|
from typing import Optional
|
||||||
|
|
||||||
from discord.ext import commands
|
from discord.ext import commands
|
||||||
|
|
||||||
|
|
@ -35,12 +36,12 @@ class NodePool:
|
||||||
return available_nodes.get(identifier, None)
|
return available_nodes.get(identifier, None)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
async def create_node(self, bot: typing.Union[commands.Bot, discord.Client, commands.AutoShardedBot, discord.AutoShardedClient], host: str, port: str, password: str, identifier: str) -> Node:
|
async def create_node(self, bot: typing.Union[commands.Bot, discord.Client, commands.AutoShardedBot, discord.AutoShardedClient], host: str, port: str, password: str, identifier: str, spotify_client_id: Optional[str], spotify_client_secret: Optional[str]) -> Node:
|
||||||
"""Creates a Node object to be then added into the node pool. If you like to have Spotify searching capabilites, pass in valid Spotify API credentials."""
|
"""Creates a Node object to be then added into the node pool. If you like to have Spotify searching capabilites, pass in valid Spotify API credentials."""
|
||||||
if identifier in self._nodes.keys():
|
if identifier in self._nodes.keys():
|
||||||
raise exceptions.NodeCreationError(f"A node with identifier '{identifier}' already exists.")
|
raise exceptions.NodeCreationError(f"A node with identifier '{identifier}' already exists.")
|
||||||
|
|
||||||
node = Node(pool=self, bot=bot, host=host, port=port, password=password, identifier=identifier)
|
node = Node(pool=self, bot=bot, host=host, port=port, password=password, identifier=identifier, spotify_client_id=spotify_client_id, spotify_client_secret=spotify_client_secret)
|
||||||
await node.connect()
|
await node.connect()
|
||||||
self._nodes[node._identifier] = node
|
self._nodes[node._identifier] = node
|
||||||
return node
|
return node
|
||||||
|
|
|
||||||
2
setup.py
2
setup.py
|
|
@ -7,7 +7,7 @@ with open("README.md") as f:
|
||||||
setuptools.setup(
|
setuptools.setup(
|
||||||
name="pomice",
|
name="pomice",
|
||||||
author="cloudwithax",
|
author="cloudwithax",
|
||||||
version="1.0.3",
|
version="1.0.3.1",
|
||||||
url="https://github.com/cloudwithax/pomice",
|
url="https://github.com/cloudwithax/pomice",
|
||||||
packages=setuptools.find_packages(),
|
packages=setuptools.find_packages(),
|
||||||
license="GPL",
|
license="GPL",
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue