Property 'send' does not exist on type *channel types*

I am following the guide on setting up a basic command using sapphire, but using channel.send throws an odd error.
import { Command } from '@sapphire/framework';
import { Message } from 'discord.js';

export class PingCommand extends Command {
public constructor(context: Command.LoaderContext, options: Command.Options) {
super(context, {
...options,
name: 'test',
description: 'testy test test',
});
}

public async messageRun(message: Message) {
const msg = await message.channel.send('Test...');

const content = `Pong from JavaScript! Bot Latency ${Math.round(this.container.client.ws.ping)}ms. API Latency ${
msg.createdTimestamp - message.createdTimestamp
}ms.`;

return msg.edit(content);
}
}
import { Command } from '@sapphire/framework';
import { Message } from 'discord.js';

export class PingCommand extends Command {
public constructor(context: Command.LoaderContext, options: Command.Options) {
super(context, {
...options,
name: 'test',
description: 'testy test test',
});
}

public async messageRun(message: Message) {
const msg = await message.channel.send('Test...');

const content = `Pong from JavaScript! Bot Latency ${Math.round(this.container.client.ws.ping)}ms. API Latency ${
msg.createdTimestamp - message.createdTimestamp
}ms.`;

return msg.edit(content);
}
}
No description
Solution:
Nvm I needed to type guard it with if (!message.channel.isSendable()) return;
Jump to solution
1 Reply
Solution
๖̶̶̶ζ͜͡SuperPyroManiac
Nvm I needed to type guard it with if (!message.channel.isSendable()) return;
Want results from more Discord servers?
Add your server