@@ -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
@@ -113,7 +113,7 @@ app.post('/token', async (c) => {
113
113
const serverResp = await fetch ( 'https://discord.com/api/users/@me/guilds' , {
114
114
headers : {
115
115
'Authorization' : 'Bearer ' + r [ 'access_token' ] ,
116
- 'User-Agent' : 'DiscordBot (https://github.com/Aiko-IT-Systems/cloudflare-discord-oidc-worker, v2 .0.0)'
116
+ 'User-Agent' : 'DiscordBot (https://github.com/Aiko-IT-Systems/cloudflare-discord-oidc-worker, v3 .0.0)'
117
117
}
118
118
} )
119
119
@@ -144,7 +144,7 @@ app.post('/token', async (c) => {
144
144
let memberPromise = fetch ( `https://discord.com/api/users/@me/guilds/${ guildId } /member` , {
145
145
headers : {
146
146
'Authorization' : 'Bearer ' + r [ 'access_token' ] ,
147
- 'User-Agent' : 'DiscordBot (https://github.com/Aiko-IT-Systems/cloudflare-discord-oidc-worker, v2 .0.0)'
147
+ 'User-Agent' : 'DiscordBot (https://github.com/Aiko-IT-Systems/cloudflare-discord-oidc-worker, v3 .0.0)'
148
148
}
149
149
} )
150
150
@@ -162,7 +162,7 @@ app.post('/token', async (c) => {
162
162
let memberPromise = fetch ( `https://discord.com/api/guilds/${ guildId } /members/${ userInfo [ 'id' ] } ` , {
163
163
headers : {
164
164
'Authorization' : 'Bot ' + c . env . DISCORD_TOKEN ,
165
- 'User-Agent' : 'DiscordBot (https://github.com/Aiko-IT-Systems/cloudflare-discord-oidc-worker, v2 .0.0)'
165
+ 'User-Agent' : 'DiscordBot (https://github.com/Aiko-IT-Systems/cloudflare-discord-oidc-worker, v3 .0.0)'
166
166
}
167
167
} )
168
168
@@ -233,7 +233,7 @@ async function cacheRoles(event, env) {
233
233
} ) . toString ( ) , {
234
234
headers : {
235
235
'Authorization' : 'Bot ' + env . DISCORD_TOKEN ,
236
- 'User-Agent' : 'DiscordBot (https://github.com/Aiko-IT-Systems/cloudflare-discord-oidc-worker, v2 .0.0)'
236
+ 'User-Agent' : 'DiscordBot (https://github.com/Aiko-IT-Systems/cloudflare-discord-oidc-worker, v3 .0.0)'
237
237
}
238
238
} )
239
239
let incrMemberResp = await incrMemberPromise
0 commit comments