Skip to content

Commit 5913f7b

Browse files
committed
Merge branch 'adventure' into develop
2 parents d2bbf16 + 2fe5c34 commit 5913f7b

File tree

4 files changed

+10
-3
lines changed

4 files changed

+10
-3
lines changed

cmd/Discord_api.go

+5-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@ package cmd
22

33
import (
44
"log"
5+
"net/http"
56
"strings"
7+
"time"
68

79
"github.com/bwmarrin/discordgo"
810
"github.com/seemywingz/goai"
@@ -16,7 +18,9 @@ func initDiscord() {
1618
discord, err = discordgo.New("Bot " + DISCORD_API_KEY)
1719
catchErr(err)
1820

19-
discord.Client = httpClient // Set the HTTP client for the Discord session.
21+
discord.Client = &http.Client{
22+
Timeout: time.Second * 10,
23+
}
2024

2125
// Open a websocket connection to Discord
2226
err = discord.Open()

cmd/adventure.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -219,9 +219,9 @@ func startAdventure() {
219219
playerInput := getPlayerInput(&player)
220220
spinner, _ = ponderSpinner.WithSequence(moonSequence...).Start()
221221
adventureResponse := adventureChat(playerInput)
222-
narratorSay(adventureResponse)
223222
if generateImages {
224223
adventureImage(adventureResponse)
225224
}
225+
narratorSay(adventureResponse)
226226
}
227227
}

cmd/image.go

+3
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ var imageCmd = &cobra.Command{
3030
},
3131
Run: func(cmd *cobra.Command, args []string) {
3232
createImage(prompt, imageFile)
33+
3334
},
3435
}
3536

@@ -45,6 +46,8 @@ func createImage(prompt, imageFile string) {
4546
fmt.Println("🖼 Creating Image...")
4647
res := ai.ImageGen(prompt, imageFile, n)
4748

49+
fmt.Println("URLs:" + res.Data[0].URL)
50+
4851
for imgNum, data := range res.Data {
4952
url := data.URL
5053
fmt.Println("🌐 Image URL: " + url)

cmd/root.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import (
1515
)
1616

1717
var ponderMessages = []goai.Message{}
18-
var APP_VERSION = "v0.4.2"
18+
var APP_VERSION = "v0.4.3"
1919
var ai *goai.Client
2020

2121
var verbose,

0 commit comments

Comments
 (0)