With the help of this Snippet, you can create Discord Events right from the comfort of Autocode. No need to manually create an event by going into the server. Change the editable values (as mentioned in the code) and use the prefix in a private channel to make a scheduled Discord event. (Thanks to CesarHvl for helping with the code)
const lib = require('lib')({token: process.env.STDLIB_SECRET_TOKEN});
let result = await lib.discord.scheduledevents['@0.0.1'].create({
guild_id: process.env.GUILD_ID, // required //Edit the values in the ENV variable
name: `😎 | Vibin' w/ Autocode`, // required //You can edit this
description: `How to stay awesome!`, //You can edit this
scheduled_start_time: `2022-08-27T22:00:00+05:30`, // required //follow this format: YYYY-MM-DDTHH:MM:SS+HH:MM or -HH:MM (where +HH:MM or -HH:MM is to modify the event timings relative to UTC)
channel_id: process.env.CHANNEL_ID, //Edit the values in the ENV variable
privacy_level: 'GUILD_MEMBERS',
entity_type: 'VOICE' //set it as "STAGE" for Stage channels events
});