- Notifications
You must be signed in to change notification settings - Fork57
A stable and powerful Lavalink client with some best features
License
NotificationsYou must be signed in to change notification settings
parasop/poru
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
note: this version supports only Lavalink v4 or above
# Using npmnpm install poru# Using yarnyarn add poru
To use, you need a configuredLavalink instance.
- Stable client
- Support TypeScript
- 100% Compatible with Lavalink
- Object-oriented
- 100% Customizable
- Easy to setup
- Inbuilt Queue System
- Inbuilt support for Spotify, Apple Music, and Deezer
Note: Send PR to add your repo here
URL | Features | Additional Information |
---|---|---|
Poru Music | Basic example | Works with the latest Discord.js version |
The world machine | See GitHub repo for the full list | - |
Lunox | Look over the repo for the full list of features | Simply powerful Discord Music Bot |
const{ Client, GatewayIntentBits}=require("discord.js");const{ Poru}=require("poru");constnodes=[{name:"local-node",host:"localhost",port:2333,password:"youshallnotpass",},];constPoruOptions={library:"discord.js",defaultPlatform:"scsearch",};constclient=newClient({intents:[GatewayIntentBits.Guilds,GatewayIntentBits.GuildMessages,GatewayIntentBits.GuildVoiceStates,GatewayIntentBits.MessageContent,],});client.poru=newPoru(client,nodes,PoruOptions);client.poru.on("trackStart",(player,track)=>{constchannel=client.channels.cache.get(player.textChannel);returnchannel.send(`Now playing \`${track.info.title}\``);});client.on("ready",()=>{console.log("Ready!");client.poru.init(client);});client.on("interactionCreate",async(interaction)=>{if(!interaction.isChatInputCommand())return;if(!interaction.member.voice.channel){returninteraction.reply({content:`Please connect with a voice channel `,ephemeral:true,});}consttrack=interaction.options.getString("track");constres=awaitclient.poru.resolve({query:track,source:"scsearch",requester:interaction.member});if(res.loadType==="error"){returninteraction.reply("Failed to load track.");}elseif(res.loadType==="empty"){returninteraction.reply("No source found!");}// Create connection with Discord voice channelconstplayer=client.poru.createConnection({guildId:interaction.guild.id,voiceChannel:interaction.member.voice.channelId,textChannel:interaction.channel.id,deaf:true,});if(res.loadType==="playlist"){for(consttrackofres.tracks){track.info.requester=interaction.user;player.queue.add(track);}interaction.reply(`${res.playlistInfo.name} has been loaded with${res.tracks.length}`);}else{consttrack=res.tracks[0];track.info.requester=interaction.user;player.queue.add(track);interaction.reply(`Queued Track \n \`${track.info.title}\``)}if(!player.isPlaying&&player.isConnected)player.play();});client.login("TOKEN");
Note: Open a PR to add your plugin here
Name | Link | Additional Description |
---|---|---|
Poru Spotify | poru-spotify | Plugin for integrating Spotify with Poru |
Poru Deezer | poru-deezer | Plugin for integrating Deezer with Poru |
Poru Apple Music | poru-applemusic | Plugin for integrating Apple Music with Poru |
Feel free to join ourDiscord server. Give us suggestions and advice about errors and new features.
With ❤️ byParas.
About
A stable and powerful Lavalink client with some best features
Resources
License
Stars
Watchers
Forks
Packages0
No packages published