fixing auth issues

This commit is contained in:
Raven Scott 2023-03-25 19:44:57 +02:00
parent e38006bbc4
commit a1401529e3

View File

@ -8,18 +8,19 @@ module.exports = {
private: true,
run: async (client, interaction) => {
const file = './cache/' + interaction.user.id
console.log(process.env.USER)
console.log(process.env.PASS)
unirest
.post(`https://${process.env.PUBLIC_URL}/api/chat`)
.headers({ 'Accept': 'application/json', 'Content-Type': 'application/json' })
.auth({
user: process.env.USER,
user: process.env.USERNAME,
pass: process.env.PASS,
sendImmediately: true
})
.then((response) => {
console.log(response)
// console.log(response)
const obj = { id: response.body }
jsonfile.writeFile(file, obj, function (err) {