feat: add extensive test suite
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
export function discordAuthorizationUrl(config: {
|
||||
clientId: string;
|
||||
redirectUri: string;
|
||||
state: string;
|
||||
}) {
|
||||
const params = new URLSearchParams({
|
||||
client_id: config.clientId,
|
||||
response_type: "code",
|
||||
redirect_uri: config.redirectUri,
|
||||
scope: "identify guilds.join guilds",
|
||||
state: config.state,
|
||||
});
|
||||
return `https://discord.com/oauth2/authorize?${params}`;
|
||||
}
|
||||
Reference in New Issue
Block a user