mirror of
https://github.com/hazemKrimi/discord-bot.git
synced 2026-05-02 02:30:29 +00:00
removed dotenv and fixed bug in play from youtube search
This commit is contained in:
+1
-1
@@ -1,2 +1,2 @@
|
|||||||
node_modules/
|
node_modules/
|
||||||
.env
|
nodemon.json
|
||||||
@@ -145,7 +145,7 @@ module.exports = class Play extends Command {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
const videos = await youtube.searchVideos(query, 1);
|
const videos = await youtube.searchVideos(query, 1);
|
||||||
if (!videos.length === 1) return message.reply('nothing found!');
|
if (videos.length !== 1) return message.reply('nothing found!');
|
||||||
|
|
||||||
const video = await youtube.getVideoByID(videos[0].raw.id.videoId);
|
const video = await youtube.getVideoByID(videos[0].raw.id.videoId);
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
require('dotenv').config();
|
|
||||||
|
|
||||||
const { CommandoClient } = require('discord.js-commando');
|
const { CommandoClient } = require('discord.js-commando');
|
||||||
const { Structures } = require('discord.js');
|
const { Structures } = require('discord.js');
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
|
|||||||
Generated
-5
@@ -489,11 +489,6 @@
|
|||||||
"require-all": "^3.0.0"
|
"require-all": "^3.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"dotenv": {
|
|
||||||
"version": "8.2.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/dotenv/-/dotenv-8.2.0.tgz",
|
|
||||||
"integrity": "sha512-8sJ78ElpbDJBHNeBzUbUVLsqKdccaa/BXF1uPTw3GrvQTBgrQrtObr2mUrE38vzYd8cEv+m/JBfDLioYcfXoaw=="
|
|
||||||
},
|
|
||||||
"end-of-stream": {
|
"end-of-stream": {
|
||||||
"version": "1.4.4",
|
"version": "1.4.4",
|
||||||
"resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz",
|
"resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz",
|
||||||
|
|||||||
@@ -21,7 +21,6 @@
|
|||||||
"@discordjs/opus": "^0.2.1",
|
"@discordjs/opus": "^0.2.1",
|
||||||
"discord.js": "^12.2.0",
|
"discord.js": "^12.2.0",
|
||||||
"discord.js-commando": "github:discordjs/Commando",
|
"discord.js-commando": "github:discordjs/Commando",
|
||||||
"dotenv": "^8.2.0",
|
|
||||||
"puppeteer": "^3.0.2",
|
"puppeteer": "^3.0.2",
|
||||||
"simple-youtube-api": "^5.2.1",
|
"simple-youtube-api": "^5.2.1",
|
||||||
"sodium": "^3.0.2",
|
"sodium": "^3.0.2",
|
||||||
|
|||||||
Reference in New Issue
Block a user