Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion scripts/bot/fix-ephemeral.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,10 @@ function processFile (filePath) {
const importMatch = content.match(/import\s+{[^}]*}\s+from\s+['"]discord\.js['"]/);
if (importMatch) {
// Ajouter MessageFlags à l'import existant
content = content.replace(importMatch[0], importMatch[0].replace('}', ', MessageFlags }'));
content = content.replace(
/import\s+{([^}]*)}\s+from\s+(['"]discord\.js['"])/,
(match, imports, source) => `import {${imports.trim()}, MessageFlags } from ${source}`
);
} else {
// Ajouter un nouvel import
content = `import { MessageFlags } from 'discord.js';\n${content}`;
Expand Down
Loading