~starkingdoms/starkingdoms

ref: 330e3a29c76e7582ae2169b6ed8cf6ae362431e6 starkingdoms/starkingdoms-api/discord.go -rw-r--r-- 314 bytes
330e3a29 — core API work 2 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
package starkingdoms_api

import (
	"fmt"
	"net/url"
)

func DiscordApiUrl(c *Config, state string) string {
	return fmt.Sprintf("https://discord.com/api/oauth2/authorize?client_id=%s&redirect_uri=%s&response_type=code&scope=identify&state=%s", c.Discord.ClientID, url.QueryEscape(c.Discord.RedirectURI), state)
}