From 27cbe07fb6117d24745e9590e5f39c64ae26e012 Mon Sep 17 00:00:00 2001 From: dragonfire535 Date: Sun, 12 Mar 2017 13:23:44 -0400 Subject: [PATCH] Remove all the Broken User-Agents --- commands/search/define.js | 3 --- commands/search/osu.js | 3 --- commands/search/wattpad.js | 3 --- commands/search/wikipedia.js | 3 --- commands/search/youtube.js | 3 --- commands/search/yugioh.js | 3 --- commands/textedit/yoda.js | 3 +-- index.js | 15 ++------------- 8 files changed, 3 insertions(+), 33 deletions(-) diff --git a/commands/search/define.js b/commands/search/define.js index 5e244c5b..457b838e 100644 --- a/commands/search/define.js +++ b/commands/search/define.js @@ -32,9 +32,6 @@ class DefineCommand extends commando.Command { includeTags: false, api_key: config.wordnikkey }, - headers: { - 'User-Agent': 'XiaoBot - dragonfire535 (http://dragonfire535.tk)' - }, json: true } request(options).then(function (response) { diff --git a/commands/search/osu.js b/commands/search/osu.js index be45bb8e..29ac96a9 100644 --- a/commands/search/osu.js +++ b/commands/search/osu.js @@ -30,9 +30,6 @@ class OsuCommand extends commando.Command { u: usernametosearch, type: "string" }, - headers: { - 'User-Agent': 'XiaoBot - dragonfire535 (http://dragonfire535.tk)' - }, json: true } request(options).then(function (response) { diff --git a/commands/search/wattpad.js b/commands/search/wattpad.js index 42506b9f..758dd3fd 100644 --- a/commands/search/wattpad.js +++ b/commands/search/wattpad.js @@ -32,9 +32,6 @@ class WattpadCommand extends commando.Command { query: querybook, limit: 1 }, - headers: { - 'User-Agent': 'XiaoBot - dragonfire535 (http://dragonfire535.tk)' - }, json: true } request(options).then(function (response) { diff --git a/commands/search/wikipedia.js b/commands/search/wikipedia.js index 7c29c61a..7ca1d2f1 100644 --- a/commands/search/wikipedia.js +++ b/commands/search/wikipedia.js @@ -24,9 +24,6 @@ class WikipediaCommand extends commando.Command { const options = { method: 'GET', uri: "https://en.wikipedia.org/w/api.php?action=query&prop=extracts&format=json&titles=" + wikied + "&exintro=&explaintext=&redirects=&formatversion=2", - headers: { - 'User-Agent': 'XiaoBot - dragonfire535 (http://dragonfire535.tk)' - }, json: true } request(options).then(function (response) { diff --git a/commands/search/youtube.js b/commands/search/youtube.js index 8c2ff061..b6f1ae39 100644 --- a/commands/search/youtube.js +++ b/commands/search/youtube.js @@ -33,9 +33,6 @@ class YouTubeCommand extends commando.Command { order: 'viewCount', key: config.youtubekey }, - headers: { - 'User-Agent': 'XiaoBot - dragonfire535 (http://dragonfire535.tk)' - }, json: true } request(options).then(function (response) { diff --git a/commands/search/yugioh.js b/commands/search/yugioh.js index 147951a3..2036482f 100644 --- a/commands/search/yugioh.js +++ b/commands/search/yugioh.js @@ -24,9 +24,6 @@ class YuGiOhCommand extends commando.Command { const options = { method: 'GET', uri: 'http://yugiohprices.com/api/card_data/' + cardname, - headers: { - 'User-Agent': 'XiaoBot - dragonfire535 (http://dragonfire535.tk)' - }, json: true } request(options).then(function (response) { diff --git a/commands/textedit/yoda.js b/commands/textedit/yoda.js index 1a7dbcfd..51016c8a 100644 --- a/commands/textedit/yoda.js +++ b/commands/textedit/yoda.js @@ -31,8 +31,7 @@ class YodaCommand extends commando.Command { }, headers: { 'X-Mashape-Key': config.mashapekey, - 'Accept': "text/plain", - 'User-Agent': 'XiaoBot - dragonfire535 (http://dragonfire535.tk)' + 'Accept': "text/plain" }, json: true } diff --git a/index.js b/index.js index 0cc06a91..0b6e48b7 100644 --- a/index.js +++ b/index.js @@ -70,9 +70,6 @@ client.on('message', (message) => { body: { content: messagecontent }, - headers: { - 'User-Agent': 'XiaoBot - dragonfire535 (http://dragonfire535.tk)' - }, json: true } request(sendPOST).then(function (parsedBody) { @@ -125,9 +122,6 @@ client.on('guildCreate', guild => { key: config.carbonkey, servercount: results.reduce((prev, val) => prev + val, 0) }, - headers: { - 'User-Agent': 'XiaoBot - dragonfire535 (http://dragonfire535.tk)' - }, json: true } const DBotsPOST = { @@ -137,8 +131,7 @@ client.on('guildCreate', guild => { server_count: results.reduce((prev, val) => prev + val, 0) }, headers: { - 'Authorization': config.botskey, - 'User-Agent': 'XiaoBot - dragonfire535 (http://dragonfire535.tk)' + 'Authorization': config.botskey }, json: true } @@ -166,9 +159,6 @@ client.on('guildDelete', guild => { key: config.carbonkey, servercount: results.reduce((prev, val) => prev + val, 0) }, - headers: { - 'User-Agent': 'XiaoBot - dragonfire535 (http://dragonfire535.tk)' - }, json: true } const DBotsPOST = { @@ -178,8 +168,7 @@ client.on('guildDelete', guild => { server_count: results.reduce((prev, val) => prev + val, 0) }, headers: { - 'Authorization': config.botskey, - 'User-Agent': 'XiaoBot - dragonfire535 (http://dragonfire535.tk)' + 'Authorization': config.botskey }, json: true }