wrzucamy śmietnik :DDDD

This commit is contained in:
Szprink 2025-08-12 18:39:05 +02:00
parent 6d3524eed5
commit cded4e036a
10 changed files with 2296 additions and 0 deletions

23
commands/yt.js Normal file
View file

@ -0,0 +1,23 @@
const config = require('../config.json')
const YouTube = require('simple-youtube-api')
const youtube = new YouTube(config.youtube.token)
module.exports = {
data: {
"name": 'yt',
"usage": '<query>',
"description": 'Search for YouTube videos.'
},
async execute(event, bot) {
let query = event.message.split(`${bot.prefix}yt `)[1]
if (!query) {
event.reply(`Usage: ${bot.prefix}yt <query>`)
} else {
youtube.searchVideos(query, 1)
.then(results => {
if (!results[0]) return event.reply("Sorry, couldn't find anything...")
event.reply(results[0].url)
})
}
}
}