Skip to content

Commit

Permalink
i'm not even gonna pretend this closes it
Browse files Browse the repository at this point in the history
  • Loading branch information
artifishvr committed May 13, 2024
1 parent 2ae2aa5 commit f7b2879
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
10 changes: 2 additions & 8 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,16 +142,10 @@ client.on("messageCreate", async message => {
}

// Send AI response
let no_longer_exists = false;
try {
await message.channel.messages.fetch(message.id);
await message.reply({ content: `${response}`, failIfNotExists: true });
} catch (e) {
console.warn(e);
no_longer_exists = true;
message.reply({ content: `\`\`\`\n${message.author.username}: ${message.content}\n\`\`\`\n\n${response}`, failIfNotExists: false });
}
if (!no_longer_exists) {
message.reply({ content: `${response}`, failIfNotExists: false });
await message.channel.send({ content: `\`\`\`\n${message.author.username}: ${message.content}\n\`\`\`\n\n${response}` });
}

// tts!
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "spongegpt",
"version": "1.29.4",
"version": "1.29.5",
"description": "custom AI chatbot for discord",
"main": "index.js",
"type": "module",
Expand Down

1 comment on commit f7b2879

@Butterroach
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

catcigar

Please sign in to comment.