3.1.8 • Published 5 months ago

coomwaymp3 v3.1.8

Weekly downloads
-
License
MIT
Repository
github
Last release
5 months ago

coomwaymp3

An NPM module / website designed to return mp3 files / songs created by MasterCoomway.


Support


Installation

npm i coomwaymp3@latest --save


Code Example

const coomwaymp3 = new (require('coomwaymp3'))({ debugMode: true, vileMode: false }); // Keep vileMode disabled
coomwaymp3.init();
const Discord = require('discord.js')
const client = new Discord.Client()

client.on('ready', async () => {
    console.log(`I am ready.`)
});

client.on('message', async message => {

    let deChannel = await client.channels.cache.get('some-channel-id') // Get a voice channel to join and play audio
    let pick = await coomway.randomSong() // Gets position 1 in the array of songs (second listed in array)

    if(message.content.startsWith(`h!test`)) {
        await deChannel.join().then(async connection => {
            // Start playing the file
            const dispatcher = await connection.play(pick); // Pick returns a link to an audio file via cdn.hyperz.dev

            // Wait for the file to finish
            dispatcher.on("finish", async finish => {
                try {
                    // Leave the channel
                    await connection.disconnect();
                    await deChannel.leave(); // Leave the channel after the audio is done playing
                } catch(e) {
                   return console.log(e); // Log any errors
                }
            });
        }).catch(async e => {
            console.log(e) // Log any errors
        });
    }

});

client.login('YOUR_BOT_TOKEN')

LAST UPDATE: 02/14/2025 💘

3.1.8

5 months ago

3.1.3

5 months ago

3.1.2

5 months ago

3.1.1

5 months ago

3.1.0

5 months ago

3.1.7

5 months ago

3.1.6

5 months ago

3.1.5

5 months ago

3.1.4

5 months ago

3.0.2

2 years ago

3.0.1

2 years ago

3.0.0

2 years ago

2.1.0

4 years ago

2.0.9

4 years ago

2.0.8

4 years ago

2.0.5

4 years ago

2.0.7

4 years ago

2.0.6

4 years ago

2.0.4

4 years ago

2.0.3

4 years ago

2.0.2

4 years ago

2.0.1

4 years ago

2.0.0

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago

1.0.9

4 years ago

1.0.8

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago