Possible fix for null ani
This commit is contained in:
parent
b52bb1139b
commit
3de43aa6f4
3
index.js
3
index.js
|
@ -100,9 +100,10 @@ function t9ToNumber(input) {
|
||||||
T: '8', U: '8', V: '8',
|
T: '8', U: '8', V: '8',
|
||||||
W: '9', X: '9', Y: '9', Z: '9'
|
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 : '')
|
t9[c] || (/\d/.test(c) ? c : '')
|
||||||
).join('');
|
).join('');
|
||||||
|
return output.length === 11 ? output : null; // Ensure it's 11 digits
|
||||||
}
|
}
|
||||||
|
|
||||||
Client.on("interactionCreate", async (interaction) => {
|
Client.on("interactionCreate", async (interaction) => {
|
||||||
|
|
Loading…
Reference in a new issue