kylerchin / adorabot

Avoid using console in code that runs on browser JS-0002
Bug risk
Major
215 occurrences in this check
Avoid using console in code that runs on the browser
82                        })];
83                case 1:
84                    _a.sent();
85                    console.log(statuses);86                    return [2 /*return*/];
87            }
88        });
Avoid using console in code that runs on the browser
72                                }
73                                else {
74                                    statuses[category + keyIndex] = "No items found";
75                                    console.log(body);76                                }
77                                return [2 /*return*/];
78                            });
Avoid using console in code that runs on the browser
67                                    }
68                                    else {
69                                        statuses[category + keyIndex] = "No stats";
70                                        console.log(body);71                                    }
72                                }
73                                else {
Avoid using console in code that runs on the browser
63                                if (body.items) {
64                                    if (body.items[0].statistics) {
65                                        statuses[category + keyIndex] = "Success";
66                                        console.log(body);67                                    }
68                                    else {
69                                        statuses[category + keyIndex] = "No stats";
Avoid using console in code that runs on the browser
11    } 
12    } 
13     
14    console.log(precurser) 15    return precurser; 
16} 
17 
Avoid using console in code that runs on the browser
 1function convertUrlToVideoId(ytquery) { 
 2    if (ytquery.match(/youtube.com\/shorts\//g)) { 
 3        console.log('match')  4        var precurser = ytquery.replace("?feature=share","").replace(/youtube.com\/shorts\//g, "youtube.com/watch?v=") 
 5    } else { 
 6             // Valid url 
Avoid using console in code that runs on the browser
 4var client = new Discord.Client({ intents: Discord.Intents.NON_PRIVILEGED, retryLimit: Infinity});
 5
 6client.on('ready', () => {
 7  console.log(`Logged in as ${client.user.tag}!`); 8});
 9
10client.on('message', msg => {
Avoid using console in code that runs on the browser
11
12        addVideoToTrackList(row.videoid,video.title)
13
14        console.log("added " + video.title)15    })
16   
17})
Avoid using console in code that runs on the browser
35 
36        if (!success) { 
37            console.log(err) 
38            console.log(body) 39        } 
40    }) 
41})
Avoid using console in code that runs on the browser
34        console.log(`${success} | ${eachApiKey}`) 
35 
36        if (!success) { 
37            console.log(err) 38            console.log(body) 
39        } 
40    }) 
Avoid using console in code that runs on the browser
31 
32 
33 
34        console.log(`${success} | ${eachApiKey}`) 35 
36        if (!success) { 
37            console.log(err) 
Avoid using console in code that runs on the browser
 8var videoname = 'WMweEpGlu_U' 
 9 
10loadedAuthData.config.youtubeApiKeysDaemon.forEach(async (eachApiKey) => { 
11    console.log(eachApiKey) 12     
13    var success = false 
14 
Avoid using console in code that runs on the browser
21            console.log(eachKey, body) 
22 
23            if (err) { 
24                console.log(eachKey, err) 25            } 
26 
27        }); 
Avoid using console in code that runs on the browser
18 
19        youtubeclient.get(pathForYtRequest, async function(err, res, body) { 
20 
21            console.log(eachKey, body) 22 
23            if (err) { 
24                console.log(eachKey, err) 
Avoid using console in code that runs on the browser
34  .on('end', function () {
35    // emitted when all rows have been retrieved and read
36    console.timeEnd("stream");
37  console.log(`${numberOfDoneQueries} rows streamed`)38  });
39}
40
Avoid using console in code that runs on the browser
38  .on('end', function () {
39    // emitted when all rows have been retrieved and read
40    console.timeEnd("stream");
41  console.log(`${numberOfDoneQueries} rows streamed`)42  });
43}
44
Avoid using console in code that runs on the browser
32    while (row = this.read()) {
33      // process row
34      numberOfDoneQueries += 1;
35      console.log(row)36    }
37  })
38  .on('end', function () {
Avoid using console in code that runs on the browser
161});*/
162
163httpServer.listen(7357, () => {
164    console.log('HTTPS Server running on port 7357');165});
166}
Avoid using console in code that runs on the browser
142
143app.all('/topgg', webhook.listener(async (vote) => {
144    // vote will be your vote object, e.g
145    console.log(vote.user) // 395526710101278721 < user who voted\146
147    await addNewVote(vote.user,"topgg")
148
Avoid using console in code that runs on the browser
134  
135    res.end();
136    } else {
137      console.log(" not authenticated")138    }
139  }
140
Avoid using console in code that runs on the browser
118   //   console.log(auth)
119    if(auth === config.discordbotlist.auth) {
120
121        console.log("authenticated")122
123    const reqjson = req.body;
124    try {logger.discordInfoLogger.info(reqjson, {type: "discordbotlistvotewebhook"})} 
Avoid using console in code that runs on the browser
109  // On the first request, the "Authorization" header won't exist, so we'll set a Response
110  // header that prompts the browser to ask for a username and password.
111  if (!auth) {
112    console.log('no auth header found')113    res.set("WWW-Authenticate", "Basic realm=\"Authorization Required\"");
114    // If the user cancels the dialog, or enters the password wrong too many times,
115    // show the Access Restricted error message.
Avoid using console in code that runs on the browser
104  var auth = req.get("authorization");
105
106  console.log('auth',auth)
107  console.log('correct pass',  config.discordbotlist.auth)108
109  // On the first request, the "Authorization" header won't exist, so we'll set a Response
110  // header that prompts the browser to ask for a username and password.
Avoid using console in code that runs on the browser
103  // Grab the "Authorization" header.
104  var auth = req.get("authorization");
105
106  console.log('auth',auth)107  console.log('correct pass',  config.discordbotlist.auth)
108
109  // On the first request, the "Authorization" header won't exist, so we'll set a Response
Avoid using console in code that runs on the browser
 97  
 98 //   console.log(req)
 99
100    console.log(req.body)101
102
103  // Grab the "Authorization" header.