Skip to content
This repository has been archived by the owner on Sep 24, 2024. It is now read-only.

Commit

Permalink
ok screw it
Browse files Browse the repository at this point in the history
  • Loading branch information
therealbenpai authored Nov 13, 2023
1 parent 70a1024 commit d86fb3c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions routes/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ router
.rows
.filter(staff => staff.isstaff)
.sort((a, b) => a.id - b.id)
.forEach(async (staff, i) => {
.forEach((staff, i) => {
if (staffRoles[staff.role] == undefined) staffRoles[staff.role] = {}
staffRoles[staff.role][i] = {...staff, avatarUrl: `https://cdn.discordapp.com/avatar/${staff.userid}/${(await axios.get(`https://discord.com/api/v10/users/${staff.userid}`, {headers: {'Authorization': `Bot ${process.env.DISCORD_TOKEN}`},validateStatus: _ => true})).data.avatar}`}
staffRoles[staff.role][i] = {...staff, avatarUrl: `https://api.daad.wtf/discord/user/${staff.userid}/avatar`}
})
Object.keys(staffRoles).forEach(role => staffRoles[role].title = role)
console.dir(staffRoles)
Expand Down

0 comments on commit d86fb3c

Please sign in to comment.