Skip to content
This repository has been archived by the owner on Jan 21, 2024. It is now read-only.

Commit

Permalink
Only send welcome message if channel exists.
Browse files Browse the repository at this point in the history
  • Loading branch information
MitchTalmadge committed Mar 30, 2021
1 parent f416a66 commit 28b32af
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/controllers/channel/course-selection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export class CourseSelectionChannelController extends ChannelController {
.then(implement => {
if (implement) {
const courseChannel = this.guildContext.guild.channels.resolve(implement.channelIds[CourseImplementChannelType.CHAT]) as Discord.TextChannel;
courseChannel.send(`Welcome, ${message.author}!`);
courseChannel?.send(`Welcome, ${message.author}!`);
}
})
.catch(err => {
Expand Down

0 comments on commit 28b32af

Please sign in to comment.