Complete Temlate Error

Created a new Project via CLI (used the complete template) didnt chagned anything and cant run the project now, becuase of this error:
src/listeners/mentionPrefixOnly.ts:8:26 - error TS2339: Property 'send' does not exist on type 'DMChannel | ...'

Property 'send' does not exist on type 'PartialGroupDMChannel'.

8 return message.channel.send(prefix ? `My prefix in this guild is: \`${prefix}\`` : 'Cannot find any Prefix for Message Commands.');

Found 1 error in src/listeners/mentionPrefixOnly.ts:8
src/listeners/mentionPrefixOnly.ts:8:26 - error TS2339: Property 'send' does not exist on type 'DMChannel | ...'

Property 'send' does not exist on type 'PartialGroupDMChannel'.

8 return message.channel.send(prefix ? `My prefix in this guild is: \`${prefix}\`` : 'Cannot find any Prefix for Message Commands.');

Found 1 error in src/listeners/mentionPrefixOnly.ts:8
No description
No description
4 Replies
Favna
Favna4mo ago
Same as https://discord.com/channels/737141877803057244/1280558383354744913 you'll have to update the code accordingly. This is since the latest discordjs release and the templates havent been adjusted yet
D0dge
D0dgeOP4mo ago
Alright :) Thanks
Favna
Favna4mo ago
btw if you fancy updating the templates in the sapphiredev/examples repo, please @D0dge !
D0dge
D0dgeOP4mo ago
can do, but tbh my skills are rarely limited, My fixes with such problems would probably look something like this :monkaStop:
No description
Want results from more Discord servers?
Add your server