grim/wasdead

Parents b17e13064f6c
Children 1dceadde8ee2
More clean up and better console writing for somethings
  • +1 -0
    go.mod
  • +2 -0
    go.sum
  • +6 -2
    main.go
  • --- a/go.mod Fri Mar 22 10:15:09 2019 -0700
    +++ b/go.mod Fri Mar 22 11:11:01 2019 -0700
    @@ -4,6 +4,7 @@
    require (
    github.com/bwmarrin/discordgo v0.19.0
    + github.com/dustin/go-humanize v1.0.0 // indirect
    github.com/nicklaw5/helix v0.5.1
    github.com/prologic/bitcask v0.0.0-20190320071024-8bf169c96f80
    )
    --- a/go.sum Fri Mar 22 10:15:09 2019 -0700
    +++ b/go.sum Fri Mar 22 11:11:01 2019 -0700
    @@ -8,6 +8,8 @@
    github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
    github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
    github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
    +github.com/dustin/go-humanize v1.0.0 h1:VSnTsYCnlFHaM2/igO1h6X3HA71jcobQuxemgkq4zYo=
    +github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk=
    github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
    github.com/gofrs/flock v0.7.1 h1:DP+LD/t0njgoPBvT5MJLeliUIVQR03hiKR6vezdwHlc=
    github.com/gofrs/flock v0.7.1/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU=
    --- a/main.go Fri Mar 22 10:15:09 2019 -0700
    +++ b/main.go Fri Mar 22 11:11:01 2019 -0700
    @@ -12,6 +12,8 @@
    "syscall"
    "time"
    + "github.com/dustin/go-humanize"
    +
    "github.com/bwmarrin/discordgo"
    "github.com/nicklaw5/helix"
    "github.com/prologic/bitcask"
    @@ -161,6 +163,8 @@
    if err != nil {
    logError(err)
    +
    + sendMessage(s, channel, fmt.Sprintf("_%s_ does not seem to be live right now!", commandItems[1]))
    }
    }
    @@ -174,7 +178,7 @@
    }
    func sendMessage(sess *discordgo.Session, channelid, message string) error {
    - logInfo("SENDING MESSAGE:", message)
    + logInfo("SENDING MESSAGE:", channelid, message)
    _, err := sess.ChannelMessageSend(channelid, message)
    return err
    }
    @@ -207,7 +211,7 @@
    f = append(f, &discordgo.MessageEmbedField{
    Name: "Viewer",
    - Value: fmt.Sprintf("%v", stream.ViewerCount),
    + Value: humanize.Comma(int64(stream.ViewerCount)),
    Inline: true,
    })