add(helpers): connectToVoiceChannel() (#1048)

* feat(helpers): add joinVoiceChannel() helper

* Remove if-statement validating if channelId is present or not

* refactor(helpers): use snakelize()

* Rename to connectToVoiceChannel()

Co-authored-by: ITOH <to@itoh.at>

* Require VIEW_CHANNEL permission including CONNECT

Co-authored-by: ITOH <to@itoh.at>

* Change default value of third argument to {}

* Remove usage of Partial and mark options as optional

* Default selfDeaf to true by default

* .

* Add connectToVoiceChannel() to helpers module

* docs(helpers): add jsdoc block to connectToVoiceChannel()

* Use AtLeastOne type for options

* Default value for selfMute option

* Update src/helpers/voice/connect_to_voice_channel.ts

Co-authored-by: ITOH <to@itoh.at>

Co-authored-by: ITOH <to@itoh.at>
This commit is contained in:
rigormorrtiss
2021-06-16 23:02:21 +04:00
committed by GitHub
parent d5ea8904b9
commit ddf5d9f490
4 changed files with 34 additions and 0 deletions
+4
View File
@@ -134,6 +134,7 @@ import { updateStageInstance } from "./channels/update_stage_instance.ts";
import { getStageInstance } from "./channels/get_stage_instance.ts";
import { deleteStageInstance } from "./channels/delete_stage_instance.ts";
import { isSlashCommand } from "./type_guards/is_slash_command.ts";
import { connectToVoiceChannel } from "./voice/connect_to_voice_channel.ts";
export {
addDiscoverySubcategory,
@@ -146,6 +147,7 @@ export {
batchEditSlashCommandPermissions,
categoryChildren,
channelOverwriteHasPermission,
connectToVoiceChannel,
createChannel,
createEmoji,
createGuild,
@@ -407,6 +409,8 @@ export let helpers = {
getGuildTemplates,
getTemplate,
syncGuildTemplate,
// voice
connectToVoiceChannel,
// webhooks
createWebhook,
deleteWebhookMessage,