Skip to content

Commit

Permalink
Fix: move before declaration x2
Browse files Browse the repository at this point in the history
  • Loading branch information
ikafly144 committed Jul 19, 2024
1 parent 1a47ba1 commit a354375
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bot/commands/message/message.go
Original file line number Diff line number Diff line change
Expand Up @@ -719,6 +719,7 @@ func Command(c *components.Components) *generic.Command {

// 語尾の処理
var w *ent.WordSuffix
var u *ent.User

if e.Message.Type.System() || e.Message.Author.System || e.Message.Author.Bot {
goto messagePin
Expand All @@ -727,8 +728,7 @@ func Command(c *components.Components) *generic.Command {
goto messagePin
}

u, err := c.UserCreate(e, e.Message.Author)
if err != nil {
if u, err = c.UserCreate(e, e.Message.Author); err != nil {
slog.Error("メッセージ著者取得に失敗", "err", err, "uid", e.Message.Author.ID)
return errors.NewError(err)
}
Expand Down

0 comments on commit a354375

Please sign in to comment.