Skip to content

Commit ca1d94b

Browse files
chore(deps): bump github.com/bwmarrin/discordgo from 0.27.1 to 0.28.1 (#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>
1 parent 4a85cd1 commit ca1d94b

File tree

9 files changed

+19
-17
lines changed

9 files changed

+19
-17
lines changed

.golangci.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@ linters:
1515
- scopelint
1616
- structcheck
1717
- varcheck
18+
- intrange
19+
20+
issues:
21+
max-issues-per-linter: 0
22+
max-same-issues: 0
1823

1924
linters-settings:
2025
lll:

configuration/configuration.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ func ReadConfiguration(fsys fs.FS, filename string) (*Configuration, error) {
5656

5757
config := Configuration{}
5858

59+
//nolint:musttag
5960
err = json.Unmarshal(filedata, &config)
6061
if err != nil {
6162
return nil, fmt.Errorf("%w", err)

configuration/configuration_test.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,8 +172,6 @@ func TestReadConfiguration_Errors(t *testing.T) {
172172
}
173173

174174
for testCaseName, testCase := range testCases {
175-
testCaseName, testCase := testCaseName, testCase
176-
177175
t.Run(testCaseName, func(tt *testing.T) {
178176
tt.Parallel()
179177

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ module github.com/blueprintue/discord-bot
33
go 1.22
44

55
require (
6-
github.com/bwmarrin/discordgo v0.27.1
6+
github.com/bwmarrin/discordgo v0.28.1
77
github.com/crazy-max/gohealthchecks v0.4.1
88
github.com/ilya1st/rotatewriter v0.0.0-20171126183947-3df0c1a3ed6d
99
github.com/rs/zerolog v1.32.0

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
github.com/bwmarrin/discordgo v0.27.1 h1:ib9AIc/dom1E/fSIulrBwnez0CToJE113ZGt4HoliGY=
2-
github.com/bwmarrin/discordgo v0.27.1/go.mod h1:NJZpH+1AfhIcyQsPeuBKsUtYrRnjkyu0kIVMCHkZtRY=
1+
github.com/bwmarrin/discordgo v0.28.1 h1:gXsuo2GBO7NbR6uqmrrBDplPUx2T3nzu775q/Rd1aG4=
2+
github.com/bwmarrin/discordgo v0.28.1/go.mod h1:NJZpH+1AfhIcyQsPeuBKsUtYrRnjkyu0kIVMCHkZtRY=
33
github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc=
44
github.com/crazy-max/gohealthchecks v0.4.1 h1:gbjZzF/GxwDyP78u37B2/c2iQfq8BEjAHS3eBLM6FcQ=
55
github.com/crazy-max/gohealthchecks v0.4.1/go.mod h1:gkT8QSdEXZJahyswdTGDbd+q20fWm0DmWW7TWBNtgJg=

hack/lint.Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ ENV GOFLAGS="-buildvcs=false"
55
RUN apk add --no-cache gcc linux-headers musl-dev
66
WORKDIR /src
77

8-
FROM golangci/golangci-lint:latest-alpine AS golangci-lint
8+
FROM golangci/golangci-lint:v1.57.2-alpine AS golangci-lint
99
FROM base AS lint
1010
RUN --mount=type=bind,target=. \
11-
--mount=type=cache,target=/root/.cache \
12-
--mount=from=golangci-lint,source=/usr/bin/golangci-lint,target=/usr/bin/golangci-lint \
11+
--mount=type=cache,target=/root/.cache \
12+
--mount=from=golangci-lint,source=/usr/bin/golangci-lint,target=/usr/bin/golangci-lint \
1313
golangci-lint run ./...

healthchecks/healthchecks_test.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,6 @@ func TestNewHealthchecksManager_ErrorHasValidConfigurationInFile(t *testing.T) {
8989
}
9090

9191
for testCaseName, testCase := range testCases {
92-
testCaseName, testCase := testCaseName, testCase
93-
9492
t.Run(testCaseName, func(tt *testing.T) {
9593
var bufferLogs bytes.Buffer
9694
log.Logger = zerolog.New(&bufferLogs).Level(zerolog.TraceLevel).With().Logger()

welcome/welcome_handler_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ func TestHandlers_OnMessageReactionAdd(t *testing.T) {
8787
[]requestTest{
8888
{method: "GET", host: "discord.com", uri: "/api/v9/channels/channel-123/messages?limit=100"},
8989
{method: "POST", host: "discord.com", uri: "/api/v9/channels/channel-123/messages",
90-
body: `{"embeds":[{"type":"rich","title":"my title 1"}],"tts":false,"components":null}`},
90+
body: `{"embeds":[{"type":"rich","title":"my title 1"}],"tts":false,"components":null,"sticker_ids":null}`},
9191
{method: "PUT", host: "discord.com", uri: "/api/v9/channels/channel-123/messages/123/reactions/my-emoji-1:emoji-123/@me"},
9292
{method: "PUT", host: "discord.com", uri: "/api/v9/guilds/guild-123/members/user-id-456/roles/role-123"},
9393
},
@@ -277,7 +277,7 @@ func TestHandlers_OnMessageReactionAdd_Errors(t *testing.T) {
277277
[]requestTest{
278278
{method: "GET", host: "discord.com", uri: "/api/v9/channels/channel-123/messages?limit=100"},
279279
{method: "POST", host: "discord.com", uri: "/api/v9/channels/channel-123/messages",
280-
body: `{"embeds":[{"type":"rich","title":"my title 1"}],"tts":false,"components":null}`},
280+
body: `{"embeds":[{"type":"rich","title":"my title 1"}],"tts":false,"components":null,"sticker_ids":null}`},
281281
{method: "PUT", host: "discord.com", uri: "/api/v9/channels/channel-123/messages/123/reactions/my-emoji-1:emoji-123/@me"},
282282
{method: "PUT", host: "discord.com", uri: "/api/v9/guilds/guild-123/members/user-id-456/roles/role-123"},
283283
},
@@ -377,7 +377,7 @@ func TestHandlers_OnMessageReactionRemove(t *testing.T) {
377377
[]requestTest{
378378
{method: "GET", host: "discord.com", uri: "/api/v9/channels/channel-123/messages?limit=100"},
379379
{method: "POST", host: "discord.com", uri: "/api/v9/channels/channel-123/messages",
380-
body: `{"embeds":[{"type":"rich","title":"my title 1"}],"tts":false,"components":null}`},
380+
body: `{"embeds":[{"type":"rich","title":"my title 1"}],"tts":false,"components":null,"sticker_ids":null}`},
381381
{method: "PUT", host: "discord.com", uri: "/api/v9/channels/channel-123/messages/123/reactions/my-emoji-1:emoji-123/@me"},
382382
{method: "DELETE", host: "discord.com", uri: "/api/v9/guilds/guild-123/members/user-id-789/roles/role-123"},
383383
},
@@ -566,7 +566,7 @@ func TestHandlers_OnMessageReactionRemove_Errors(t *testing.T) {
566566
[]requestTest{
567567
{method: "GET", host: "discord.com", uri: "/api/v9/channels/channel-123/messages?limit=100"},
568568
{method: "POST", host: "discord.com", uri: "/api/v9/channels/channel-123/messages",
569-
body: `{"embeds":[{"type":"rich","title":"my title 1"}],"tts":false,"components":null}`},
569+
body: `{"embeds":[{"type":"rich","title":"my title 1"}],"tts":false,"components":null,"sticker_ids":null}`},
570570
{method: "PUT", host: "discord.com", uri: "/api/v9/channels/channel-123/messages/123/reactions/my-emoji-1:emoji-123/@me"},
571571
{method: "DELETE", host: "discord.com", uri: "/api/v9/guilds/guild-123/members/user-id-789/roles/role-123"},
572572
},

welcome/welcome_run_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ func TestRun(t *testing.T) {
8989
[]requestTest{
9090
{method: "GET", host: "discord.com", uri: "/api/v9/channels/channel-123/messages?limit=100"},
9191
{method: "POST", host: "discord.com", uri: "/api/v9/channels/channel-123/messages",
92-
body: `{"embeds":[{"type":"rich","title":"my title 1"}],"tts":false,"components":null}`},
92+
body: `{"embeds":[{"type":"rich","title":"my title 1"}],"tts":false,"components":null,"sticker_ids":null}`},
9393
{method: "PUT", host: "discord.com", uri: "/api/v9/channels/channel-123/messages/123/reactions/my-emoji-1:emoji-123/@me"},
9494
},
9595
)
@@ -327,7 +327,7 @@ func TestRun_Errors(t *testing.T) {
327327
[]requestTest{
328328
{method: "GET", host: "discord.com", uri: "/api/v9/channels/channel-123/messages?limit=100"},
329329
{method: "POST", host: "discord.com", uri: "/api/v9/channels/channel-123/messages",
330-
body: `{"embeds":[{"type":"rich","title":"my title 1"}],"tts":false,"components":null}`},
330+
body: `{"embeds":[{"type":"rich","title":"my title 1"}],"tts":false,"components":null,"sticker_ids":null}`},
331331
},
332332
)
333333

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

0 commit comments

Comments
 (0)