Modif utils pour "require-all" + Fix refresh error

This commit is contained in:
Zachary Guénot
2023-05-11 01:23:54 +02:00
parent 6bc5e67cbc
commit e5526cc908
16 changed files with 39 additions and 50 deletions

View File

@@ -1,6 +1,6 @@
const axios = require('axios')
module.exports = async function (client_id, access_token, session_id, type, version, condition) {
module.exports = subscribeToEvents = (async (client_id, access_token, session_id, type, version, condition) => {
return await axios.post('https://api.twitch.tv/helix/eventsub/subscriptions', {
type,
version,
@@ -19,4 +19,4 @@ module.exports = async function (client_id, access_token, session_id, type, vers
//console.log(response.data)
return response.data.data[0].status
}).catch(error => { return error.response.data })
}
})