Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Remilia Scarlet
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Reviath
Remilia Scarlet
Commits
59452bbe
Commit
59452bbe
authored
May 10, 2021
by
Reviath
Browse files
Options
Downloads
Patches
Plain Diff
Deleted GuildInfo structure, doing all stuff on index.html file.
parent
276a0f89
Branches
Branches containing commit
Tags
v1.7.1
Tags containing commit
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
web/public/index.html
+6
-9
6 additions, 9 deletions
web/public/index.html
web/types.go
+0
-6
0 additions, 6 deletions
web/types.go
web/web.go
+2
-17
2 additions, 17 deletions
web/web.go
with
8 additions
and
32 deletions
web/public/index.html
+
6
−
9
View file @
59452bbe
...
@@ -58,16 +58,13 @@
...
@@ -58,16 +58,13 @@
<h1>
Remilia Scarlet
</h1>
<h1>
Remilia Scarlet
</h1>
<p>
Multipurpose Discord bot written in Golang.
</p>
<p>
Multipurpose Discord bot written in Golang.
</p>
<a
href=
"/invite"
><button
class=
"btn btn-outline-light btn-lg rounded-pill"
>
Invite Bot
</button></a>
<a
href=
"/invite"
><button
class=
"btn btn-outline-light btn-lg rounded-pill"
>
Invite Bot
</button></a>
{{range .guild}}
<br
/><br
/>
<div
class=
"row"
>
{{range .guilds}}
<br/>
<img
src=
"{{.Icon}}"
class=
"guildicon"
/>
<p>
{{.Name}}
</p>
<p>
{{.Name}}
</p>
<br/>
<img
src=
"https://cdn.discordapp.com/icons/{{.ID}}/{{.Icon}}.png"
class=
"rounded-circle"
/>
<a
href=
"/invite"
class=
"dashboard"
>
Add Bot
</a>
<br/><br/>
<a
href=
"/invite"
class=
"rounded-circle"
>
Add Bot
</a>
{{end}}
{{end}}
</div>
</section>
</section>
{{end}}
{{end}}
...
...
This diff is collapsed.
Click to expand it.
web/types.go
+
0
−
6
View file @
59452bbe
...
@@ -7,9 +7,3 @@ type UserInfo struct {
...
@@ -7,9 +7,3 @@ type UserInfo struct {
Discriminator
string
Discriminator
string
Bot
bool
Bot
bool
}
}
type
GuildInfo
struct
{
Name
[]
string
ID
[]
string
Icon
[]
string
}
This diff is collapsed.
Click to expand it.
web/web.go
+
2
−
17
View file @
59452bbe
...
@@ -139,18 +139,7 @@ func Listen(session *discordgo.Session) {
...
@@ -139,18 +139,7 @@ func Listen(session *discordgo.Session) {
fmt
.
Println
(
"An error occurred on api: "
+
err
.
Error
())
fmt
.
Println
(
"An error occurred on api: "
+
err
.
Error
())
return
return
}
}
var
userguildids
[]
string
var
userguildnames
[]
string
var
userguildicons
[]
string
for
_
,
guild
:=
range
guilds
{
_
=
append
(
userguildids
,
guild
.
ID
)
}
for
_
,
guild
:=
range
guilds
{
_
=
append
(
userguildnames
,
guild
.
Name
)
}
for
_
,
guild
:=
range
guilds
{
_
=
append
(
userguildicons
,
guild
.
IconURL
())
}
c
.
HTML
(
200
,
"index.html"
,
gin
.
H
{
c
.
HTML
(
200
,
"index.html"
,
gin
.
H
{
"login"
:
"yes"
,
"login"
:
"yes"
,
"user"
:
UserInfo
{
"user"
:
UserInfo
{
...
@@ -160,11 +149,7 @@ func Listen(session *discordgo.Session) {
...
@@ -160,11 +149,7 @@ func Listen(session *discordgo.Session) {
Discriminator
:
user
.
Discriminator
,
Discriminator
:
user
.
Discriminator
,
Bot
:
user
.
Bot
,
Bot
:
user
.
Bot
,
},
},
"guild"
:
GuildInfo
{
"guilds"
:
guilds
,
Name
:
userguildnames
,
ID
:
userguildids
,
Icon
:
userguildicons
,
},
"botavatar"
:
avatarURL
,
"botavatar"
:
avatarURL
,
"botusername"
:
userName
,
"botusername"
:
userName
,
"botlink"
:
fmt
.
Sprintf
(
"https://discord.com/users/%s"
,
botID
),
"botlink"
:
fmt
.
Sprintf
(
"https://discord.com/users/%s"
,
botID
),
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment