This snippet will help your bot send a message containing date time whenever someone joined/left the specified voice channel. See comments in the code for guide.
const lib = require('lib')({token: process.env.STDLIB_SECRET_TOKEN});
const LOG_CHANNEL_ID = `LOG_CHANNEL_ID`; //Channel ID where logs will be posted.
const VOICE_CHANNEL_ID = `VOICE_CHANNEL_ID`; // Voice channel ID
const time = Math.floor(new Date().getTime() / 1000);
let action = `left`;
if (context.params.event.channel_id == VOICE_CHANNEL_ID) {
action = `joined`;
}
await lib.discord.channels['@0.3.2'].messages.create({
channel_id: `${LOG_CHANNEL_ID}`,
content: `<@${context.params.event.member.user.id}> ${action} <#${VOICE_CHANNEL_ID}>.\n`,
});