From 59a716202a15e9727df68e210e36e77b0d42972f Mon Sep 17 00:00:00 2001 From: Krashly Date: Thu, 15 Dec 2022 19:09:39 +0300 Subject: [PATCH 1/2] Dancing Knight Throws a video with a dancing knight into the chat on command /knight. --- commands/knight/about.json | 15 +++++++++++++++ commands/knight/index.js | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 51 insertions(+) create mode 100644 commands/knight/about.json create mode 100644 commands/knight/index.js 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..0f5ccd4 --- /dev/null +++ b/commands/knight/index.js @@ -0,0 +1,36 @@ +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'); + +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: 'https://cdn.discordapp.com/attachments/840321892136255528/1042826882174955550/outputcompress-video-online.com.mp4' }); + } + + /** + * Функция обработки slash-команды. + * @param {CommandInteraction} int + */ + async slash (int) { + await this.call(int); + } +} + +module.exports = Knight; From 432430257d31b41dc291d710e8da1431ae2b3893 Mon Sep 17 00:00:00 2001 From: Krashly Date: Fri, 19 May 2023 23:19:18 +0300 Subject: [PATCH 2/2] =?UTF-8?q?=D0=AF=20=D1=81=D0=B4=D0=B5=D0=BB=D0=B0?= =?UTF-8?q?=D0=BB=20=D0=BA=D0=BE=D0=BD=D1=81=D1=82=D0=B0=D0=BD=D1=82=D1=83?= =?UTF-8?q?=20=D1=81=D0=BF=D1=83=D1=81=D1=82=D1=8F=20=D0=BC=D0=B8=D0=BB?= =?UTF-8?q?=D0=BB=D0=B8=D0=BE=D0=BD=20=D0=BB=D0=B5=D1=82,=20=D0=BD=D0=B5?= =?UTF-8?q?=20=D1=81=D1=83=D1=82=D1=8C=20=D0=B2=D0=B0=D0=B6=D0=BD=D0=BE.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Руся, мерджи. --- commands/knight/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/commands/knight/index.js b/commands/knight/index.js index 0f5ccd4..9ade61d 100644 --- a/commands/knight/index.js +++ b/commands/knight/index.js @@ -3,6 +3,7 @@ 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 { @@ -21,7 +22,7 @@ class Knight extends BaseCommand { } async call (int) { - await int.reply({ content: 'https://cdn.discordapp.com/attachments/840321892136255528/1042826882174955550/outputcompress-video-online.com.mp4' }); + await int.reply({ content: LinkToVideo }); } /**