Shows a No-Mic chat when a user joins a VC. To setup just deny the view permission for @everyone (or the role that allows members to see a channel) in your no-mic text channel.
const lib = require('lib')({token: process.env.STDLIB_SECRET_TOKEN});
if (context.params.event.channel_id !== null) {
await lib.discord.channels['@0.2.2'].permissions.update({
overwrite_id: `${context.params.event.member.user.id}`,
channel_id: `${process.env.noMicId}`,
allow: `${1 << 10}`,
type: 1,
});
} else if (context.params.event.channel_id === null) {
await lib.discord.channels['@0.2.2'].permissions.destroy({
overwrite_id: `${context.params.event.member.user.id}`,
channel_id: `${process.env.noMicId}`,
});
}