Skip to content

Commit f143359

Browse files
authored
Merge pull request #6 from TeamPickle:fix-all-domestic-result
fix: all domestic result
2 parents e9d5bc8 + bac95f8 commit f143359

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

function/commands/status/command.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import (
2121
func handleDomesticRegion(ctx context.Context, regionName string, boardData *coronaboard.CoronaBoardData) *api.InteractionResponse {
2222
var status *coronaboard.DomesticNowStatus
2323
for _, v := range boardData.StatDomesticNow {
24-
if v.Region == regionName || (regionName == "전국" && v.Region == "합계") {
24+
if v.Region == regionName {
2525
status = &v
2626
break
2727
}
@@ -146,7 +146,7 @@ func handleDomestic(ctx context.Context, rawRequest discord.InteractionEvent) *a
146146
}
147147

148148
func (c *StatusCommand) Handle(ctx context.Context, interaction *discord.CommandInteraction, rawRequest discord.InteractionEvent) *api.InteractionResponse {
149-
if len(interaction.Options) == 0 {
149+
if len(interaction.Options) == 0 || interaction.Options[0].String() == "전국" {
150150
return handleDomestic(ctx, rawRequest)
151151
}
152152
return handleRegion(ctx, interaction.Options[0].String())

0 commit comments

Comments
 (0)