File tree 1 file changed +11
-5
lines changed
1 file changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -35,6 +35,8 @@ func AnonLink(params bot.HandlerParams) error {
35
35
return nil
36
36
}
37
37
38
+ const generateAnonQuoteImages = false
39
+
38
40
func AnonQuote (params bot.HandlerParams ) error {
39
41
q := model .New (db .DB )
40
42
pool := linkpool .New (q , minAge )
@@ -43,14 +45,18 @@ func AnonQuote(params bot.HandlerParams) error {
43
45
return err
44
46
}
45
47
46
- img , err := image .GenerateDALLE (context .TODO (), note .Text .String )
47
- if err != nil {
48
+ if generateAnonQuoteImages {
49
+ img , err := image .GenerateDALLE (context .TODO (), note .Text .String )
50
+ if err != nil {
51
+ params .Privmsgf (params .Target , "%s" , note .Text .String )
52
+ return err
53
+ }
54
+
55
+ params .Privmsgf (params .Target , "%s %s" , note .Text .String , img .URL ())
56
+ } else {
48
57
params .Privmsgf (params .Target , "%s" , note .Text .String )
49
- return err
50
58
}
51
59
52
- params .Privmsgf (params .Target , "%s %s" , note .Text .String , img .URL ())
53
-
54
60
return nil
55
61
}
56
62
You can’t perform that action at this time.
0 commit comments