Skip to content

Commit

Permalink
added response when updating quotes cache
Browse files Browse the repository at this point in the history
Signed-off-by: Matthew Sawatzky <[email protected]>
  • Loading branch information
msawatzky75 committed Dec 22, 2023
1 parent 1e051f0 commit 427781e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "discord-bot-js",
"version": "2.4.0",
"version": "2.4.1",
"private": true,
"repository": "[email protected]:msawatzky75/discord-bot-js.git",
"author": "Matthew Sawatzky <[email protected]>",
Expand Down
7 changes: 4 additions & 3 deletions src/commands/quote.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,11 @@ const command: Command = {

if (!serverMessages) {
d(`No cache for ${quoteChannel.guild.name}, fetching quotes...`);
interaction.reply("Fetching quotes. This may take some time...");
await updateMessages(quoteChannel);
}
if (timeSinceUpdate >= cacheLife) {
} else if (timeSinceUpdate >= cacheLife) {
d(`Cache expired for ${quoteChannel.guild.name}, fetching quotes...`);
await interaction.reply("Cache expired, refreshing. This may take some time...");
await updateMessages(quoteChannel);
}

Expand All @@ -49,7 +50,7 @@ const command: Command = {
return `**${member.username.trim()}**`;
});

await interaction.reply(content);
interaction.replied ? await interaction.editReply(content) : await interaction.reply(content);
},
};

Expand Down

0 comments on commit 427781e

Please sign in to comment.