discord.js - .startsWith lanza un error al usar TypeScript
Cada vez que uso .startsWith(), me da este error:
Property 'startsWith' does not exist on type 'string'.
Funciona si intento con .startsWith() en index.js, pero no en index.ts.
Aquí está lo que tengo:
client.on("message", function (msg) {
if (msg.author.bot) {
return;
}
if (!msg.content.startsWith(ConfigFile.config.prefix)) {
return;
}
msg.channel.send(msg.author.username + " this better work.");
});