UNPKG

zoku-fi

Version:

A simple tool to create lofi bot for discord server

19 lines (15 loc) 744 B
const { DisTube } = require("distube"); const { Client, GatewayIntentBits } = require("discord.js"); function LoFi({ token: token, channel: channel }) { const client = new Client({ intents: [GatewayIntentBits.Guilds, GatewayIntentBits.GuildVoiceStates] }); client.player = new DisTube(client, { leaveOnEmpty: false, leaveOnFinish: false, leaveOnStop: false }); client.once("ready", async client => { await console.log(`✨ | ${client.user.tag} ready to sing`); await client.player.play(client.channels.cache.get(channel), "https://youtu.be/jfKfPfyJRdk") .then(async played => { await console.log(`☁️ | ${client.user.tag} already on stage`); }) }); client.login(token); }; module.exports = { LoFi };