mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-19 21:40:51 +02:00
User-Agent for all requests
This commit is contained in:
@@ -70,6 +70,9 @@ client.on('message', (message) => {
|
||||
body: {
|
||||
content: messagecontent
|
||||
},
|
||||
headers: {
|
||||
'User-Agent': 'XiaoBot - dragonfire535 (http://dragonfire535.tk)'
|
||||
},
|
||||
json: true
|
||||
}
|
||||
request(sendPOST).then(function (parsedBody) {
|
||||
@@ -122,6 +125,9 @@ 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 = {
|
||||
@@ -131,7 +137,8 @@ client.on('guildCreate', guild => {
|
||||
server_count: results.reduce((prev, val) => prev + val, 0)
|
||||
},
|
||||
headers: {
|
||||
'Authorization': config.botskey
|
||||
'Authorization': config.botskey,
|
||||
'User-Agent': 'XiaoBot - dragonfire535 (http://dragonfire535.tk)'
|
||||
},
|
||||
json: true
|
||||
}
|
||||
@@ -159,6 +166,9 @@ 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 = {
|
||||
@@ -168,7 +178,8 @@ client.on('guildDelete', guild => {
|
||||
server_count: results.reduce((prev, val) => prev + val, 0)
|
||||
},
|
||||
headers: {
|
||||
'Authorization': config.botskey
|
||||
'Authorization': config.botskey,
|
||||
'User-Agent': 'XiaoBot - dragonfire535 (http://dragonfire535.tk)'
|
||||
},
|
||||
json: true
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user