0.0.3 • Published 1 year ago

mncord v0.0.3

Weekly downloads
-
License
ISC
Repository
-
Last release
1 year ago

About

mncord - simplification for Djs that is not a constructor by type aoi.js

Installation

$ npm init
$ npm i mncord

In package.json write this:

"type": "module"

Examples

Base:

const database = new Database()
const bot = new Bot({
    prefix: "PREFIX",
    token: "TOKEN",
    intents: 131071,
    db: database
})


//prefix
bot.command({
    name: "command",
    async execute(bot, message, args) {
        message.reply("Hello world")
    }
})


bot.slashCommand({
    name: "command",
    description: "Hello world!",
    async execute(interaction, bot) {
        interaction.reply("Hello world!")
    }
})

Music:

bot.music = new MusicClient(bot, {
  defeanOnJoin: true,
  leaveOnEnd: true,
  leaveOnEmpty: false
})

bot.command({
  name: "play",
  async execute(bot, message, args) {
    let queue = bot.music.createQueue(message.guild.id);
    try {
      const info = await bot.music.playSong({
        queue: queue,
        songName: args.join(" "),
        voiceChannelId: message.member.voice.channel,
        requestedBy: message.author.tag,
        guildId: message.guild.id
      })
      message.reply(`Added to the queue! \nNamе: ${info.name}\nAuthor: ${info.author}\nDuration: ${info.duration}`)
    } catch(e) {
      message.reply(`${e.message}`)
    }
  }
})

And...

mncord does not have all djs functions, if you need to take even from there

Useful links

Docs - coming soon

Support server - coming soon