fixing auth issues
This commit is contained in:
parent
e38006bbc4
commit
a1401529e3
@ -8,18 +8,19 @@ module.exports = {
|
|||||||
private: true,
|
private: true,
|
||||||
run: async (client, interaction) => {
|
run: async (client, interaction) => {
|
||||||
const file = './cache/' + interaction.user.id
|
const file = './cache/' + interaction.user.id
|
||||||
|
console.log(process.env.USER)
|
||||||
|
console.log(process.env.PASS)
|
||||||
|
|
||||||
unirest
|
unirest
|
||||||
.post(`https://${process.env.PUBLIC_URL}/api/chat`)
|
.post(`https://${process.env.PUBLIC_URL}/api/chat`)
|
||||||
.headers({ 'Accept': 'application/json', 'Content-Type': 'application/json' })
|
.headers({ 'Accept': 'application/json', 'Content-Type': 'application/json' })
|
||||||
.auth({
|
.auth({
|
||||||
user: process.env.USER,
|
user: process.env.USERNAME,
|
||||||
pass: process.env.PASS,
|
pass: process.env.PASS,
|
||||||
sendImmediately: true
|
sendImmediately: true
|
||||||
})
|
})
|
||||||
.then((response) => {
|
.then((response) => {
|
||||||
console.log(response)
|
// console.log(response)
|
||||||
const obj = { id: response.body }
|
const obj = { id: response.body }
|
||||||
|
|
||||||
jsonfile.writeFile(file, obj, function (err) {
|
jsonfile.writeFile(file, obj, function (err) {
|
||||||
|
Loading…
Reference in New Issue
Block a user