A Discord bot built with Discord.js and Deno.
The following environment variables are used in this project:
TOKEN: Discord bot tokenINTENTS: Discord intents as a numberNODE_ENV: Environment mode (development, test, production)
Create a .env file in the root directory with these variables to run the project locally.
To run the project in development mode:
deno task devThis will start the bot with hot reloading enabled.
https://discordjs.guide/voice/audio-player.html#cheat-sheet
let stream = ytdl("myurl", {
filter: "audioonly",
quality: 'highestaudio',
seek: 0
});
const player = createAudioPlayer();
const resource = createAudioResource(stream);
const connection = joinVoiceChannel({
channelId: vc.id,
guildId: vc.guild.id,
adapterCreator: vc.guild.voiceAdapterCreator,
})
player.play(resource);
connection.subscribe(player);