Compare commits

..

No commits in common. "e9e4febbfaab9f7a3e9c1e324c82b6574444a868" and "d50090281374232baf8132db4b6a1f6b00894251" have entirely different histories.

4 changed files with 1 additions and 43 deletions

View file

@ -92,7 +92,7 @@ async function download(url, interaction) {
let format = 'bestvideo*+bestaudio/best'; let format = 'bestvideo*+bestaudio/best';
const Embed = new MessageEmbed() const Embed = new MessageEmbed()
.setColor(interaction.member ? interaction.member.displayHexColor : 'NAVY') .setColor(interaction.member ? interaction.member.displayHexColor : 'NAVY')
.setAuthor({ name: `Downloaded by ${interaction.member.displayName}`, iconURL: interaction.member.displayAvatarURL(), url: url }) .setAuthor({ text: `Downloaded by ${interaction.member.displayName}`, iconURL: interaction.member.displayAvatarURL(), url: url })
.setFooter({ text: `You can get the original video by clicking on the "Downloaded by ${interaction.member.displayName}" message!` }); .setFooter({ text: `You can get the original video by clicking on the "Downloaded by ${interaction.member.displayName}" message!` });
if (interaction.customId === 'downloadQuality') { if (interaction.customId === 'downloadQuality') {

View file

@ -1,32 +0,0 @@
import { SlashCommandBuilder } from '@discordjs/builders';
import { MessageEmbed } from 'discord.js';
const { feedbackChannelId } = process.env;
export default {
data: new SlashCommandBuilder()
.setName('feedback')
.setDescription('Send a feedback to the developer.')
.addStringOption(option =>
option.setName('feedback')
.setDescription('The message you want to send me.')
.setRequired(true)),
async execute(interaction) {
const Embed = new MessageEmbed()
.setAuthor({ name: `${interaction.member.displayName} (${interaction.member.id})`, iconURL: interaction.member.displayAvatarURL() })
.setTimestamp();
if (interaction.guild) Embed.addField('Guild', `${interaction.guild.name} (${interaction.guild.id})`, true);
Embed.addField('Feedback', interaction.options.getString('feedback'));
// Don't let new account use this command to prevent spam
const date = new Date();
if (interaction.user.createdAt > date.setDate(date.getDate() - 7)) {
return interaction.reply({ content: 'Your account is too new to be able to use this command!', ephemeral: true });
}
const channel = interaction.client.channels.resolve(feedbackChannelId);
channel.send({ embeds: [Embed] });
await interaction.reply({ content: 'Your feedback has been sent! Don\'t forget to have dm open if you want to get an answer from the dev!', ephemeral: true });
},
};

View file

@ -37,14 +37,6 @@ const commands = [
option.setName('url') option.setName('url')
.setDescription('URL of the video you want to convert') .setDescription('URL of the video you want to convert')
.setRequired(true)), .setRequired(true)),
new SlashCommandBuilder()
.setName('feedback')
.setDescription('Send a feedback to the developer.')
.addStringOption(option =>
option.setName('feedback')
.setDescription('The message you want to send me.')
.setRequired(true)),
] ]
.map(command => command.toJSON()); .map(command => command.toJSON());

View file

@ -5,8 +5,6 @@
"main": "index.js", "main": "index.js",
"scripts": { "scripts": {
"start": "node .", "start": "node .",
"deploy": "node deploy-commands.cjs",
"deployGlobally": "node deploy-commands.cjs global",
"lint": "eslint .", "lint": "eslint .",
"lintfix": "eslint . --fix", "lintfix": "eslint . --fix",
"test": "echo \"Error: no test specified\" && exit 1" "test": "echo \"Error: no test specified\" && exit 1"