mirror of
https://github.com/darksaid98/cadence-discord-bot.git
synced 2026-12-02 22:16:13 +00:00
Don't send execution time warning for /filters command above 55 seconds
This commit is contained in:
1 parent
81a7415419
commit
6e68fe604b
1 file changed
+12
@@ -127,6 +127,18 @@ client.on('interactionCreate', async (interaction) => {
|
||||
const executionTime = outputTime - inputTime;
|
||||
|
||||
if (executionTime > 20000) {
|
||||
// don't send warning message for filters command, as collector timeout happens after 60 seconds
|
||||
if (command.name === 'filters' && executionTime > 55000) {
|
||||
console.log(
|
||||
`${new Date().toISOString().substring(11, 19)}: Info: ${
|
||||
interaction.guild.name
|
||||
} (#${
|
||||
interaction.guild.memberCount
|
||||
})> Command '${interaction}' executed in ${executionTime} ms.`
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
console.log(
|
||||
`${new Date().toISOString().substring(11, 19)}: Warning: ⚠️ ${
|
||||
interaction.guild.name
|
||||
|
||||
Reference in new issue
Block a user