특정 채널에 메시지 보내기

https://github.com/loegnah/auto_trading_service/commit/45d77a58ce92fe3e1461bed249922968aff83bdb

const channel = await this.client.channels.fetch(channelId);
console.log(chalk.yellow("[discord] Try to send message to channel"));
if (channel instanceof TextChannel) {
  await channel.send(msg);
} else {
  console.error("The provided channel is not a text channel");
}

<aside> <img src="/icons/info-alternate_green.svg" alt="/icons/info-alternate_green.svg" width="40px" />

주의점