Skip to content

Commit

Permalink
chore(deps): bump github.com/bwmarrin/discordgo from 0.27.1 to 0.28.1 (
Browse files Browse the repository at this point in the history
…#45)

* chore(deps): bump github.com/bwmarrin/discordgo from 0.27.1 to 0.28.1

Bumps [github.com/bwmarrin/discordgo](https://github.com/bwmarrin/discordgo) from 0.27.1 to 0.28.1.
- [Release notes](https://github.com/bwmarrin/discordgo/releases)
- [Commits](bwmarrin/discordgo@v0.27.1...v0.28.1)

---
updated-dependencies:
- dependency-name: github.com/bwmarrin/discordgo
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* fix golangci-lint

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Sébastien Rancoud <rancoud@users.noreply.github.com>
  • Loading branch information
dependabot[bot] and rancoud committed Apr 27, 2024
1 parent 4a85cd1 commit ca1d94b
Show file tree
Hide file tree
Showing 9 changed files with 19 additions and 17 deletions.
5 changes: 5 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ linters:
- scopelint
- structcheck
- varcheck
- intrange

issues:
max-issues-per-linter: 0
max-same-issues: 0

linters-settings:
lll:
Expand Down
1 change: 1 addition & 0 deletions configuration/configuration.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ func ReadConfiguration(fsys fs.FS, filename string) (*Configuration, error) {

config := Configuration{}

//nolint:musttag
err = json.Unmarshal(filedata, &config)
if err != nil {
return nil, fmt.Errorf("%w", err)
Expand Down
2 changes: 0 additions & 2 deletions configuration/configuration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,6 @@ func TestReadConfiguration_Errors(t *testing.T) {
}

for testCaseName, testCase := range testCases {
testCaseName, testCase := testCaseName, testCase

t.Run(testCaseName, func(tt *testing.T) {
tt.Parallel()

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/blueprintue/discord-bot
go 1.22

require (
github.com/bwmarrin/discordgo v0.27.1
github.com/bwmarrin/discordgo v0.28.1
github.com/crazy-max/gohealthchecks v0.4.1
github.com/ilya1st/rotatewriter v0.0.0-20171126183947-3df0c1a3ed6d
github.com/rs/zerolog v1.32.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
github.com/bwmarrin/discordgo v0.27.1 h1:ib9AIc/dom1E/fSIulrBwnez0CToJE113ZGt4HoliGY=
github.com/bwmarrin/discordgo v0.27.1/go.mod h1:NJZpH+1AfhIcyQsPeuBKsUtYrRnjkyu0kIVMCHkZtRY=
github.com/bwmarrin/discordgo v0.28.1 h1:gXsuo2GBO7NbR6uqmrrBDplPUx2T3nzu775q/Rd1aG4=
github.com/bwmarrin/discordgo v0.28.1/go.mod h1:NJZpH+1AfhIcyQsPeuBKsUtYrRnjkyu0kIVMCHkZtRY=
github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc=
github.com/crazy-max/gohealthchecks v0.4.1 h1:gbjZzF/GxwDyP78u37B2/c2iQfq8BEjAHS3eBLM6FcQ=
github.com/crazy-max/gohealthchecks v0.4.1/go.mod h1:gkT8QSdEXZJahyswdTGDbd+q20fWm0DmWW7TWBNtgJg=
Expand Down
6 changes: 3 additions & 3 deletions hack/lint.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ ENV GOFLAGS="-buildvcs=false"
RUN apk add --no-cache gcc linux-headers musl-dev
WORKDIR /src

FROM golangci/golangci-lint:latest-alpine AS golangci-lint
FROM golangci/golangci-lint:v1.57.2-alpine AS golangci-lint
FROM base AS lint
RUN --mount=type=bind,target=. \
--mount=type=cache,target=/root/.cache \
--mount=from=golangci-lint,source=/usr/bin/golangci-lint,target=/usr/bin/golangci-lint \
--mount=type=cache,target=/root/.cache \
--mount=from=golangci-lint,source=/usr/bin/golangci-lint,target=/usr/bin/golangci-lint \
golangci-lint run ./...
2 changes: 0 additions & 2 deletions healthchecks/healthchecks_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,6 @@ func TestNewHealthchecksManager_ErrorHasValidConfigurationInFile(t *testing.T) {
}

for testCaseName, testCase := range testCases {
testCaseName, testCase := testCaseName, testCase

t.Run(testCaseName, func(tt *testing.T) {
var bufferLogs bytes.Buffer
log.Logger = zerolog.New(&bufferLogs).Level(zerolog.TraceLevel).With().Logger()
Expand Down
8 changes: 4 additions & 4 deletions welcome/welcome_handler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ func TestHandlers_OnMessageReactionAdd(t *testing.T) {
[]requestTest{
{method: "GET", host: "discord.com", uri: "/api/v9/channels/channel-123/messages?limit=100"},
{method: "POST", host: "discord.com", uri: "/api/v9/channels/channel-123/messages",
body: `{"embeds":[{"type":"rich","title":"my title 1"}],"tts":false,"components":null}`},
body: `{"embeds":[{"type":"rich","title":"my title 1"}],"tts":false,"components":null,"sticker_ids":null}`},
{method: "PUT", host: "discord.com", uri: "/api/v9/channels/channel-123/messages/123/reactions/my-emoji-1:emoji-123/@me"},
{method: "PUT", host: "discord.com", uri: "/api/v9/guilds/guild-123/members/user-id-456/roles/role-123"},
},
Expand Down Expand Up @@ -277,7 +277,7 @@ func TestHandlers_OnMessageReactionAdd_Errors(t *testing.T) {
[]requestTest{
{method: "GET", host: "discord.com", uri: "/api/v9/channels/channel-123/messages?limit=100"},
{method: "POST", host: "discord.com", uri: "/api/v9/channels/channel-123/messages",
body: `{"embeds":[{"type":"rich","title":"my title 1"}],"tts":false,"components":null}`},
body: `{"embeds":[{"type":"rich","title":"my title 1"}],"tts":false,"components":null,"sticker_ids":null}`},
{method: "PUT", host: "discord.com", uri: "/api/v9/channels/channel-123/messages/123/reactions/my-emoji-1:emoji-123/@me"},
{method: "PUT", host: "discord.com", uri: "/api/v9/guilds/guild-123/members/user-id-456/roles/role-123"},
},
Expand Down Expand Up @@ -377,7 +377,7 @@ func TestHandlers_OnMessageReactionRemove(t *testing.T) {
[]requestTest{
{method: "GET", host: "discord.com", uri: "/api/v9/channels/channel-123/messages?limit=100"},
{method: "POST", host: "discord.com", uri: "/api/v9/channels/channel-123/messages",
body: `{"embeds":[{"type":"rich","title":"my title 1"}],"tts":false,"components":null}`},
body: `{"embeds":[{"type":"rich","title":"my title 1"}],"tts":false,"components":null,"sticker_ids":null}`},
{method: "PUT", host: "discord.com", uri: "/api/v9/channels/channel-123/messages/123/reactions/my-emoji-1:emoji-123/@me"},
{method: "DELETE", host: "discord.com", uri: "/api/v9/guilds/guild-123/members/user-id-789/roles/role-123"},
},
Expand Down Expand Up @@ -566,7 +566,7 @@ func TestHandlers_OnMessageReactionRemove_Errors(t *testing.T) {
[]requestTest{
{method: "GET", host: "discord.com", uri: "/api/v9/channels/channel-123/messages?limit=100"},
{method: "POST", host: "discord.com", uri: "/api/v9/channels/channel-123/messages",
body: `{"embeds":[{"type":"rich","title":"my title 1"}],"tts":false,"components":null}`},
body: `{"embeds":[{"type":"rich","title":"my title 1"}],"tts":false,"components":null,"sticker_ids":null}`},
{method: "PUT", host: "discord.com", uri: "/api/v9/channels/channel-123/messages/123/reactions/my-emoji-1:emoji-123/@me"},
{method: "DELETE", host: "discord.com", uri: "/api/v9/guilds/guild-123/members/user-id-789/roles/role-123"},
},
Expand Down
6 changes: 3 additions & 3 deletions welcome/welcome_run_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ func TestRun(t *testing.T) {
[]requestTest{
{method: "GET", host: "discord.com", uri: "/api/v9/channels/channel-123/messages?limit=100"},
{method: "POST", host: "discord.com", uri: "/api/v9/channels/channel-123/messages",
body: `{"embeds":[{"type":"rich","title":"my title 1"}],"tts":false,"components":null}`},
body: `{"embeds":[{"type":"rich","title":"my title 1"}],"tts":false,"components":null,"sticker_ids":null}`},
{method: "PUT", host: "discord.com", uri: "/api/v9/channels/channel-123/messages/123/reactions/my-emoji-1:emoji-123/@me"},
},
)
Expand Down Expand Up @@ -327,7 +327,7 @@ func TestRun_Errors(t *testing.T) {
[]requestTest{
{method: "GET", host: "discord.com", uri: "/api/v9/channels/channel-123/messages?limit=100"},
{method: "POST", host: "discord.com", uri: "/api/v9/channels/channel-123/messages",
body: `{"embeds":[{"type":"rich","title":"my title 1"}],"tts":false,"components":null}`},
body: `{"embeds":[{"type":"rich","title":"my title 1"}],"tts":false,"components":null,"sticker_ids":null}`},
},
)

Expand Down Expand Up @@ -389,7 +389,7 @@ func TestRun_Errors(t *testing.T) {
[]requestTest{
{method: "GET", host: "discord.com", uri: "/api/v9/channels/channel-123/messages?limit=100"},
{method: "POST", host: "discord.com", uri: "/api/v9/channels/channel-123/messages",
body: `{"embeds":[{"type":"rich","title":"my title 1"}],"tts":false,"components":null}`},
body: `{"embeds":[{"type":"rich","title":"my title 1"}],"tts":false,"components":null,"sticker_ids":null}`},
{method: "PUT", host: "discord.com", uri: "/api/v9/channels/channel-123/messages/123/reactions/my-emoji-1:emoji-123/@me"},
},
)
Expand Down

0 comments on commit ca1d94b

Please sign in to comment.