# dsm-14

> Упрощение для Djs которое не является контруктором по типу aoi.js

Latest version **0.6.1** (published 2022-09-24) · ISC license · 0 weekly downloads

## Install

```sh
npm install dsm-14
pnpm add dsm-14
yarn add dsm-14
bun add dsm-14
```

## Health

**Score 30/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.6.1 |
| Published | 2022-09-24 |
| First published | 2022-09-09 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 14 |
| Unpacked size | 52.2 KB |
| Known vulnerabilities | 0 (+24 in 2 direct dependencies) |
| Install scripts | no |
| Author | Lendory |
| Maintainers | lendory |

## Links

- npm: https://www.npmjs.com/package/dsm-14
- npm.io page: https://npm.io/package/dsm-14

## Dependencies (14)

- [url](https://npm.io/package/url.md) ^0.11.0
- [glob](https://npm.io/package/glob.md) ^8.0.3
- [path](https://npm.io/package/path.md) ^0.12.7
- [axios](https://npm.io/package/axios.md) ^0.27.2
- [ffmpeg](https://npm.io/package/ffmpeg.md) ^0.0.4
- [module](https://npm.io/package/module.md) ^1.2.5
- [consola](https://npm.io/package/consola.md) ^2.15.3
- [quick.db](https://npm.io/package/quick.db.md) ^9.0.6
- [discord.js](https://npm.io/package/discord.js.md) ^14.3.0
- [ffmpeg-static](https://npm.io/package/ffmpeg-static.md) ^5.1.0
- [better-sqlite3](https://npm.io/package/better-sqlite3.md) ^7.6.2
- [@discordjs/opus](https://npm.io/package/@discordjs/opus.md) ^0.8.0
- [isomorphic-unfetch](https://npm.io/package/isomorphic-unfetch.md) ^3.1.0
- [discord-music-player](https://npm.io/package/discord-music-player.md) ^9.1.1

## Recent versions

- 0.6.1 (latest) — 2022-09-24
- 0.6.0 — 2022-09-24
- 0.5.0 — 2022-09-19
- 0.4.0 — 2022-09-14
- 0.3.0 — 2022-09-11
- 0.2.3 — 2022-09-11
- 0.2.2 — 2022-09-11
- 0.2.1 — 2022-09-11
- 0.2.0 — 2022-09-10
- 0.1.3 — 2022-09-10
- 0.1.2 — 2022-09-10
- 0.1.1 — 2022-09-10
- 0.1.0 — 2022-09-10
- 0.0.2 — 2022-09-09
- 0.0.1 — 2022-09-09

## README

# Привет, это dsm-14 (Discord-Smart v14)
## Создание бота
> Создаем файл index.js и прописываем туда
```js
// Импорт нужный классов для создания бота и команд
import { Bot, Database } from 'dsm-14'

// Создание базы данных и бота
const database = new Database()
const bot = new Bot({
    prefix: "PREFIX",
    token: "TOKEN",
    intents: 131071,
    db: database
})

// Создание команд для бота

// Префиксная команда
bot.command({
    name: "command",
    async execute(bot, message, args) {
        message.reply("Привет мир!")
    }
})

// Слэш команда
bot.slashCommand({
    name: "command",
    description: "Привет мир!",
    async execute(interaction, bot) {
        interaction.reply("Привет мир!")
    }
})
```

# Пример музыки

```js

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(`Добавил в очередь! \nНазвание: ${info.name}\nАвтор: ${info.author}\nДлина: ${info.duration}`)
    } catch(e) {
      message.reply(`${e.message}`)
    }
  }
})

```

---
_Source: https://npm.io/package/dsm-14 · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
