Skip to content

Commit b7c7ffe

Browse files
committed
style: update code based on suggestions
1 parent 94c227d commit b7c7ffe

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/commands.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -399,21 +399,19 @@ const commands: Record<string, Command> = {
399399
} else {
400400
await interaction.reply({
401401
flags: MessageFlags.Ephemeral,
402-
content: `The target channel is not a text channel! ${isDm}`,
402+
content: "The target channel is not a text channel!",
403403
});
404404

405405
return;
406406
}
407407

408408
// Before attempting to add the subscription, if it's a DM, check if it's already in the database. If not add it
409409
if (isDm) {
410-
console.log("CHECKING DM");
411410
const data = (
412411
await discordCheckIfDmChannelExists(discordChannelId)
413412
).data;
414413

415-
if (!data) {
416-
console.log("ADDING DM");
414+
if (!data.length) {
417415
await discordAddNewGuild(discordChannelId, true);
418416
}
419417
}

0 commit comments

Comments
 (0)