User-Agent for all requests

This commit is contained in:
dragonfire535
2017-03-12 13:21:01 -04:00
parent a4412019c8
commit 41d8eaaf1f
8 changed files with 33 additions and 3 deletions
+3
View File
@@ -32,6 +32,9 @@ 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) {
+3
View File
@@ -30,6 +30,9 @@ class OsuCommand extends commando.Command {
u: usernametosearch,
type: "string"
},
headers: {
'User-Agent': 'XiaoBot - dragonfire535 (http://dragonfire535.tk)'
},
json: true
}
request(options).then(function (response) {
+3
View File
@@ -32,6 +32,9 @@ class WattpadCommand extends commando.Command {
query: querybook,
limit: 1
},
headers: {
'User-Agent': 'XiaoBot - dragonfire535 (http://dragonfire535.tk)'
},
json: true
}
request(options).then(function (response) {
+3
View File
@@ -24,6 +24,9 @@ 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) {
+3
View File
@@ -33,6 +33,9 @@ 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) {
+3
View File
@@ -24,6 +24,9 @@ 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) {
+2 -1
View File
@@ -31,7 +31,8 @@ class YodaCommand extends commando.Command {
},
headers: {
'X-Mashape-Key': config.mashapekey,
'Accept': "text/plain"
'Accept': "text/plain",
'User-Agent': 'XiaoBot - dragonfire535 (http://dragonfire535.tk)'
},
json: true
}