mirror of
https://github.com/Fluffy-Bean/Lynxie.git
synced 2025-05-14 08:02:17 +00:00
Remove revisions
This commit is contained in:
parent
d205cffca1
commit
fa6bf5ddb8
1 changed files with 0 additions and 15 deletions
|
@ -18,8 +18,6 @@ func RegisterDebugCommands(a *app.App) {
|
|||
|
||||
func registerDebug(a *app.App) app.Callback {
|
||||
return func(h *app.Handler, args []string) app.Error {
|
||||
modified := false
|
||||
revision := "-"
|
||||
buildTags := "-"
|
||||
goVersion := strings.TrimPrefix(runtime.Version(), "go")
|
||||
gcCount := runtime.MemStats{}.NumGC
|
||||
|
@ -29,28 +27,15 @@ func registerDebug(a *app.App) app.Callback {
|
|||
info, _ := debug.ReadBuildInfo()
|
||||
for _, setting := range info.Settings {
|
||||
switch setting.Key {
|
||||
case "vcs.revision":
|
||||
revision = setting.Value
|
||||
case "vcs.modified":
|
||||
modified = setting.Value == "true"
|
||||
case "-tags":
|
||||
buildTags = strings.ReplaceAll(setting.Value, ",", " ")
|
||||
}
|
||||
}
|
||||
|
||||
if modified {
|
||||
revision += " (modified)"
|
||||
}
|
||||
|
||||
h.Session.ChannelMessageSendComplex(h.Message.ChannelID, &discordgo.MessageSend{
|
||||
Embed: &discordgo.MessageEmbed{
|
||||
Title: "Lynxie",
|
||||
Fields: []*discordgo.MessageEmbedField{
|
||||
{
|
||||
Name: "Revision",
|
||||
Value: revision,
|
||||
Inline: false,
|
||||
},
|
||||
{
|
||||
Name: "Build Tags",
|
||||
Value: buildTags,
|
||||
|
|
Loading…
Add table
Reference in a new issue