Skip to content

Commit fec4e71

Browse files
committed
Remove hardcoded Google API key
Users will now have to specify their own Google API key that will be used by the bot to fetch data from YouTube. Please visit https://developers.google.com/youtube/v3/getting-started#before-you-start for guidance.
1 parent 8bed5c0 commit fec4e71

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

basicBot.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,7 @@
265265
startupCap: 1, // 1-200
266266
startupVolume: 0, // 0-100
267267
startupEmoji: false, // true or false
268+
googleApiKey: '', // Specify the Google API key that will be used by the bot to fetch data from YouTube. Please visit https://developers.google.com/youtube/v3/getting-started#before-you-start for guidance.
268269
autowoot: true,
269270
autoskip: false,
270271
smartSkip: true,
@@ -1059,7 +1060,7 @@
10591060
var cid = obj.media.cid;
10601061
var naSkip = setTimeout(function() {
10611062
if (format == 1) {
1062-
$.getJSON('https://www.googleapis.com/youtube/v3/videos?id=' + cid + '&key=AIzaSyDcfWu9cGaDnTjPKhg_dy9mUh6H7i4ePZ0&part=snippet&callback=?', function(track) {
1063+
$.getJSON('https://youtube.googleapis.com/youtube/v3/videos?part=snippet&id=' + cid + '&key=' + basicBot.settings.googleApiKey, function(track) {
10631064
if (typeof(track.items[0]) === 'undefined') {
10641065
var name = obj.dj.username;
10651066
API.sendChat(subChat(basicBot.chat.notavailable, {

0 commit comments

Comments
 (0)