2.2.1 • Published 4 years ago

discord-voice-channel-observer v2.2.1

Weekly downloads
1
License
ISC
Repository
-
Last release
4 years ago

Discord VoiceChannel Observer

A small library to watch a discord voice channel is empty or not

Usage

import * as Discord from 'discord.js';
import { VoiceChannelObserver } from 'discord-voice-channel-observer';

const token = '***********************';
const voiceChannelId = '****************';

(async() => {
    const client = new Discord.Client();
    await client.login(token);

    const observer = new VoiceChannelObserver(client, voiceChannelId);
    observer.onEmpty((channelId: string) => {
        console.log(`empty: ${channelId}`)
    })
    observer.onNotEmpty((channelId: string) => {
        console.log(`not empty: ${channelId}`)
    })
})()
2.2.1

4 years ago

2.2.0

4 years ago

2.1.0

4 years ago

2.0.1

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago