From b2481e5c5ab3f7160681f95c14eb1ca36f47517a Mon Sep 17 00:00:00 2001 From: Deivu Date: Mon, 13 Nov 2023 20:24:23 +0800 Subject: [PATCH] fix: update docs --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 7ccb45f8..d3247aba 100644 --- a/README.md +++ b/README.md @@ -117,14 +117,14 @@ await player.update({ ...playerOptions }); > Setting a custom get node ideal function ```js +const shoukaku = new Shoukaku(new Connectors.DiscordJS(client), [{...yourNodeOptions}], { + ...yourShoukakuOptions, + nodeResolver: (nodes, connection) => getYourIdealNode(nodes, connection) +}); const player = await shoukaku.joinVoiceChannel({ guildId: 'your_guild_id', channelId: 'your_channel_id', - shardId: 0, - getNode: (nodes, connection) => { - nodes = [ ...nodes.values() ]; - return nodes.find(node => node.group === connection.region); - } + shardId: 0 }); ```