Skip to content

Commit adf00fb

Browse files
committed
Change emote dir error to a warning if the path doesn't exist
Closes #194
1 parent e91e4e8 commit adf00fb

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

emotes.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package main
22

33
import (
4+
"errors"
45
"fmt"
56
"io/fs"
67
"os"
@@ -27,7 +28,11 @@ func processEmoteDir(dir string) (common.EmotesMap, error) {
2728
em := make(common.EmotesMap)
2829
_, err := os.ReadDir(dir)
2930
if err != nil {
30-
common.LogErrorf("could not open emote dir: %v\n", err)
31+
if errors.Is(err, os.ErrNotExist) {
32+
common.LogInfof("%s does not exist so no emotes were loaded\n", dir)
33+
} else {
34+
common.LogErrorf("could not open emote dir: %v\n", err)
35+
}
3136
return em, nil
3237
}
3338

0 commit comments

Comments
 (0)