# radio-garden-player

> A Simple and Light Audio Radio Garden Radio Player

Latest version **1.0.0** (published 2022-09-16) · MIT license · 0 weekly downloads

## Install

```sh
npm install radio-garden-player
pnpm add radio-garden-player
yarn add radio-garden-player
bun add radio-garden-player
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2022-09-16 |
| First published | 2022-09-16 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 2.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | AgentHackerYT |
| Maintainers | jenil-dev |
| Keywords | radio-garden, radio, radiogarden, discord, discord.js, player, music, discord-player, light |

## Links

- npm: https://www.npmjs.com/package/radio-garden-player
- npm.io page: https://npm.io/package/radio-garden-player

## Dependencies (1)

- [node-fetch](https://npm.io/package/node-fetch.md) ^2.6.7

## Alternatives

- [@oh-my-pi/pi-natives](https://npm.io/package/@oh-my-pi/pi-natives.md) — 51.8K weekly downloads
- [@capgo/capacitor-light-sensor](https://npm.io/package/@capgo/capacitor-light-sensor.md) — 3.0K weekly downloads
- [@heyhuynhgiabuu/pi-diff](https://npm.io/package/@heyhuynhgiabuu/pi-diff.md) — 492 weekly downloads
- [@lotsa/verdant-lang-asm](https://npm.io/package/@lotsa/verdant-lang-asm.md) — 38 weekly downloads
- [new-era-syntax](https://npm.io/package/new-era-syntax.md) — 20 weekly downloads

## Recent versions

- 1.0.0 (latest) — 2022-09-16

## README

# Radio-Garden-Player
- A Simple, Light Package to play Radio Stations from Radio.Garden
# Functions
- play
```js
const { play } = require('radio-garden-player')

/**
 * @param {String} channelID
*/
play(channelID) // ChannelID Can be found in the url for example mrimG8MM

```
- checkIfValid
<p>Just checks if the radio Channel is valid or not</p>

# Examples
- Discord Bot
```js
const voice = require("@discordjs/voice")
const Discord = require("discord.js")
const client = new Discord.Client({intents: [Discord.GatewayIntentBits.Guilds, Discord.GatewayIntentBits.GuildVoiceStates, Discord.GatewayIntentBits.GuildMessages]})
const { play } = require("radio-garden-player")

client.on("ready", () =>{ 
    console.log("Ready")
})

client.on("messageCreate", async(message) =>{

    if(message.content == "!!play"){

        const connection = voice.joinVoiceChannel({
        "adapterCreator": message.guild.voiceAdapterCreator,
        "guildId": message.guild.id,
        "channelId": message.member.voice.channel.id
        })

        const stream = await play("mrimG8MM")

        const player = voice.createAudioPlayer()

        const resource = voice.createAudioResource(stream)

        player.play(resource)

        connection.subscribe(player)

        message.channel.send({content: "Playing Radio"})

    }
    
})

client.login(token_here)
```

---
_Source: https://npm.io/package/radio-garden-player · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
