diff --git a/commands/knight/about.json b/commands/knight/about.json new file mode 100644 index 0000000..47a0a7a --- /dev/null +++ b/commands/knight/about.json @@ -0,0 +1,15 @@ +{ + + "title": { + "ru": "Выпустить Рыцаря", + "en": "Release Knight", + "uk": "Висрати Лицаря" + }, + + "description": { + "ru": "Кидает в чат видео с танцующим рыцарем.", + "en": "Throws a video with a dancing knight into the chat.", + "uk": "Кидає в чат відео з рицарем, що танцює." + } + +} diff --git a/commands/knight/index.js b/commands/knight/index.js new file mode 100644 index 0000000..9ade61d --- /dev/null +++ b/commands/knight/index.js @@ -0,0 +1,37 @@ +const SlashOptions = require('../../BaseClasses/SlashOptions'); +const BaseCommand = require('../../BaseClasses/BaseCommand'); +const LangSingle = require('../../BaseClasses/LangSingle'); +const { CommandInteraction } = require('discord.js'); +const { title, description } = require('./about.json'); +const LinkToVideo = 'https://cdn.discordapp.com/attachments/840321892136255528/1042826882174955550/outputcompress-video-online.com.mp4'; + +class Knight extends BaseCommand { + + constructor (path) { + super(path); + + this.category = 'Развлечения'; + this.name = 'knight'; + this.title = new LangSingle(title); + this.description = new LangSingle(description); + this.slashOptions = slashOptions; + + return new Promise(async resolve => { + resolve(this); + }); + } + + async call (int) { + await int.reply({ content: LinkToVideo }); + } + + /** + * Функция обработки slash-команды. + * @param {CommandInteraction} int + */ + async slash (int) { + await this.call(int); + } +} + +module.exports = Knight;