Skip to content

Commit

Permalink
message.author.bot
Browse files Browse the repository at this point in the history
  • Loading branch information
artifishvr committed Apr 15, 2024
1 parent 6ba16ac commit 794b538
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ client.on("ready", async () => {
});

function shouldIReply(message) {
if (message.author.bot) return false;
if (!message.content && !message.attachments) return false;
if (Math.random() < process.env.REPLY_CHANCE && !channels.includes(message.channel.id) && !message.mentions.has(client.user.id)) return false;
if (message.content.startsWith("!!")) return false;
Expand All @@ -56,6 +55,7 @@ function shouldIReply(message) {


client.on("messageCreate", async message => {
if (message.author.bot) return;
if (!shouldIReply(message)) return;

try {
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.26.2",
"version": "1.26.3",
"description": "custom AI chatbot for discord",
"main": "index.js",
"type": "module",
Expand Down

0 comments on commit 794b538

Please sign in to comment.