Homepage link
This commit is contained in:
parent
f414dfdb77
commit
d42ef41dc0
@ -1,17 +0,0 @@
|
|||||||
package discord
|
|
||||||
|
|
||||||
import (
|
|
||||||
"bytes"
|
|
||||||
"github.com/bwmarrin/discordgo"
|
|
||||||
"image"
|
|
||||||
)
|
|
||||||
|
|
||||||
func getGuildIcon(s *discordgo.Session, guild *discordgo.UserGuild) (image.Image, error) {
|
|
||||||
body, err := s.RequestWithBucketID("GET", discordgo.EndpointGuildIcon(guild.ID, guild.Icon), nil, discordgo.EndpointGuildIcon(guild.ID, ""))
|
|
||||||
if err != nil {
|
|
||||||
return nil, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
img, _, err := image.Decode(bytes.NewReader(body))
|
|
||||||
return img, err
|
|
||||||
}
|
|
@ -39,87 +39,88 @@
|
|||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<h1>Discord | Melon Tools</h1>
|
<h1>Discord | <a href="/">Melon Tools</a></h1>
|
||||||
<div class="page-content">
|
<div class="page-content">
|
||||||
<div>
|
<div>
|
||||||
{{with .User}}
|
{{with .User}}
|
||||||
<p>My User: {{.Username}}#{{.Discriminator}}</p>
|
<p>My User: {{.Username}}#{{.Discriminator}}</p>
|
||||||
<ul>
|
<ul>
|
||||||
<li>ID: {{.ID}}</li>
|
<li>ID: {{.ID}}</li>
|
||||||
<li>Email: {{.Email}}</li>
|
<li>Email: {{.Email}}</li>
|
||||||
<li>Username: {{.Username}}</li>
|
<li>Username: {{.Username}}</li>
|
||||||
<li>Avatar: <img {{$.Avatar}}/></li>
|
<li>Avatar: <img {{$.Avatar}}/></li>
|
||||||
<li>Locale: {{.Locale}}</li>
|
<li>Locale: {{.Locale}}</li>
|
||||||
<li>Discriminator: {{.Discriminator}}</li>
|
<li>Discriminator: {{.Discriminator}}</li>
|
||||||
<li>Verified: {{.Verified}}</li>
|
<li>Verified: {{.Verified}}</li>
|
||||||
<li>MFA: {{.MFAEnabled}}</li>
|
<li>MFA: {{.MFAEnabled}}</li>
|
||||||
<li>Banner: {{.Banner}}</li>
|
<li>Banner: {{.Banner}}</li>
|
||||||
<li>Accent Color: {{$.UserAccent}} <span class="colour-block" style="background-color: {{$.UserAccent}}"> </span></li>
|
<li>Accent Color: {{$.UserAccent}} <span class="colour-block" style="background-color: {{$.UserAccent}}"> </span>
|
||||||
<li>Bot: {{.Bot}}</li>
|
</li>
|
||||||
<li>Premium: {{.PremiumType}}</li>
|
<li>Bot: {{.Bot}}</li>
|
||||||
<li>System: {{.System}}</li>
|
<li>Premium: {{.PremiumType}}</li>
|
||||||
</ul>
|
<li>System: {{.System}}</li>
|
||||||
|
</ul>
|
||||||
{{end}}
|
{{end}}
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
{{with .User.PublicFlags}}
|
{{with .User.PublicFlags}}
|
||||||
<p>My Flags:</p>
|
<p>My Flags:</p>
|
||||||
<ul>
|
<ul>
|
||||||
{{if checkFlag . 1}}
|
{{if checkFlag . 1}}
|
||||||
<li>Discord Employee</li>
|
<li>Discord Employee</li>
|
||||||
{{end}}
|
{{end}}
|
||||||
{{if checkFlag . 2}}
|
{{if checkFlag . 2}}
|
||||||
<li>Discord Partner</li>
|
<li>Discord Partner</li>
|
||||||
{{end}}
|
{{end}}
|
||||||
{{if checkFlag . 4}}
|
{{if checkFlag . 4}}
|
||||||
<li>Hype Squad Events</li>
|
<li>Hype Squad Events</li>
|
||||||
{{end}}
|
{{end}}
|
||||||
{{if checkFlag . 8}}
|
{{if checkFlag . 8}}
|
||||||
<li>Bug Hunter Level 1</li>
|
<li>Bug Hunter Level 1</li>
|
||||||
{{end}}
|
{{end}}
|
||||||
{{if checkFlag . 64}}
|
{{if checkFlag . 64}}
|
||||||
<li>House Bravery</li>
|
<li>House Bravery</li>
|
||||||
{{end}}
|
{{end}}
|
||||||
{{if checkFlag . 128}}
|
{{if checkFlag . 128}}
|
||||||
<li>House Brilliance</li>
|
<li>House Brilliance</li>
|
||||||
{{end}}
|
{{end}}
|
||||||
{{if checkFlag . 256}}
|
{{if checkFlag . 256}}
|
||||||
<li>House Balance</li>
|
<li>House Balance</li>
|
||||||
{{end}}
|
{{end}}
|
||||||
{{if checkFlag . 512}}
|
{{if checkFlag . 512}}
|
||||||
<li>Early Supporter</li>
|
<li>Early Supporter</li>
|
||||||
{{end}}
|
{{end}}
|
||||||
{{if checkFlag . 1024}}
|
{{if checkFlag . 1024}}
|
||||||
<li>Team User</li>
|
<li>Team User</li>
|
||||||
{{end}}
|
{{end}}
|
||||||
{{if checkFlag . 4096}}
|
{{if checkFlag . 4096}}
|
||||||
<li>System</li>
|
<li>System</li>
|
||||||
{{end}}
|
{{end}}
|
||||||
{{if checkFlag . 16384}}
|
{{if checkFlag . 16384}}
|
||||||
<li>Bug Hunter Level 2</li>
|
<li>Bug Hunter Level 2</li>
|
||||||
{{end}}
|
{{end}}
|
||||||
{{if checkFlag . 65536}}
|
{{if checkFlag . 65536}}
|
||||||
<li>Verified Bot</li>
|
<li>Verified Bot</li>
|
||||||
{{end}}
|
{{end}}
|
||||||
{{if checkFlag . 131072}}
|
{{if checkFlag . 131072}}
|
||||||
<li>Verified Bot Developer</li>
|
<li>Verified Bot Developer</li>
|
||||||
{{end}}
|
{{end}}
|
||||||
{{if checkFlag . 262144}}
|
{{if checkFlag . 262144}}
|
||||||
<li>Discord Certified Moderator</li>
|
<li>Discord Certified Moderator</li>
|
||||||
{{end}}
|
{{end}}
|
||||||
</ul>
|
</ul>
|
||||||
{{end}}
|
{{end}}
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<p>Connections ({{len .Connections}}):</p>
|
<p>Connections ({{len .Connections}}):</p>
|
||||||
<ul class="connected-accounts">
|
<ul class="connected-accounts">
|
||||||
{{range .Connections}}
|
{{range .Connections}}
|
||||||
<li>
|
<li>
|
||||||
<a href="{{connectedLink .}}" target="_blank" data-is-revoked="{{.Revoked}}">
|
<a href="{{connectedLink .}}" target="_blank" data-is-revoked="{{.Revoked}}">
|
||||||
<img src="/discord/assets/icon/{{.Type}}.svg"/>
|
<img src="/discord/assets/icon/{{.Type}}.svg"/>
|
||||||
<span>{{.Name}}</span>
|
<span>{{.Name}}</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
{{end}}
|
{{end}}
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
@ -127,11 +128,11 @@
|
|||||||
<p>Guilds ({{len .Guilds}}):</p>
|
<p>Guilds ({{len .Guilds}}):</p>
|
||||||
<div class="page-content guilds">
|
<div class="page-content guilds">
|
||||||
{{range $k, $v := .Guilds}}
|
{{range $k, $v := .Guilds}}
|
||||||
<div class="guild-item">
|
<div class="guild-item">
|
||||||
<div><img {{index $.GuildIcons $k}}/></div>
|
<div><img {{index $.GuildIcons $k}}/></div>
|
||||||
<div>{{$v.Name}}</div>
|
<div>{{$v.Name}}</div>
|
||||||
<div>@*{{$v.ID}}</div>
|
<div>@*{{$v.ID}}</div>
|
||||||
</div>
|
</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<h1>Gitea | Melon Tools</h1>
|
<h1>Gitea | <a href="/">Melon Tools</a></h1>
|
||||||
<div class="page-content">
|
<div class="page-content">
|
||||||
<div>
|
<div>
|
||||||
<p>Select repository source:</p>
|
<p>Select repository source:</p>
|
||||||
@ -31,29 +31,29 @@
|
|||||||
<a href="?org=$me">{{.Username}} (my user account)</a>
|
<a href="?org=$me">{{.Username}} (my user account)</a>
|
||||||
</li>
|
</li>
|
||||||
{{range .Orgs}}
|
{{range .Orgs}}
|
||||||
<li>
|
<li>
|
||||||
<a href="?org={{.Name}}">{{.Name}}</a>
|
<a href="?org={{.Name}}">{{.Name}}</a>
|
||||||
</li>
|
</li>
|
||||||
{{end}}
|
{{end}}
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
{{if .ShowOrg}}
|
{{if .ShowOrg}}
|
||||||
<div>
|
<div>
|
||||||
<p>Select repository:</p>
|
<p>Select repository:</p>
|
||||||
<ul>
|
<ul>
|
||||||
{{range .Repos}}
|
{{range .Repos}}
|
||||||
<li>
|
<li>
|
||||||
<a href="?org={{$.SelOrg}}&repo={{.Name}}">{{$.MyOrg}}/{{.Name}}</a>
|
<a href="?org={{$.SelOrg}}&repo={{.Name}}">{{$.MyOrg}}/{{.Name}}</a>
|
||||||
</li>
|
</li>
|
||||||
{{end}}
|
{{end}}
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
{{if .ShowRepo}}
|
{{if .ShowRepo}}
|
||||||
<div>
|
<div>
|
||||||
<p>Repository details:</p>
|
<p>Repository details:</p>
|
||||||
<p>Go import: go get {{.SelModule}}@v0.0.0-{{.CommitTime}}-{{.CommitHash}}</p>
|
<p>Go import: go get {{.SelModule}}@v0.0.0-{{.CommitTime}}-{{.CommitHash}}</p>
|
||||||
</div>
|
</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
|
Loading…
Reference in New Issue
Block a user