我有一个问题。我想在不和谐的服务器中列出所有用户的列表,但是我不知道如何用html显示列表。有我的代码:
const data = new FormData();
data.append('client_id', '573300679112785920');
data.append('client_secret', 'secret');
data.append('grant_type', 'authorization_code');
data.append('redirect_uri', 'http://localhost:5665/?token=123456');
data.append('scope', 'identify guilds');
data.append('code', "secret");
fetch('https://discordapp.com/api/oauth2/token', {
method: 'POST',
body: data,
})
.then(info => fetch('https://discordapp.com/api/guilds/506162141888380938/members?limit=20', {
headers: {
authorization: `Bot [botToken]`,
"Content-Type": "application/json"
},
}))
.then(res => res.json())
.then(console.log);