@@ -90,7 +90,7 @@ app.post('/token', async (c) => {
90
90
body : params ,
91
91
headers : {
92
92
'Content-Type' : 'application/x-www-form-urlencoded' ,
93
- 'User-Agent' : 'DiscordBot (https://github.com/Aiko-IT-Systems/cloudflare-discord-oidc-worker, v2 .0.0)'
93
+ 'User-Agent' : 'DiscordBot (https://github.com/Aiko-IT-Systems/cloudflare-discord-oidc-worker, v3 .0.0)'
94
94
}
95
95
} ) . then ( res => res . json ( ) )
96
96
@@ -101,7 +101,7 @@ app.post('/token', async (c) => {
101
101
const userInfo = await fetch ( 'https://discord.com/api/users/@me' , {
102
102
headers : {
103
103
'Authorization' : 'Bearer ' + r [ 'access_token' ] ,
104
- 'User-Agent' : 'DiscordBot (https://github.com/Aiko-IT-Systems/cloudflare-discord-oidc-worker, v2 .0.0)'
104
+ 'User-Agent' : 'DiscordBot (https://github.com/Aiko-IT-Systems/cloudflare-discord-oidc-worker, v3 .0.0)'
105
105
}
106
106
} ) . then ( res => res . json ( ) )
107
107
@@ -111,7 +111,7 @@ app.post('/token', async (c) => {
111
111
const serverResp = await fetch ( 'https://discord.com/api/users/@me/guilds' , {
112
112
headers : {
113
113
'Authorization' : 'Bearer ' + r [ 'access_token' ] ,
114
- 'User-Agent' : 'DiscordBot (https://github.com/Aiko-IT-Systems/cloudflare-discord-oidc-worker, v2 .0.0)'
114
+ 'User-Agent' : 'DiscordBot (https://github.com/Aiko-IT-Systems/cloudflare-discord-oidc-worker, v3 .0.0)'
115
115
}
116
116
} )
117
117
@@ -142,7 +142,7 @@ app.post('/token', async (c) => {
142
142
let memberPromise = fetch ( `https://discord.com/api/users/@me/guilds/${ guildId } /member` , {
143
143
headers : {
144
144
'Authorization' : 'Bearer ' + r [ 'access_token' ] ,
145
- 'User-Agent' : 'DiscordBot (https://github.com/Aiko-IT-Systems/cloudflare-discord-oidc-worker, v2 .0.0)'
145
+ 'User-Agent' : 'DiscordBot (https://github.com/Aiko-IT-Systems/cloudflare-discord-oidc-worker, v3 .0.0)'
146
146
}
147
147
} )
148
148
@@ -160,7 +160,7 @@ app.post('/token', async (c) => {
160
160
let memberPromise = fetch ( `https://discord.com/api/guilds/${ guildId } /members/${ userInfo [ 'id' ] } ` , {
161
161
headers : {
162
162
'Authorization' : 'Bot ' + c . env . DISCORD_TOKEN ,
163
- 'User-Agent' : 'DiscordBot (https://github.com/Aiko-IT-Systems/cloudflare-discord-oidc-worker, v2 .0.0)'
163
+ 'User-Agent' : 'DiscordBot (https://github.com/Aiko-IT-Systems/cloudflare-discord-oidc-worker, v3 .0.0)'
164
164
}
165
165
} )
166
166
@@ -231,7 +231,7 @@ async function cacheRoles(event, env) {
231
231
} ) . toString ( ) , {
232
232
headers : {
233
233
'Authorization' : 'Bot ' + env . DISCORD_TOKEN ,
234
- 'User-Agent' : 'DiscordBot (https://github.com/Aiko-IT-Systems/cloudflare-discord-oidc-worker, v2 .0.0)'
234
+ 'User-Agent' : 'DiscordBot (https://github.com/Aiko-IT-Systems/cloudflare-discord-oidc-worker, v3 .0.0)'
235
235
}
236
236
} )
237
237
let incrMemberResp = await incrMemberPromise
0 commit comments