Skip to content

Commit

Permalink
fix: do not send message twice
Browse files Browse the repository at this point in the history
  • Loading branch information
ayn2op committed Dec 12, 2024
1 parent a5c5540 commit 0d886c3
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
5 changes: 0 additions & 5 deletions cmd/message_input.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,6 @@ func (mi *MessageInput) send() {
if strings.HasPrefix(mi.GetTitle(), "[@]") {
data.AllowedMentions.RepliedUser = option.True
}

go func() {
if _, err := discordState.SendMessageComplex(layout.guildsTree.selectedChannelID, data); err != nil {
}
}()
}

go func() {
Expand Down
2 changes: 1 addition & 1 deletion internal/logger/logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ func Load() error {
}

path = filepath.Join(path, "logs.txt")
file, err := os.OpenFile(path, os.O_CREATE|os.O_APPEND, os.ModePerm)
file, err := os.OpenFile(path, os.O_CREATE|os.O_WRONLY, os.ModePerm)
if err != nil {
return err
}
Expand Down

0 comments on commit 0d886c3

Please sign in to comment.