Mee6discord przygotowania
This commit is contained in:
0
src/cmds/batch.js
Normal file
0
src/cmds/batch.js
Normal file
6
src/cmds/odznaki.js
Normal file
6
src/cmds/odznaki.js
Normal file
@@ -0,0 +1,6 @@
|
||||
module.exports = {
|
||||
name: "odznaki",
|
||||
execute(cl, msg) {
|
||||
|
||||
},
|
||||
};
|
||||
@@ -1,18 +1,18 @@
|
||||
module.exports = {
|
||||
name: 'ping',
|
||||
execute(cl, msg) {
|
||||
const embed = {
|
||||
color: cl.cfg.hexBlue,
|
||||
timestamp: new Date(),
|
||||
footer: {
|
||||
text: `Komenda wywołana przez ${msg.author.tag}`,
|
||||
icon_url: cl.cfg.iconurl,
|
||||
},
|
||||
title: 'Pong!',
|
||||
description: `Ping jednostronny wynosi ${
|
||||
Date.now() - msg.createdTimestamp
|
||||
}ms.`,
|
||||
};
|
||||
msg.channel.send({ embeds: [embed] });
|
||||
},
|
||||
name: "ping",
|
||||
execute(cl, msg) {
|
||||
const embed = {
|
||||
color: cl.cfg.hexBlue,
|
||||
timestamp: new Date(),
|
||||
footer: {
|
||||
text: `Komenda wywołana przez ${msg.author.tag}`,
|
||||
icon_url: cl.cfg.iconurl,
|
||||
},
|
||||
title: "Pong!",
|
||||
description: `Ping jednostronny wynosi ${
|
||||
Date.now() - msg.createdTimestamp
|
||||
}ms.`,
|
||||
};
|
||||
msg.channel.send({ embeds: [embed] });
|
||||
},
|
||||
};
|
||||
|
||||
@@ -1,50 +0,0 @@
|
||||
module.exports = {
|
||||
name: 'play',
|
||||
execute(cl, msg, args) {
|
||||
const ytdl = require('ytdl-core');
|
||||
const ytsr = require('ytsr');
|
||||
const path = require('path');
|
||||
const discord = require('discord.js');
|
||||
const fs = require('fs')
|
||||
const { joinVoiceChannel, createAudioPlayer, createAudioResource } = require('@discordjs/voice');
|
||||
let connection;
|
||||
let aplay;
|
||||
let queue;
|
||||
|
||||
function link(msg) {
|
||||
let request = msg.content.slice(path.basename(__filename).length + cl.cfg.prefix.length - 3);
|
||||
if (request.trim() == "") {
|
||||
msg.reply("Dej link albo tagi albo weź i spierdalaj");
|
||||
} else if (request.trim().startsWith("https")) {
|
||||
request = request.trim()
|
||||
if (ytdl.validateURL(request)) {
|
||||
msg.reply("Poprawny link");
|
||||
let linked = './sound/' + msg.member.voice.channel.id + '.mp4'
|
||||
ytdl(request).pipe(fs.createWriteStream(linked));
|
||||
return linked;
|
||||
} else {
|
||||
msg.reply("Kurwo wenecka daj prawdziwy link a nie jaja sobie robisz");
|
||||
}
|
||||
} else {
|
||||
msg.reply("Szukasz:" + request);
|
||||
|
||||
}
|
||||
}
|
||||
if (!connection) {
|
||||
let vChannel = msg.member.voice.channel;
|
||||
connection = joinVoiceChannel({
|
||||
channelId: vChannel.id,
|
||||
guildId: vChannel.guild.id,
|
||||
adapterCreator: vChannel.guild.voiceAdapterCreator,
|
||||
})
|
||||
}
|
||||
aplay = createAudioPlayer();
|
||||
link(msg);
|
||||
let song = createAudioResource('./sound/' + msg.member.voice.channel.id + '.mp4');
|
||||
aplay.play(song);
|
||||
connection.subscribe(aplay);
|
||||
aplay.on('error', error => {
|
||||
console.error(error);
|
||||
});
|
||||
}
|
||||
}
|
||||
4
src/cmds/profil.js
Normal file
4
src/cmds/profil.js
Normal file
@@ -0,0 +1,4 @@
|
||||
module.exports = {
|
||||
name: "profil",
|
||||
execute(cl, msg) {},
|
||||
};
|
||||
4
src/cmds/ranking.js
Normal file
4
src/cmds/ranking.js
Normal file
@@ -0,0 +1,4 @@
|
||||
module.exports = {
|
||||
name: "ranking",
|
||||
execute(cl, msg) {},
|
||||
};
|
||||
Reference in New Issue
Block a user