p
This commit is contained in:
@@ -22,6 +22,7 @@ func OnMessageCreated(s *discordgo.Session, m *discordgo.MessageCreate) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if len(res.Choices) > 0 {
|
if len(res.Choices) > 0 {
|
||||||
|
aiResponse := res.Choices[0].Text
|
||||||
if _, err = s.ChannelMessageSend(m.ChannelID, aiResponse); err != nil {
|
if _, err = s.ChannelMessageSend(m.ChannelID, aiResponse); err != nil {
|
||||||
log.Panicf("failed to send the response [%s] to the discord channel [%s]", aiResponse, err.Error())
|
log.Panicf("failed to send the response [%s] to the discord channel [%s]", aiResponse, err.Error())
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user