From 8e92922f4c5ab40a15c3717421a6b6f8427c4b0f Mon Sep 17 00:00:00 2001 From: Dana Merrick Date: Sat, 12 Jun 2021 19:55:32 -0400 Subject: [PATCH] Release 6/12/2021 (#195) #minor * Bump github.com/adrg/libvlc-go/v3 from 3.1.2 to 3.1.4 Bumps [github.com/adrg/libvlc-go/v3](https://github.com/adrg/libvlc-go) from 3.1.2 to 3.1.4. - [Release notes](https://github.com/adrg/libvlc-go/releases) - [Commits](https://github.com/adrg/libvlc-go/compare/v3.1.2...v3.1.4) Signed-off-by: dependabot[bot] * Adding more bots * Adding sentry tracing See: https://docs.sentry.io/platforms/go/guides/negroni/performance/ * Bump actions/cache from 2.1.5 to 2.1.6 Bumps [actions/cache](https://github.com/actions/cache) from 2.1.5 to 2.1.6. - [Release notes](https://github.com/actions/cache/releases) - [Commits](https://github.com/actions/cache/compare/v2.1.5...v2.1.6) Signed-off-by: dependabot[bot] * Bump golang from 1.16.4-buster to 1.16.5-buster in /infra/docker/tripbot Bumps golang from 1.16.4-buster to 1.16.5-buster. --- updated-dependencies: - dependency-name: golang dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] * Bump github/super-linter from 3.17.1 to 4.2.2 Bumps [github/super-linter](https://github.com/github/super-linter) from 3.17.1 to 4.2.2. - [Release notes](https://github.com/github/super-linter/releases) - [Commits](https://github.com/github/super-linter/compare/v3.17.1...v4.2.2) --- updated-dependencies: - dependency-name: github/super-linter dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] * Adding some more bots * Bump github.com/nicklaw5/helix from 1.16.0 to 1.20.0 Bumps [github.com/nicklaw5/helix](https://github.com/nicklaw5/helix) from 1.16.0 to 1.20.0. - [Release notes](https://github.com/nicklaw5/helix/releases) - [Commits](https://github.com/nicklaw5/helix/compare/v1.16.0...v1.20.0) --- updated-dependencies: - dependency-name: github.com/nicklaw5/helix dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] * Adding error catching to sentry * One more location Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/docker.yml | 2 +- .github/workflows/super-linter.yml | 2 +- .github/workflows/testing.yml | 2 +- go.mod | 4 ++-- go.sum | 8 ++++---- infra/docker/tripbot/Dockerfile | 2 +- pkg/chatbot/handlers.go | 2 +- pkg/config/tripbot/helpers.go | 9 +++++++++ pkg/errors/errors.go | 9 ++++++++- 9 files changed, 28 insertions(+), 12 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 7a9e4d8e..f4f851f8 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -44,7 +44,7 @@ jobs: uses: actions/checkout@v1 - name: Fetch videos from cache id: restore-videos - uses: actions/cache@v2.1.5 + uses: actions/cache@v2.1.6 with: path: assets/video key: ${{ runner.os }}-video-${{ hashFiles('assets/video/manifest.txt') }} diff --git a/.github/workflows/super-linter.yml b/.github/workflows/super-linter.yml index 7af565bf..0b47c71e 100644 --- a/.github/workflows/super-linter.yml +++ b/.github/workflows/super-linter.yml @@ -15,7 +15,7 @@ jobs: steps: - uses: actions/checkout@v2 - name: run-linters - uses: github/super-linter@v3.17.1 + uses: github/super-linter@v4.2.2 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # disabled because it's not working with C libs diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 19564d7c..f0b295bd 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -27,7 +27,7 @@ jobs: go-version: ${{ matrix.go-version }} - uses: actions/checkout@v2 - name: Restore Cache - uses: actions/cache@v2.1.5 + uses: actions/cache@v2.1.6 with: path: ~/go/pkg/mod key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} diff --git a/go.mod b/go.mod index 7ca4d9c4..717063d7 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,7 @@ go 1.15 require ( cloud.google.com/go/logging v1.4.2 - github.com/adrg/libvlc-go/v3 v3.1.2 + github.com/adrg/libvlc-go/v3 v3.1.4 github.com/bradfitz/latlong v0.0.0-20170410180902-f3db6d0dff40 github.com/davecgh/go-spew v1.1.1 github.com/dimiro1/banner v1.1.0 @@ -25,7 +25,7 @@ require ( github.com/mattn/go-colorable v0.1.8 // indirect github.com/mitchellh/go-ps v1.0.0 github.com/nathan-osman/go-sunrise v0.0.0-20201029015502-9a83cd1a5746 - github.com/nicklaw5/helix v1.16.0 + github.com/nicklaw5/helix v1.20.0 github.com/prometheus/client_golang v1.10.0 github.com/robfig/cron v1.2.0 github.com/sfreiberg/gotwilio v0.0.0-20200916182813-169c4cd5c691 diff --git a/go.sum b/go.sum index c33f0bd4..f011e158 100644 --- a/go.sum +++ b/go.sum @@ -52,8 +52,8 @@ github.com/Shopify/goreferrer v0.0.0-20181106222321-ec9c9a553398/go.mod h1:a1uqR github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= -github.com/adrg/libvlc-go/v3 v3.1.2 h1:Q5e0IT/ESWT+iHfjR22a6CGmSI8LE3tTZHeCGqJ/zE8= -github.com/adrg/libvlc-go/v3 v3.1.2/go.mod h1:xJK0YD8cyMDejnrTFQinStE6RYCV1nlfS8KmqTpszSc= +github.com/adrg/libvlc-go/v3 v3.1.4 h1:zWBln9eEuMzZbOFtgmvHpufYejAuelfmGpiWG9f0n24= +github.com/adrg/libvlc-go/v3 v3.1.4/go.mod h1:xJK0YD8cyMDejnrTFQinStE6RYCV1nlfS8KmqTpszSc= github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c= github.com/ajg/form v1.5.1/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= @@ -413,8 +413,8 @@ github.com/nats-io/nats.go v1.9.1/go.mod h1:ZjDU1L/7fJ09jvUSRVBR2e7+RnLiiIQyqyzE github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= github.com/nats-io/nkeys v0.1.3/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= -github.com/nicklaw5/helix v1.16.0 h1:3mQwLWQ3VHoy67uGp3VrnaVzuwJ4ulSLcyBKRKdzsgc= -github.com/nicklaw5/helix v1.16.0/go.mod h1:XeeXY7oY5W+MVMu6wF4qGm8uvjZ1/Nss0FqprVkXKrg= +github.com/nicklaw5/helix v1.20.0 h1:qC76FVxeOOcqOJD2JijV97O37Wc3gqi9w1EUBLWFFFs= +github.com/nicklaw5/helix v1.20.0/go.mod h1:XeeXY7oY5W+MVMu6wF4qGm8uvjZ1/Nss0FqprVkXKrg= github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs= github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= diff --git a/infra/docker/tripbot/Dockerfile b/infra/docker/tripbot/Dockerfile index 9b6c1df9..da1eda7a 100644 --- a/infra/docker/tripbot/Dockerfile +++ b/infra/docker/tripbot/Dockerfile @@ -1,5 +1,5 @@ # buster is the debian release, c.p. https://askubuntu.com/a/445496 -FROM golang:1.16.4-buster +FROM golang:1.16.5-buster WORKDIR /go/src/github.com/adanalife/tripbot diff --git a/pkg/chatbot/handlers.go b/pkg/chatbot/handlers.go index bb77e5b8..f3bcb3b7 100644 --- a/pkg/chatbot/handlers.go +++ b/pkg/chatbot/handlers.go @@ -152,7 +152,7 @@ func runCommand(user *users.User, message string) { // any of these should trigger the location command //TODO: add support for: "where is this", "where are we", "where are you" - case "!tripbot", "!location", "!city", "!town", "!where", "!loacation", "!loation", "!loc", "!locatioin", "!locatoion", "!locaton", "!loclistion", "!locton", "1location", "¡location", "!locatiom", "!location!", "!locatio": + case "!tripbot", "!location", "!city", "!town", "!where", "!loacation", "!loation", "!loc", "!locatioin", "!locatoion", "!locaton", "!loclistion", "!locton", "1location", "¡location", "!locatiom", "!location!", "!locatio", "!lcoation": if user.HasCommandAvailable() { locationCmd(user) } else { diff --git a/pkg/config/tripbot/helpers.go b/pkg/config/tripbot/helpers.go index 22d0d007..76cc2d7e 100644 --- a/pkg/config/tripbot/helpers.go +++ b/pkg/config/tripbot/helpers.go @@ -41,8 +41,10 @@ func UserIsIgnored(user string) bool { // https://twitchinsights.net/bots var IgnoredUsers = []string{ "0_applebadapple_0", + "1174", "2020", "abbottcostello", + "academyimpossible", "angeloflight", "anotherttvviewer", "apricotdrupefruit", @@ -52,8 +54,11 @@ var IgnoredUsers = []string{ "bingcortana", "brokemystreamdeck", "buglers", + "carbob14xyz", "cartierlogic", + "cashiering", "casinothanks", + "cleaning_the_house", "clearyourbrowserhistory", "comettunes", "commanderroot", @@ -61,7 +66,10 @@ var IgnoredUsers = []string{ "communityshowcase", "cristianepre", "cyclemotion", + "d1sc0rdforsmallstreamers", + "d4rk_5how", "d4rk_5ky", + "disc0rdforsma11streamers", "discord_for_streamers", "droopdoggg", "electricallongboard", @@ -72,6 +80,7 @@ var IgnoredUsers = []string{ "feuerwehr", "flaskcopy", "freddyybot", + "frw33d", "ftopayr", "ghrly", "gingerne", diff --git a/pkg/errors/errors.go b/pkg/errors/errors.go index f7d93c27..f8d80866 100644 --- a/pkg/errors/errors.go +++ b/pkg/errors/errors.go @@ -2,6 +2,7 @@ package errors import ( "errors" + "fmt" "log" "github.com/adanalife/tripbot/pkg/config" @@ -14,7 +15,13 @@ var conf config.Config // Initialize takes a Config interface and sets up a logger func Initialize(c config.Config) { // sentry options are picked up through ENV vars - sentry.Init(sentry.ClientOptions{}) + err := sentry.Init(sentry.ClientOptions{ + // enable tracing + TracesSampleRate: 0.2, + }) + if err != nil { + fmt.Println(err) + } conf = c }