3.2.1 • Published 30 days ago

@hunteroi/discord-temp-channels v3.2.1

Weekly downloads
10
License
MIT
Repository
github
Last release
30 days ago

Discord Temporary Voice Channels

This library works the same way its parent does (see discord-temp-channels of Androz2091) except that it brings a few new features:

  • more events like voiceChannelCreate and 4 more
  • give the temporary channels' owner the MANAGE_CHANNELS permission on them
  • give more permissions to users/roles when channels are created (via registered parent options)
  • auto-prefix renamed temporary channels if the prefix is missing
  • reload temporary channels in memory in case the bot restarts while the feature is being used
  • Source code embedded documentation with JSDoc

IMAGE

See ./examples/index.js and ./examples/index2.js.

Prerequisites ⚠️

Starting at v2.0.0, you must use NodeJS v16.6.0 or higher to run a bot with this library.

You also must not forget to include mandatory intents as well as give your bot the rights to use application commands.

Mandatory intents

  • GUILD_VOICE_STATE: used to detect guild members voice state updates (when someone joins a voice channel, leaves or changes from one to another, ...).
  • GUILDS: used to recover from possible crashes of your bot (detects and reconstructs the temporary channels list and deletes them if necessary).

Installation

npm install --save @hunteroi/discord-temp-channels

Events

manager.on(
  TempChannelsManagerEvents.channelRegister,
  (parent: ParentChannelData) => {}
);

manager.on(
  TempChannelsManagerEvents.channelUnregister,
  (parent: ParentChannelData) => {}
);

manager.on(
  TempChannelsManagerEvents.childAdd,
  (
    child: ChildChannelData,
    parent: ParentChannelData
  ) => {}
);

manager.on(
  TempChannelsManagerEvents.childRemove,
  (
    child: ChildChannelData,
    parent: ParentChannelData
  ) => {}
);

manager.on(
  TempChannelsManagerEvents.childPrefixChange,
  (child: ChildChannelData) => {}
);

manager.on(
  TempChannelsManagerEvents.error,
  (error: Error | null, message: string) => {}
);

Contribution

Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.

  1. Fork the Project
  2. Create your Branch: git checkout -b patch/YourAmazingWork
  3. Commit your Changes: git commit -m 'Add some amazing work'
  4. Push to the Branch: git push origin patch/YourAmazingWork
  5. Open a Pull Request

Credits

Thanks to Androz2091 for their initial package. This package is a fork of their own work. Check them out!

3.2.1

30 days ago

3.2.0

1 year ago

3.1.0

1 year ago

3.0.0

2 years ago

3.0.0-alpha

2 years ago

2.1.1

2 years ago

2.1.0

3 years ago

2.0.0

3 years ago

1.2.0

3 years ago

1.1.0

3 years ago

1.0.2

3 years ago

1.0.2-alpha

3 years ago

1.0.0

3 years ago