Update notclyde.js
This commit is contained in:
parent
a6d91f2eb1
commit
2d0adeedcb
1 changed files with 2 additions and 0 deletions
|
@ -18,6 +18,7 @@ export default {
|
||||||
execute(message, args) {
|
execute(message, args) {
|
||||||
const prompt = message.content.slice(prefix.length + this.name.length);
|
const prompt = message.content.slice(prefix.length + this.name.length);
|
||||||
const sent = action.reply(message, `generating response for \`${prompt}\``)
|
const sent = action.reply(message, `generating response for \`${prompt}\``)
|
||||||
|
message.channel.startTyping()
|
||||||
openai
|
openai
|
||||||
.createChatCompletion({
|
.createChatCompletion({
|
||||||
model: "gpt-3.5-turbo",
|
model: "gpt-3.5-turbo",
|
||||||
|
@ -25,6 +26,7 @@ export default {
|
||||||
})
|
})
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
action.edit(sent, res.data.choices[0].message.content);
|
action.edit(sent, res.data.choices[0].message.content);
|
||||||
|
message.channel.stopTyping()
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
console.log(e);
|
console.log(e);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue