diff --git a/index.js b/index.js index 75638ee..2d67717 100644 --- a/index.js +++ b/index.js @@ -100,9 +100,10 @@ function t9ToNumber(input) { T: '8', U: '8', V: '8', W: '9', X: '9', Y: '9', Z: '9' }; - return String(input).toUpperCase().split('').map(c => + let output = String(input).toUpperCase().split('').map(c => t9[c] || (/\d/.test(c) ? c : '') ).join(''); + return output.length === 11 ? output : null; // Ensure it's 11 digits } Client.on("interactionCreate", async (interaction) => {