TSError: Ô¿» Unable to compile TypeScript:
src/commands/general/Vote.ts:26:7 - error TS2322: Type 'Message<TextableChannel>' is not assignable to type 'void'.
async execute(client: IMClient, message: Message, _args: Array<string>): Promise<void> {
try {
client.bot
.createMessage((await message.author.getDMChannel()).id, {
embed: CreateEmptyEmbed(client, Color.Standard, message.guildID ? message.guildID : "")
.setTitle("Hello! ?")
.setDescription(`Thanks for your interest in voting for me!`)
.addField("Vote! ?", "If you are feeling really kind, you can vote for our bot here in order to help support us [here](te)"),
content: "Need support? Join our support Discord ",
})} catch(err) {
return await client.bot.createMessage(message.channel.id, {
embed: CreateEmptyEmbed(client, Color.Warning, message.guildID ? message.guildID : "")
.setTitle("I couldn't send you a direct message!")
.setDescription("Have you got recieving messages from none friended people enabled?"),
});
};
我有一个打字稿错误。
这个错误是什么意思?我该如何修复它?